
code-review-graph
Builds a local map of your codebase so AI coding tools read only the files a change touches.
- Stars
- 32.6k
- Forks
- 3k
- Licence
- MIT
- Language
- Python
- Last update
- 8 days ago
- Type
- Dev tool
What it is
code-review-graph is a Python tool that scans a code repository with Tree-sitter and stores a graph of its functions, classes, imports and calls in a local database. AI coding assistants connected to it through MCP can then ask for a small set of relevant files instead of reading the whole project. The README says this is aimed at reducing the context an assistant needs during code reviews and on large repositories.
- Ask an assistant to build the graph for a project and then review a change using only affected files
- Run code-review-graph build from the CLI to parse a codebase
- Use the blast-radius view to see callers, dependents and tests affected by a change
- Keep the graph current with hooks, a pre-commit hook or watch mode
- Run uninstall with --dry-run to preview removing its integrations
Great for
- Developers who use an MCP-compatible AI coding assistant on a large repository
- Teams that want code reviews to focus on the files a change affects
- People who want the code map kept local rather than sent to a hosted service
- Users of supported tools such as Claude Code, Cursor or Codex who want automatic setup
Not ideal for
- Projects in languages outside the supported list, since parsing coverage is limited to the listed languages
- Users who do not use an MCP-compatible AI tool, since the main interface is through MCP
- Anyone expecting the token savings to hold exactly, since the README's numbers come from one 2026-08-02 snapshot and it says the repository has grown since
How to get it
- 1
Install with a package manager
You'll need: Python 3.10+
Install from PyPI
pip install code-review-graphConfigure detected AI coding tools
code-review-graph installBuild the graph for the current project
code-review-graph build - 2
Run it
- Install the package with pip or pipx.
- Run code-review-graph install to configure detected AI coding tools.
- Restart the editor or tool.
- Open the project and ask the assistant to build the code review graph.
- Run code-review-graph build if you prefer the CLI.
- 3
Get the most out of it
- Use --platform to configure a single tool when you do not want all detected tools set up
- Enable the pre-commit hook or watch mode so the graph stays current after edits
- Use uninstall --keep-data to remove integrations while keeping graph databases
- Check docs/COMMANDS.md and docs/USAGE.md for the full command and platform list
- Review the GitHub Action documentation if you want the graph used in CI
Downloads
Strengths
- Runs locally and stores the graph in a local database (SQLite, per the README's pipeline diagram)
- One install command configures many AI coding tools and reports which were detected
- Incremental updates re-parse only files whose SHA-256 hash changed, per the README
Trade-offs
- The token-reduction figures are from a single snapshot and the README says current numbers are larger
- Parsing is limited to the listed languages, with fallbacks where no Tree-sitter grammar exists
- Requires Python 3.10 or newer and depends on MCP-compatible tools to be useful
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| code-review-graph (this) | 32.6k | Dev tool | beginner | 8 days ago | Developers who use an MCP-compatible AI coding assistant on a large repository |
| codebase-memory-mcp | 48k | Dev tool | intermediate | 4 days ago | Developers who use an MCP-capable AI coding agent on a large codebase |
| Trail-Code | 11k | Dev tool | beginner | 4 days ago | Developers who use Claude Code, Cursor, Codex or similar agents on a medium or large repository |
| ECC | 295k | Dev tool | intermediate | 4 days ago | Developers who already use Claude Code and want a shared workflow for planning, testing and review |
| agents | 42.1k | Dev tool | beginner | 4 days ago | Developers who already use one of the listed AI coding tools and want ready-made specialist agents |
| loop-engineering | 11.7k | Learning resource | intermediate | 4 days ago | Developers who already use AI coding agents and want recurring repo chores like issue triage or CI checks |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.