whatisgithub

What is code-review-graph?

tirth8205/code-review-graph — explained in plain English

Analysis updated 2026-06-24

16,360PythonAudience · developerComplexity · 3/5Setup · moderate

In one sentence

A Python tool that maps your codebase as a knowledge graph so AI coding assistants like Claude Code or Cursor only read the files they actually need, cutting token costs and making code reviews faster and more focused.

Mindmap

mindmap
  root((code-review-graph))
    What It Does
      Maps codebase structure
      Finds blast radius
      Feeds AI only relevant files
    How It Works
      Tree-sitter parsing
      SQLite graph storage
      Git hook re-indexing
    AI Tool Support
      Claude Code
      Cursor and Windsurf
      GitHub Copilot
      Gemini CLI
    Audience
      Developers
      Monorepo teams
      AI power users
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Cut AI code review token costs by automatically giving Claude Code or Cursor only the relevant files for each task

USE CASE 2

Find all callers, dependents, and tests affected by changing a function in a large monorepo in under 2 seconds

USE CASE 3

Connect the code graph to any MCP-compatible AI tool with a single pip install and auto-configure

USE CASE 4

Track code impact across 24 supported languages including Python, TypeScript, and Jupyter notebooks

What is it built with?

PythonSQLiteTree-sitterMCP

How does it compare?

tirth8205/code-review-graphtwintproject/twintlukas-blecher/latex-ocr
Stars16,36016,37316,374
LanguagePythonPythonPython
Setup difficultymoderatemoderatemoderate
Complexity3/52/52/5
Audiencedeveloperresearcherresearcher

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires Python 3.10+ and a compatible AI coding tool, auto-configures Claude Code, Cursor, and others on install.

So what is it?

code-review-graph is a Python tool that solves a specific problem with AI coding assistants: by default they re-read large chunks of your codebase every time you ask them to review or change something, which burns through a lot of tokens (the unit those models bill in). This project builds a structural map, a "knowledge graph", of your code once, keeps it up to date in the background, and then hands the AI just the slice of files that actually matter for the current task. Under the hood it uses Tree-sitter, a parsing library that understands code in many languages, to break your repository into nodes (functions, classes, imports) and edges (which function calls which, what inherits from what, which tests cover which code). The graph is stored in SQLite, and a "blast radius" query figures out, for any changed file, all the callers, dependents and tests that could be affected, so only that minimal set has to be read. A git hook re-parses just the changed files on every commit or save, which the README says keeps a 2,900-file project re-indexing in under two seconds. The graph is exposed to the AI assistant through the Model Context Protocol (MCP), and the install command auto-configures the integration for a long list of AI coding tools including Claude Code, Cursor, Codex, Windsurf, Zed, Continue, GitHub Copilot, Gemini CLI and others. It supports 24 languages plus Jupyter notebooks. You would use it when you work in a sizeable repository, especially a monorepo, and want your AI assistant's code reviews and edits to be cheaper, faster and more focused. Installation is via pip or pipx and requires Python 3.10+. The full README is longer than what was provided.

Copy-paste prompts

Prompt 1
How do I install code-review-graph and connect it to Claude Code so it automatically limits context to relevant files?
Prompt 2
Using code-review-graph, find all functions and tests affected by changing a specific module in my Python project
Prompt 3
Walk me through setting up code-review-graph with Cursor for a TypeScript monorepo, include the MCP configuration
Prompt 4
How does code-review-graph determine the blast radius of a code change and which files to include?
Prompt 5
Write a script that uses code-review-graph to list all callers of a given function across my entire codebase

Frequently asked questions

What is code-review-graph?

A Python tool that maps your codebase as a knowledge graph so AI coding assistants like Claude Code or Cursor only read the files they actually need, cutting token costs and making code reviews faster and more focused.

What language is code-review-graph written in?

Mainly Python. The stack also includes Python, SQLite, Tree-sitter.

How hard is code-review-graph to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is code-review-graph for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.