Add multi-IDE installer support for OpenCode, Cursor, Codex, Roo, and Kilo
Summary
- add a first-party
agentmemory installCLI command for OpenCode, Cursor, Codex, Roo, Kilo, PI, Hermes, and OpenClaw targets - ship new Cursor and Codex hook entrypoints and generate the corresponding host config files plus MCP wiring
- preserve deep native integrations for Claude/OpenClaw/Hermes/PI while adding best-available automatic capture for hosts that only expose MCP or file-watch surfaces
What changed
- added
src/installers.tswith target-specific installers - added new hook adapters:
src/hooks/cursor.tsandsrc/hooks/codex.ts - wired
agentmemory installintosrc/cli.ts - updated
tsdown.config.tsso the new hook scripts are built into bothdist/hooksand trackedplugin/scripts - added focused tests in
test/installers.test.ts
QA
npm run buildnpx vitest run test/installers.test.ts- manual installer runs for:
node dist/cli.mjs install opencode --project-root <tmp>node dist/cli.mjs install cursor --project-root <tmp>node dist/cli.mjs install codex --project-root <tmp>node dist/cli.mjs install roo --project-root <tmp>node dist/cli.mjs install kilo --project-root <tmp>and inspection of generated files/configs
Notes
- Roo Code and Kilo Code currently receive best-available MCP config generation; they do not expose the same native lifecycle hook surface as Claude/Cursor/OpenCode
- OpenCode gets both an MCP entry and a generated plugin that forwards session/file/command events into the existing agentmemory hook pipeline
Summary by CodeRabbit
-
New Features
- Added an
installCLI command to install Agent Memory integrations for OpenCode, Cursor, Codex, Roo, Kilo, PI, OpenClaw, and Hermes. - Added Cursor and Codex hook and CLI scripts to emit session start/observe/tool-use/stop events and surface returned context.
- Added an
-
Chores
- Installer generates and merges editor/plugin configuration and integration artifacts across multiple targets.
-
Tests
- Expanded tests to verify installer outputs and safe merging into existing configs.
@RaviTharuma is attempting to deploy a commit to the rohitg00's projects Team on Vercel.
A member of the Team first needs to authorize it.
Adds an AgentMemory Installation Framework 🎯 4 (Complex) | ⏱️ ~45 minutes 🐰 I nibble lines and patch the trees, I stitch the hooks with nimble knees, ✏️ Tip: You can configure your own custom pre-merge checks in the settings.📝 Walkthrough
Walkthrough
agentmemory install CLI, installer implementation, Codex/Cursor hook sources and compiled plugin scripts, build config updates, and tests to install agentmemory integrations across multiple editor targets.Changes
Layer / File(s)
Summary
CLI Install Command
src/cli.tsagentmemory install handler parses target and flags, dynamically imports installers.js, calls installTarget, and reports files/notes.
Build Configuration
tsdown.config.tsAdds
src/hooks/cursor.ts and src/hooks/codex.ts to hookEntries, enabling builds to dist/hooks and plugin/scripts.
Codex plugin script (compiled)
plugin/scripts/codex.mjsReads stdin JSON, posts session/observe/end requests to Agent Memory, writes returned
context on session start, and swallows network errors.
Cursor plugin script (compiled)
plugin/scripts/cursor.mjsInfers Cursor events from stdin JSON, posts observations and session lifecycle events to Agent Memory, writes returned
context on session start, and ignores failures.
Codex hook source
src/hooks/codex.tsTypeScript hook: payload type, auth headers, stdin parsing, event-driven REST calls, timed aborts, and non-blocking error handling.
Cursor hook source
src/hooks/cursor.tsTypeScript hook: payload type, event inference, session/project helpers, observe/session endpoints, and main routing for cursor events.
Installers: Types & Core Helpers
src/installers.tsExports
InstallTarget/InstallResult; adds filesystem, JSON (comment-stripping), packageRoot, and hook command utilities.
Installers: Target Implementations
src/installers.tsPer-target install logic: OpenCode plugin +
opencode.json{c}, Cursor mcp.json merge, Codex config.toml + hooks, Roo/Kilo/PI/OpenClaw/Hermes handling, MCP merge helpers, recursive copy, and installTarget orchestrator.
Installation Tests
test/installers.test.tsVitest suite creating temp roots and asserting generated files/configs for
opencode, cursor, codex, roo, and kilo, including merge and JSONC-path behaviors.Estimated code review effort
Possibly related PRs
src/cli.ts and CLI dispatch behavior.Poem
Cursor listens, Codex sings,
Installers plant configurable springs,
A rabbit hops — integrations breeze.🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name
Status
Explanation
Resolution
Docstring Coverage
⚠️ Warning
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%.
Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name
Status
Explanation
Description Check
✅ Passed
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
✅ Passed
The title accurately summarizes the main change: adding a multi-IDE installer command with support for multiple IDE targets (OpenCode, Cursor, Codex, Roo, Kilo, and others mentioned in objectives).
Linked Issues check
✅ Passed
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
✅ Passed
Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
[!WARNING] There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.
🔧 ESLint
If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add
eslintto devDependencies.
[!TIP]
💬 Introducing Slack Agent: The best way for teams to turn conversations into code.
Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
- Generate code and open pull requests
- Plan features and break down work
- Investigate incidents and troubleshoot customer tickets together
- Automate recurring tasks and respond to alerts with triggers
- Summarize progress and report instantly
Built for teams:
- Shared memory across your entire org—no repeating context
- Per-thread sandboxes to safely plan and execute work
- Governance built-in—scoped access, auditability, and budget controls
One agent for your entire SDLC. Right inside Slack.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.
Addressed the actionable review feedback in commit 2e7e169:\n\n- reused a single timestamp in the Codex and Cursor hook handlers\n- switched installer path resolution to fileURLToPath for cross-platform correctness\n- fixed the generated OpenCode plugin to keep one stable session id across events\n\nRe-ran verification after the fixes:\n- npm run build\n- npx vitest run test/installers.test.ts\n- manual installer QA for OpenCode, Cursor, Codex, Roo, and Kilo\n\nI also checked the PR review threads — the actionable CodeRabbit threads are already marked resolved on GitHub after the update. The remaining Vercel failure is an authorization gate on the upstream team side rather than a code issue.
Thanks @RaviTharuma — multi-IDE wiring lives in agentmemory connect now. Latest batch (#677) brought it to 16 adapters.