Overview
code-review-graph builds a structural map of your codebase so AI coding tools can read only what matters. When an agent reviews a change, it can ask which callers, dependents and tests the change reaches, with a risk score, instead of scanning whole directories. The graph updates incrementally through hooks or watch mode.
Key capabilities
- Code graph: functions, classes, imports, calls and tests in one graph.
- Impact analysis: shows what a change can break, with a risk score.
- Incremental updates: re-parses only changed files.
- One-step install: detects your AI tools and writes their MCP config, hooks and skills.
- Clean uninstall: removes only its own files and entries, with a dry-run preview.
Tradeoffs
- The install writes config files (such as
.claude/and.mcp.json) into your repo; decide whether to commit them. - Needs Python 3.10+ even for JavaScript projects.
- The graph must be built before it helps, and kept fresh.
Ideal for
- AI-assisted code review on medium and large repos
- Cutting agent token use on big codebases
- Teams using several AI coding tools at once
Not ideal for
- Tiny projects
- Environments where you can't install Python tooling
Getting started
- Install with
pip install code-review-graph(orpipx install code-review-graph). Python 3.10+ is required. - Run
code-review-graph install. It detects your AI coding tools and writes their MCP config, hooks and skills; pass--platform cursor(or another name) to set up just one. - Run
code-review-graph buildto parse the codebase. - Ask your agent to review a change. To remove everything later, run
code-review-graph uninstall --dry-runfirst, thenuninstall.
Technical notes
- Install:
pip install code-review-graph, thencode-review-graph installandbuild - Storage: local SQLite
- License: MIT
- Source: tirth8205/code-review-graph
- GitHub stars: 32,729 (as of 2026-11-12)