CodeGraph builds a local map of your codebase so Claude Code stops burning on grep and reading file after file. Across 7 projects it cut tokens by 57% and cost by 35% on average, reaching 90% of tokens on Excalidraw.

What is Code Graph for?
Where does Code Graph cut tokens?
- Project memoryCLAUDE.md and notes, loaded every sessionCaveman
- Exploring codegrep, glob and reading file after fileGraphifyCode Graph
- Command outputLogs, tests and git output in the contextRust Token Killer
- RepliesThe words Claude writes backCaveman
How many tokens does Code Graph save?
- Load Caveman's instructions0
- Ask about a code flow157,800
- Ask about project structure123,000
- Run git status3,000
- Run cargo test25,000
- Run git diff21,500
- Claude explains a bug1,180
- Claude sets up a connection pool2,347
Is a 90% cut the typical result?
How does Code Graph work?
- Turn code into syntax treesThe result is deterministic, so the graph knows exactly which function calls which. Vector search only guesses from similarity.
tree-sitterBuilds ASTs for 20+ languages
- Nodes and edges in SQLiteEverything lives in .codegraph/, with no internet needed, and your source stays on your machine.
nodesFunctions and classesedgescalls, imports, inheritance
- One tool call over MCPThe agent gets entry points, related symbols and code snippets in one call.
codegraph_exploreFetches the structural context
- Three layers of syncThe main risk is the graph drifting from the code when a sync is interrupted. Run codegraph status now and then.
native watcherSpots file changes immediatelydebounced batchingUpdates after 2 quiet secondsstaleness flagTells the agent to read a just-edited file
How does Code Graph differ from the other tools?
When should you use Code Graph?
How do you install Code Graph?
curl -fsSL https://raw.githubusercontent.com/colbymchenry/codegraph/main/install.sh | sh
codegraph init -iOn macOS, run xcode-select --install first, or Code Graph falls back to a mode 5–10x slower. On WSL2, keep code on the Linux filesystem rather than /mnt/c/.
References
- colbymchenry/codegraph — GitHub
- I Cut Claude Code Exploration Time and Costs by 90% With One Tool — Colby McHenry (Medium)
- How to Reduce 90% of Claude Code Token Usage — John Kim (Push To Prod)
- CodeGraph: The Open-Source Knowledge Graph That Makes AI Coding Tools Dramatically Cheaper — KD Agentic (Medium)