Overview
CodeGraph pre-indexes a codebase into a knowledge graph so a coding agent can ask one question instead of running a dozen greps. A single MCP tool call returns the verbatim source of the symbols involved, the call paths through them, and the blast radius of a change — the context an agent would otherwise assemble by reading files one at a time.
The indexer is a native Rust kernel that parses source with tree-sitter, extracting nodes (functions, classes) and edges (calls, imports), then resolves references: calls to definitions, imports to their sources, inheritance chains. Everything lands in a local SQLite database with FTS5 full-text search, and a file watcher on native OS events keeps the graph in sync as you edit. Nothing leaves the machine — there is no external service in the path.
It understands more than plain call graphs: it recognises routing patterns across 17 web frameworks, and bridges cross-language boundaries such as Swift↔Objective-C, the React Native bridge and Expo Modules. A browser viewer renders the graph interactively — callers, source, callees and entry points — which is also the quickest way to sanity-check what the agent is being told.
What it does
- Rust tree-sitter kernel indexing 30+ languages, from TypeScript, Python, Go and Rust to Swift, Kotlin, Solidity and Terraform
- One MCP call returns verbatim source, call flow and blast-radius impact instead of a grep-and-read loop
- Local SQLite storage with FTS5 full-text symbol search — no external service, fully offline
- File watcher on native OS events auto-syncs the graph after a debounce as you code
- Reference resolution: calls to definitions, imports to sources, inheritance chains
- Framework-aware route detection across 17 web frameworks, plus Swift↔Objective-C and React Native bridging
- Installer auto-detects agents — Claude Code, Cursor, Codex CLI, opencode, Gemini CLI, Antigravity, Kiro, GitHub Copilot and Hermes Agent
- Browser viewer showing callers, source, callees and entry points
Getting started
Install the binary, let the installer configure your agents, then build the index once per repository.
Install without Node
A shell installer for macOS and Linux, or PowerShell on Windows.
curl -fsSL https://raw.githubusercontent.com/colbymchenry/codegraph/main/install.sh | sh
# Windows (PowerShell)
irm https://raw.githubusercontent.com/colbymchenry/codegraph/main/install.ps1 | iexOr install with npm
If you already have Node on the machine.
npm i -g @colbymchenry/codegraphWire it into your agents and index the repo
`codegraph install` detects and configures supported agents; `codegraph init` builds the index once per repository; `codegraph ui` opens the browser viewer.
codegraph install
codegraph init
codegraph uiLet the watcher keep it fresh
After `init`, the file watcher tracks the project with native OS events and syncs changes after a short debounce, so you do not re-index by hand as you work.
Commands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Cut the exploration tool calls a coding agent makes on a large repository by giving it symbols and call paths directly
- Ask what a change would break before making it, using blast-radius impact analysis
- Keep code context fully local — the index is SQLite on disk, with no external service in the path
- Trace a request across a language boundary in a mobile codebase, such as Swift to Objective-C or a React Native bridge
How CodeGraph compares
CodeGraph alongside other open-source code indexing & search tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| CodeGraph | ★ 70.4k | A local code knowledge graph that answers an agent's question in one tool call |
| GitNexus | ★ 47.2k | Indexes a codebase into a knowledge graph of dependencies, call chains and execution flows, then exposes it to Claude Code, Cursor and Codex through MCP tools. |
| Claude Context | ★ 12.5k | An MCP server that indexes your codebase into a vector database so AI coding agents can find relevant code by meaning instead of loading whole folders. |
| Semble | ★ 6k | A CPU-only code search library and MCP server that indexes a repository with tree-sitter chunking, Model2Vec embeddings and BM25, so an agent retrieves the few relevant snippets instead of grepping and reading whole files. |