
code-review-graph
github.com/tirth8205/code-review-graph- Category
- Developer Tools
- Rank
- No. 711Tools index
Previous survey · No. 719 ·
- Pricing
- Open Source
- Platform
- cli
- Type
- TOOL
- Builder
- tirth8205
- GitHub
- 31.7k stars
- Latest release
- v2.3.9
- Date
About
A local-first CLI and MCP server that parses codebases with Tree-sitter into a persistent graph of functions, classes, and dependencies, then computes 'blast-radius' analysis so AI coding assistants only read files affected by a change. Benchmarks show dramatic context reduction (e.g. 143,594 tokens down to 2,196 for a review task) and it auto-configures MCP integrations for tools like Cursor, Claude Code, Codex, and Windsurf.
What it does
It gives coding assistants a reusable structural memory of a repository. After indexing source, it can answer questions about callers, tests, execution paths, architecture, and likely change impact without repeatedly rediscovering those relationships. It supports interactive assistant queries, terminal workflows, continuous updates, visual exploration, and pull-request checks.
Why it's ranked here
This is a compelling choice for repeated reviews in substantial repositories. Its scope goes beyond search into impact tracing, risk ordering, test-gap detection, and cross-language relationships. The documentation also states important caveats: headline token comparisons use whole-corpus baselines, small changes can cost more context, and compiler-backed language servers remain more precise. That candor makes the claims easier to judge.
What's good
Core analysis stays on the machine, uses no telemetry, and needs no external service. Incremental indexing hashes files and reparses only changed material. Relationships carry confidence tiers, making heuristic results less opaque. Setup covers many assistant clients, while uninstall previews changes and preserves unrelated configuration. Teams can also run the same risk and test-gap analysis inside pull-request automation.
Tradeoffs
Call resolution is structural and heuristic, so dynamic dispatch, metaprogramming, and duck typing can create ambiguous or inferred links. Flow entry detection is currently strongest for Python patterns and needs work for JavaScript and Go. Small repositories, one-off questions, and trivial diffs may not repay indexing overhead. Conceptual search across prose and comments is weaker than dedicated semantic retrieval. Very large monorepo optimization remains planned.
How to use it well
Use it for recurring review work on repositories with hundreds or thousands of files, especially when changes cross modules, languages, or test boundaries. Keep the index fresh through hooks, watch mode, or incremental updates, then query impact before reading source. Add pull-request automation when risk summaries help reviewers. Keep language servers for exact symbol operations and semantic retrieval for conceptual documentation searches.
Technical notes+
pyproject.toml defines a Hatchling-built Python package requiring Python 3.10 or newer, with code_review_graph.cli:main and code_review_graph.daemon_cli:main as console entry points. Core dependencies include MCP, FastMCP, Tree-sitter, a Tree-sitter language pack, NetworkX, Watchdog, PyYAML, and conditional TOML support. docs/schema.md specifies SQLite tables for nodes, edges, flows, communities, full-text search, summaries, risk data, and embeddings; edges record confidence values and tiers. docs/COMMANDS.md documents CLI commands, 30 MCP tools, and five workflow prompts. docs/FAQ.md explicitly distinguishes its heuristic AST analysis from compiler-backed language servers and its structural traversal from similarity retrieval.
Observed
- License
- MIT
- Primary language
- Python
- Packaging
- Hatchling package published for pip or pipx installation; Python 3.10 or newer required
- Interfaces
- Command-line interface, standalone watch daemon, MCP server over standard input or localhost HTTP, and composite GitHub Action
- Storage and privacy
- SQLite graph stored locally; zero telemetry; core build, review, search, CLI, and MCP workflows run locally
- Language surface
- Built-in parsing spans many web, backend, systems, mobile, scripting, infrastructure, notebook, and single-file component formats; custom Tree-sitter grammars can be configured
- Testing structure
- Pytest is configured with tests as its test path, and development dependencies include pytest, asynchronous pytest support, and coverage tooling
Read from README.md, pyproject.toml, docs/FAQ.md, docs/INDEX.md, docs/LEGAL.md, docs/USAGE.md, docs/schema.md, docs/ROADMAP.md, docs/COMMANDS.md, docs/FEATURES.md, docs/REPRODUCING.md.
What it can do
Parse codebases into a graph of functions, classes, and dependencies using Tree-sitter
Source code files → Persistent code graph
Compute blast-radius analysis for a code change
Code change → List of affected files/functions
Expose blast-radius and context queries over MCP
MCP query → Relevant code context
Incrementally update the code graph as the codebase changes
Updated source files → Updated code graph
Tags
Tech Stack
Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.