The token problem it targets
When a coding agent like Claude Code explores an unfamiliar repository, it spawns helper agents that scan files with grep, glob, and Read. Every one of those is a tool call, and every tool call spends tokens and latency. CodeGraph’s bet is that most of that exploration is rediscovering structure that could have been indexed once. It builds a semantic code graph ahead of time and serves it to your agent over MCP, so the agent queries an index instead of re-reading the tree.
The project reports the payoff as roughly 16% cheaper runs and about 58% fewer tool calls, and it runs 100% locally. Treat those as the maintainer’s measured figures rather than a guarantee for your codebase, but the mechanism is sound: a prebuilt graph is cheaper to query than a live filesystem crawl.
What makes it practical
- Local and self-contained. The index lives in a
.codegraph/directory in your project, and the CLI bundles its own runtime, so there is nothing to compile and no native build. - Wide agent support. One command wires the CodeGraph MCP server into Claude Code, Cursor, Codex CLI, opencode, Hermes Agent, Gemini CLI, Antigravity IDE, and Kiro.
- Reversible. A single uninstall command strips its MCP config from every agent it touched, and project indexes are removed separately, so adopting it is low-commitment.
Install
Grab the CLI with the OS-appropriate one-liner, no Node.js required:
# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/colbymchenry/codegraph/main/install.sh | sh
# Windows (PowerShell)
irm https://raw.githubusercontent.com/colbymchenry/codegraph/main/install.ps1 | iex
If you already run Node, npm i -g @colbymchenry/codegraph works on any version. The installer puts codegraph on your PATH but does not change your current shell, so open a new terminal before the next step.
Wire it up and index
The install of the CLI does not connect it to anything on its own. In a fresh terminal, run the agent installer, then index per project:
codegraph install
cd your-project
codegraph init -i
codegraph install detects and configures each supported agent. codegraph init creates the local .codegraph/ directory, and the -i flag also builds the initial graph in the same step; without it, run codegraph index afterward to populate it. Updates are in-place with codegraph upgrade, which detects how you installed.
The rough edges to know
CodeGraph runs a background daemon, and the most-discussed closed issues are about how that daemon behaves on the desktop: an annoying terminal window popping up, and on Windows, flashing black console windows from the daemon process. If you are on Windows especially, expect to have hit and worked through that class of issue, and check the tracker for your version. This is a pre-1.0 tool (v0.9.9 in June 2026) with 211 open issues as of 2026-06, so the core works while the edges are still being sanded. One more practical point: the graph is a snapshot of the code at index time, so as the codebase drifts you re-run codegraph index to refresh it, or the agent ends up querying a stale map.
It is also worth knowing the project has a hosted product coming (getcodegraph.com), so the open CLI sits alongside a future paid platform. Nothing forces you onto it, but that is the commercial shape to be aware of.
CodeGraph versus Understand Anything
| codegraph | Understand Anything | |
|---|---|---|
| Stars | 46,365 | 56,235 |
| Consumer | the agent, at runtime | the human, in a dashboard |
| Output | MCP-served index | interactive visual graph |
| Goal | fewer tool calls and tokens | learn an unfamiliar codebase |
Counts are from GitHub as of June 2026. Both build a knowledge graph of your code, but for different audiences. Understand Anything renders a visual dashboard for a person to explore and learn a codebase. CodeGraph feeds the graph to the agent so it spends less to do the same work. They are complementary more than competing: one helps you understand the code, the other helps your agent navigate it cheaply.
Related
CodeGraph plugs into the same agents that cc-switch helps you configure, and into Hermes Agent. For what else is climbing, see LLM tooling, the daily digest, and the weekly report.
FAQ
What does CodeGraph actually do? It pre-indexes your codebase into a semantic graph and serves it to coding agents over MCP, so they query the index instead of repeatedly grepping and reading files.
Is my code sent anywhere? No. The README states it runs 100% locally, with the index stored in a .codegraph/ directory in your project.
Which agents does it support? Claude Code, Cursor, Codex CLI, opencode, Hermes Agent, Gemini CLI, Antigravity IDE, and Kiro, all configured by codegraph install.
Why does a terminal window keep popping up? That is its background daemon, and it is among the most-reported issues, especially on Windows. Check the tracker for fixes on your version.