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
+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 firTop issues
#262Windows 11: MCP-based review is extremely slow while CLI graph operations are fast10 comments · 2026-04-13#1042Promotion gate: testing to main7 comments · 2026-09-18#436[Feature]: Add JSON & YAML for AST parser1 comments · 2026-05-06#63better-sqlite3 ABI mismatch crashes extension on WSL 2 — NODE_MODULE_VERSION 137 vs 1276 comments · 2026-03-25#721[Bug]: Hang at "INFO: Spring event resolver: indexed 0 events and emitted 0 CALLS edges"5 comments · 2026-07-23#620Bug: Codex installer generates Unix-only hooks on Windows4 comments · 2026-07-14#311How to configure code-review-graph for a workspace of sibling repos + worktrees (Claude Code in VS Code)?4 comments · 2026-04-17#209# Code-Review-Graph MCP Issue with Windsurf4 comments · 2026-04-10
Discussions
#1169New release date?0 comments · 2026-11-09#1136Can I use code-review-graph against a sub-repo?1 comments · 2026-10-26#1091Slow build ~40 minutes for 5000 files1 comments · 2026-10-05#965Move from Claude to Codex: will CRG still work?1 comments · 2026-09-09#732Claude Code - better instructions1 comments · 2026-07-24#724Differences from codegraph2 comments · 2026-07-23#719Is it working for team work?1 comments · 2026-07-23#695Proposal: a phased approach to improving JavaScript/TypeScript flow detection1 comments · 2026-07-21
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.