Our take
- Activity
- 82
- Community
- 68
- Issues
- 56
- Pull requests
- 76
+669 stars in the last 30 days
- Merges more pull requests than 81% of the projects we track
- Releases more often than 80% of the projects we track
- More contributors than 78% of the projects we track
Project history
Daily GitHub snapshots since Oct 7, 2026. History covers stars and forks; health signals are not tracked historically.
Stars
32,629Forks
2,967Change since Nov 6, 2026: +17 stars·+2 forks
Overview
code-review-graph parses a repository into a graph of code entities and relationships, then uses that structure to identify relevant context for code reviews and other coding tasks. Its goal is to help AI coding tools focus on files and dependencies affected by a change rather than repeatedly reading broad sections of a codebase.
The graph is stored locally in SQLite and can be queried through MCP or the CLI. This is most useful when a change spans multiple files or dependency paths; for small repositories and simple, single-file edits, the extra graph context may not be worthwhile.
Key Features
- Extracts functions, classes, imports, calls, inheritance, and test relationships using Tree-sitter and other targeted parsers.
- Traces potential change impact through callers, dependents, and tests to help select review context.
- Updates the graph incrementally, with hooks and watch mode available to keep it current.
- Offers MCP tools for graph queries, review context, impact analysis, architecture overviews, and semantic search.
- Provides a CLI for building and updating graphs, inspecting changes, finding dead code, and exporting visualizations.
- Includes a GitHub Action that can post risk-scored pull request review comments.
- Supports many languages and notebooks, with custom language mappings available through configuration.
- Keeps graph data local by default; external embedding providers are optional.
Use Cases
- AI-assisted review of changes in large repositories, where developers need a focused view of affected code and tests.
- Assessing the possible impact of a refactor across callers and dependents before editing or merging.
- Exploring an unfamiliar codebase, where developers want an architecture overview or paths through connected code.
- Automating pull request risk summaries in CI for teams that want graph-based context on proposed changes.
Getting Started
Install the package and configure available AI coding tools:
pip install code-review-graph
code-review-graph install
code-review-graph build
See the README for platform setup, configuration, and command details.
Alternatives
- codegraph: CodeGraph emphasizes retrieving source and call paths for multiple agents, while code-review-graph focuses on targeted review context via MCP and CLI.
- codebase-memory-mcp: codebase-memory-mcp is an MCP server for architectural queries, while code-review-graph also offers a CLI for review context.
- GitNexus: GitNexus focuses on tracing dependencies and execution flows through CLI and MCP, while code-review-graph targets code-review context.
- graphify: Graphify also graphs documentation, schemas, and other project files, while code-review-graph focuses on code structure for review.
| Project | Language | License | Stars | Status |
|---|---|---|---|---|
| code-review-graph | Python | MIT | 31.9k | Not checked yet |
| codegraph | C | MIT | 73.1k | Active |
| codebase-memory-mcp | C | MIT | 45.7k | Active |
| GitNexus | TypeScript | Other | 47.7k | Active |
| graphify | Python | Apache-2.0 | 124k | Active |
Considerations
- Requires Python 3.10 or newer.
- A graph must be built before it can provide repository context. Build time depends on repository size, and keeping the graph current requires updates, hooks, or watch mode.
- The project notes that graph context can be more costly than reading a file for trivial, single-file changes. Search ranking and flow detection also have stated limitations, particularly for JavaScript and Go.
- The reported impact recall uses graph-derived ground truth and is described by the project as a circular upper bound. Its co-change evaluation is not yet a usable measurement.
- Local storage is the default, but cloud embedding providers are available as optional integrations and receive source-derived text when used.
Repository: tirth8205/code-review-graph · Project website
Found this useful?
Share it with someone who would like code-review-graph.