Purpose
CodeGraph is aimed at AI coding agents and solves the inefficiency problem when agents understand code. In the traditional approach, agents need to repeatedly perform operations such as grep, glob, and Read file by file, manually reconstructing call paths and dependencies, resulting in a large number of tool calls and round trips. CodeGraph provides a prebuilt code knowledge graph, allowing agents to directly obtain the required source code, call paths between symbols (including dynamic dispatch jumps that grep cannot trace), and the impact scope of changes through a single query.
Main capabilities
- Prebuilt knowledge graph: Contains every symbol, call edge, and dependency relationship in the codebase, so agents can obtain precise context with a single call.
- Automatic sync: Automatic sync is enabled by default, monitoring project file changes and updating the graph. About 300ms after a file is saved, monitoring is triggered, and only changed content is synced without rescanning the entire directory tree.
- Multi-agent support: Supports Claude Code, Cursor, Codex CLI, opencode, Hermes Agent, Gemini CLI, Antigravity IDE, Kiro, and GitHub Copilot (VS Code, Copilot CLI, JetBrains IDE), automatically connecting the CodeGraph MCP server to each agent.
- Multi-language support: The parsing engine is a native Rust core and supports 20 languages: TypeScript, JavaScript, Java, Python, Go, C, C++, Rust, C#, Ruby, PHP, Swift, Kotlin, Scala, Dart, R, Lua, Luau (Metal and CUDA go through the C++ path).
- Framework route recognition: Detects web framework route files, generates route nodes, and links them to handler classes or functions through reference edges. When querying the callers of a view/controller, it can show the URL pattern that binds it.
- Mobile navigation edges: For frameworks such as iOS/React Native, generates navigates edges, linking the function that sends the user navigation to the target screen.
- 100% local: All processing is completed locally and does not depend on cloud services.
How to use
- Install the CLI: One command automatically obtains the correct build for the operating system, with no need for Node.js; the installer includes its own runtime.After installation, open a new terminal for the command to take effect. You can use
codegraph upgradeto upgrade,--checkto check for updates, andcodegraph upgrade <version>to pin a version. - Connect agents: In a new terminal, run the installer, which automatically detects and configures supported agents, connecting the CodeGraph MCP server to each agent. Shortcut:
npx @colbymchenry/codegraph. - Initialize a project: Run
codegraph initto create a local.codegraph/directory and build the complete graph. - Automatic sync: Enabled by default, no manual operation required.
- Uninstall: One command can remove CodeGraph from all configured agents and the CLI itself.
--keep-clionly removes agent configuration and keeps the CLI.
Applicable scenarios
Applicable to scenarios where AI coding agents need to understand large or cross-file codebases, especially when quickly answering architecture questions, tracing call paths, and assessing the impact scope of changes. It can also improve precision in small and medium-sized codebases and reduce the overhead of agents crawling file by file.
Limitations
- For long sessions and small context windows, the dense payload returned by CodeGraph occupies more resident context. In multi-turn sessions across 7 repositories, its responses left about 80% more retrieved context at the end of the session than file-by-file reading agents.
- CodeGraph is only effective when agents query it directly; its instructions guide agents to answer directly rather than delegating to subagents that read files, otherwise the subagents will still read files, and CodeGraph instead becomes extra overhead.
- Manual
codegraph synconly when the watcher is disabled (sandboxed environments orCODEGRAPH_NO_DAEMON=1) or when writing scripts outside of a proxy session. - Platforms without prebuilt binaries and files with syntax errors fall back to the reference engine on a per-file basis, with identical graph results.
- Specific charging and pricing information is not yet provided.