Installation
1. Run the installer
Section titled “1. Run the installer”npx @colbymchenry/codegraphThe installer will:
- Ask which agent(s) to configure — auto-detecting installed ones from Claude Code, Cursor, Codex CLI, opencode, Hermes Agent, Gemini CLI, Antigravity IDE, and Kiro.
- Prompt to install
codegraphon yourPATH(so agents can launch the MCP server). - Ask whether configs apply to all your projects or just this one.
- Write each chosen agent’s MCP server config, plus a small marker-fenced CodeGraph section in the agent’s instructions file (
CLAUDE.md/AGENTS.md/GEMINI.md). Cursor and Kiro get the MCP config only. Removed cleanly bycodegraph uninstall. - Set up auto-allow permissions when Claude Code is one of the targets.
The installer wires up your agents only — it does not index your code. After it finishes, build each project’s graph yourself with codegraph init (step 3 below).
Non-interactive (scripting / CI)
Section titled “Non-interactive (scripting / CI)”codegraph install --yes # auto-detect agents, install globalcodegraph install --target=cursor,claude --yes # explicit target listcodegraph install --target=auto --location=local # detected agents, project-localcodegraph install --print-config codex # print snippet, no file writes| Flag | Values | Default |
|---|---|---|
--target | auto, all, none, or csv (claude,cursor,…) | prompt |
--location | global, local | prompt |
--yes | (boolean) | prompt every step |
--no-permissions | (boolean) skip Claude auto-allow list | permissions on |
--print-config <id> | dump snippet for one agent and exit | — |
2. Restart your agent
Section titled “2. Restart your agent”Restart your agent (Claude Code / Cursor / Codex CLI / opencode / Hermes Agent / Gemini CLI / Antigravity IDE / Kiro) for the MCP server to load.
3. Initialize projects
Section titled “3. Initialize projects”cd your-projectcodegraph initcodegraph init creates the local .codegraph/ directory and builds the full graph in the same step — one command. A single global codegraph install covers every project; you run codegraph init once per project.
Supported platforms
Section titled “Supported platforms”Every release ships a self-contained build (bundled Node runtime — nothing to compile) for all three desktop OSes, on both x64 and arm64:
| Platform | Architectures | Install |
|---|---|---|
| Windows | x64, arm64 | PowerShell installer or npm |
| macOS | x64, arm64 | shell installer or npm |
| Linux | x64, arm64 | shell installer or npm |
Uninstall
Section titled “Uninstall”Changed your mind? One command removes CodeGraph from every agent it configured:
codegraph uninstallThis reverses the installer — stripping CodeGraph’s MCP server config, instructions, and permissions from each configured agent. Your project indexes (.codegraph/) are left untouched; remove those per-project with codegraph uninit. Use --target to remove from specific agents, or --yes to run non-interactively.