The GitHub repository code-review-graph is an open-source Python tool that helps AI coding assistants understand your codebase more efficiently. Instead of making an AI read thousands of files every time you ask a question, it builds a persistent knowledge graph of your project so the AI reads only the files that matter. This can dramatically reduce token usage and speed up code reviews, debugging, and architecture analysis.
- Without Code Review Graph: AI scans hundreds or thousands of files to answer a question.
- With Code Review Graph: AI already knows the relationships between files and reads only the relevant ones.
1. Smart Code Reviews
Instead of reviewing every changed file, it identifies the blast radius—the functions, files, and tests likely affected by a change.
payment.service.ts changed
↓
OrderService
InvoiceService
PaymentController
WebhookHandler
Payment TestsThis helps reviewers focus on the parts of the project that actually matter.
2. Huge Token Savings
One of its biggest goals is reducing AI token usage.
According to the project's benchmarks, graph-based queries can reduce context from hundreds of thousands of tokens to just a few thousand, depending on the repository and task.
3. Incremental Updates
After the first build, it doesn't re-index the whole project.
Instead, it updates only the files that changed, making refreshes much faster.
4. Semantic Search
Search using natural language, for example:
- "How does authentication work?"
- "Where is JWT implemented?"
- "Find payment logic."
The graph helps the AI locate the most relevant code instead of performing simple text searches.
5. Architecture Analysis:
It can automatically identify:
- Core modules
- Hub nodes
- Bridge nodes
- Connected components
- Community structure
This makes it easier to understand unfamiliar or very large projects.
6. Interactive Visualization:
The tool can generate an interactive graph showing how files and modules are connected.
Useful for:
- Learning a new project
- Explaining architecture
- Refactoring safely
7. Wiki Generation:
It can generate Markdown documentation from your project's structure, helping teams maintain internal documentation.
Supported Languages
The repository supports many languages, including:
- Python
- JavaScript
- TypeScript
- React
- Go
- Rust
- Java
- C/C++
- C#
- PHP
- Kotlin
- Swift
- Dart
- SQL
- Vue
- Svelte
- Astro
- Jupyter Notebooks
Supported AI Tools
It integrates with several AI coding assistants, including:
- Codex
- Claude Code
- Cursor
- GitHub Copilot
- Gemini CLI
- Continue
- Kiro
- Qwen
- OpenCode
and other MCP-compatible tools.
Install:
pip install code-review-graphConfigure your AI tool:
code-review-graph installBuild the graph:
code-review-graph buildCheck project status:
code-review-graph statusWatch for changes automatically:
code-review-graph watch