# code-review-graph: AI-Powered Code Intelligence for Smarter Reviews

This repository profile is provided by osrepos.com, an open source repository discovery platform.

Source: osrepos.com
Repository profile: https://osrepos.com/repo/tirth8205-code-review-graph
Generated for open source discovery and AI-assisted research.

code-review-graph is a local-first code intelligence graph that optimizes AI coding tools by building a persistent map of your codebase. It significantly reduces context for AI reviews and large-repo workflows, ensuring AI assistants read only the most relevant code. This leads to more efficient and cost-effective code analysis.

GitHub: https://github.com/tirth8205/code-review-graph
OSRepos URL: https://osrepos.com/repo/tirth8205-code-review-graph

## Summary

code-review-graph is a local-first code intelligence graph that optimizes AI coding tools by building a persistent map of your codebase. It significantly reduces context for AI reviews and large-repo workflows, ensuring AI assistants read only the most relevant code. This leads to more efficient and cost-effective code analysis.

## Topics

- ai-coding
- code-review
- knowledge-graph
- llm
- python
- static-analysis
- developer-tools
- code-intelligence

## Repository Information

Last analyzed by OSRepos: Thu Aug 06 2026 12:48:58 GMT+0100 (Western European Summer Time)
Detail views: 0
GitHub clicks: 0

## Safety Notice

OSRepos shares public repositories for knowledge and discovery only. Review source code, dependencies, licenses, and security implications before running or installing anything.

## Content

## Introduction

AI coding tools often face a challenge, they re-read extensive portions of your codebase for review tasks, leading to wasted tokens and slower performance. `code-review-graph` addresses this by providing a local-first code intelligence graph. It builds a persistent, structural map of your codebase using Tree-sitter, incrementally tracking changes and delivering precise context to your AI assistants via the Model Context Protocol (MCP). This ensures AI tools read only what is essential, significantly reducing context for reviews and large-repository workflows.

## Installation

Getting started with `code-review-graph` is straightforward. Python 3.10+ is required, and for the best experience, installing `uv` is recommended.

To install and set up:

bash
pip install code-review-graph                     # or: pipx install code-review-graph
code-review-graph install          # Automatically identifies and configures all supported platforms
code-review-graph build            # Parse your codebase


The `install` command intelligently detects your AI coding tools, writes the correct MCP configuration for each, and adds graph-aware instructions to your platform rules. Remember to restart your editor or tool after installation.

To target a specific platform:

bash
code-review-graph install --platform codex
code-review-graph install --platform cursor
code-review-graph install --platform claude-code


## Examples

Once the graph is built, you can interact with your AI assistant using natural language or dedicated slash commands.

A common prompt for your AI assistant would be:

Build the code review graph for this project


After the initial build, which takes about 10 seconds for a 500-file project, the graph can automatically update via watch mode and supported platform hooks.

You can also use specific slash commands within your AI coding environment:

*   `/code-review-graph:build-graph`: Create or rebuild the code graph.
*   `/code-review-graph:review-delta`: Review changes since the last commit.
*   `/code-review-graph:review-pr`: Perform a full PR review with blast-radius analysis.

The project also offers a rich CLI for direct interaction:

bash
code-review-graph update           # Incremental update (only changed files)
code-review-graph watch            # Auto-update on file changes
code-review-graph visualize        # Generate interactive HTML graph
code-review-graph detect-changes   # Risk-scored change impact analysis


## Why Use It

`code-review-graph` offers compelling advantages for developers working with AI coding tools:

*   **Massive Token Reduction**: Benchmarks show an average token reduction of approximately 65 times per query, with some cases reaching up to 376 times. This translates to significant cost savings and faster AI responses.
*   **Blazing Fast Incremental Updates**: Subsequent updates complete in less than 2 seconds, even for large projects, by only re-parsing changed files and their dependents.
*   **Extensive Language and Notebook Support**: It supports a wide array of languages including Python, JavaScript/TypeScript, Go, Rust, Java, C/C++, and many more, alongside Jupyter/Databricks notebooks.
*   **Deep Code Intelligence**: Features like blast-radius analysis, semantic search, community detection, architectural overviews, and risk-scored reviews provide unparalleled insights into your codebase.
*   **Seamless AI Integration**: With 30 MCP tools and 5 workflow templates (review, architecture, debug, onboard, pre-merge), it integrates effortlessly with popular AI coding assistants.
*   **Local-First Design**: All core graph storage is handled locally in a SQLite file within `.code-review-graph/`, eliminating the need for external databases or cloud services.

## Links

*   **GitHub Repository**: [https://github.com/tirth8205/code-review-graph](https://github.com/tirth8205/code-review-graph){target="_blank"}
*   **Official Website**: [https://code-review-graph.com](https://code-review-graph.com){target="_blank"}
*   **PyPI**: [https://pypi.org/project/code-review-graph/](https://pypi.org/project/code-review-graph/){target="_blank"}