tirth8205 /code-review-graph

Local-first code intelligence graph for MCP and CLI. Builds a persistent map of your codebase so AI coding tools read only what matters, with benchmarked context reductions on reviews and large-repo workflows.

★ 32,779⑂ 2,982👁 92⑃ 769● 400▤ 31
PythonMITCreated 2026-02-26code-review-graph.com
Download: v2.4.0v2.4.0 ↓2.4.02026-11-11
+14
Daily
+198
Weekly
+697
Monthly
32,779
stars
2,982
forks
92
watchers
769
prs
400
issues
31
releases

README

code-review-graph


  
    
  



  A local code knowledge graph that gives AI coding tools precise review context over MCP.


  English |
  简体中文 |
  日本語 |
  한국어 |
  हिन्दी



  
  
  
  
  
  
  
  
  



  Usage ·
  Commands ·
  FAQ ·
  Troubleshooting ·
  What's new ·
  Changelog ·
  GitHub Action ·
  Reproducing the benchmarks ·
  Roadmap ·
  All docs




AI coding tools often re-read large parts of a codebase to review a change. code-review-graph builds a structural map of the code with Tree-sitter, keeps it updated incrementally, and serves compact context over MCP, so the assistant reads only the files a change touches.


  


What it does

- Maps your code. Functions, classes, imports, calls and tests become one graph.
- Shows what a change can break. The callers, dependents and tests it can reach, with a risk score.
- Stays up to date. Hooks and watch mode parse again only the files that changed.
- Works with your AI tools. One install sets up each tool it finds.
- Stays on your machine. One SQLite file, no cloud service; cloud embeddings are opt-in.

---

 Quick Start

Requires Python 3.10+.

bash
uv tool install code-review-graph       or: pipx install / pip install code-review-graph
code-review-graph install               set up the AI coding tools found on this machine
code-review-graph build                 parse the codebase
code-review-graph detect-changes --brief   see what your last change touches


Restart the editor or tool, then open the project and ask the assistant:


Review my changes


Undo everything with code-review-graph uninstall (preview with --dry-run). If something does not work, run code-review-graph doctor: it checks the setup and changes nothing.


What install changes, and how to preview it first


install looks for AI coding tools on this machine and sets up only the ones it finds. For each it writes an MCP server entry, installs hooks and skills where the tool supports them, and adds graph instructions to its rules file. It then names the tools it did not find; add one anyway with install --platform NAME.

Nothing is written until install has listed the files it will change and you have answered its question about instruction files. With no terminal, as when an AI agent runs it, it takes the default answer, yes, and says so; --no-instructions skips those files. install --dry-run shows each change as a diff and writes nothing. Restart the editor or tool afterwards.

The MCP entry and every hook run the copy of code-review-graph that ran install. The MCP entry uses poetry run or uv run inside a Poetry or uv project, uvx when install itself ran from uvx or uv tool install, and otherwise the Python that ran install. Hooks name that Python (or uvx), and run the code-review-graph on PATH if it is gone. After an upgrade, run install again.

The files install writes, such as .claude/ and .mcp.json, stay visible to git in case your team commits them. Until git tracks them, build and reviews leave them out, so your fir

Top issues

Discussions

Latest release

v2.4.0 v2.4.0 2026-11-11
[2.4.0] - 2026-11-10

Two new platforms, MiMo Code and DeepSeek Harness, so install now supports
18. HTML, XSLT, Liquid, JSON and plain YAML files are indexed, and so are
.cjs and .kts files, which every build used to skip. The graph links calls,
imports and tests more carefully: a call it could not check no longer looks
like a real link, every call edge says how sure it is, calls to inherited
methods and imports of workspace packages are followed, and tests_for finds
Java, Ruby and PHP tests. The graph schema moves from 13 to 15. Several new
settings are off unless you turn them on. 

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON