tirth8205/code-review-graphPublic

Local-first code intelligence graph for MCP and CLI. Builds a persistent map of your codebase so AI coding tools read only what matters, with benchmarked context reductions on reviews and large-repo workflows.

AI summary: A local-first code intelligence graph that drastically reduces LLM context windows for code reviews and large-repo tasks.

Stars
31.9K
+27 today
Forks
2.9K
Watchers
102
Open issues
92
Open PRs
57
Contributors
~138
Commits
1.2K
Branches
10

PythonMITCreated Feb 26, 2026Last push 16d agoLatest release v2.3.9+129 stars this week+758 this month

Quick answers

What is code-review-graph?
A local-first code intelligence graph that drastically reduces LLM context windows for code reviews and large-repo tasks.
What does code-review-graph do?
This tool constructs a persistent, incremental knowledge graph of your entire codebase to optimize how AI coding assistants interact with large repositories. It tackles the massive token cost and context-window limitations of standard LLM workflows by mapping dependencies, functions, and file structures using advanced static analysis. The technical engine utilizes Tree-sitter to rapidly parse code into an AST, which is then transformed into a searchable graph that tools via MCP or CLI can query. What sets it apart is its focus on context reduction; instead of dumping whole files into a prompt, it precisely feeds the LLM only the relevant graph nodes and execution paths. It is an essential utility for making AI-assisted code reviews fast, accurate, and cost-effective.
Who is code-review-graph for?
This tool is designed for software engineers, DevOps professionals, and developers building or using advanced AI coding assistants on large repositories. It requires familiarity with command-line tools and local development environments.
How do I get started with code-review-graph?
pip install code-review-graph && crg init
How popular is code-review-graph on GitHub?
tirth8205/code-review-graph has 31,898 stars and 2,917 forks on GitHub, and gained 129 stars in the last 7 days.
What license does code-review-graph use?
tirth8205/code-review-graph is released under the MIT license.

Star history

since Jul 29, 2026
010K20K30KJul 2026Aug 2026Sep 2026Oct 2026
31.9K stars as of Oct 3, 2026. Measured daily since Jul 29, 2026; GitHub no longer exposes earlier star timestamps.

Contribution activity

commits per day, last 52 weeks
OctNovDecJanFebMarAprMayJunJulAugSepMonWedFri2025-10-04: 0 commits2025-10-05: 0 commits2025-10-06: 0 commits2025-10-07: 0 commits2025-10-08: 0 commits2025-10-09: 0 commits2025-10-10: 0 commits2025-10-11: 0 commits2025-10-12: 0 commits2025-10-13: 0 commits2025-10-14: 0 commits2025-10-15: 0 commits2025-10-16: 0 commits2025-10-17: 0 commits2025-10-18: 0 commits2025-10-19: 0 commits2025-10-20: 0 commits2025-10-21: 0 commits2025-10-22: 0 commits2025-10-23: 0 commits2025-10-24: 0 commits2025-10-25: 0 commits2025-10-26: 0 commits2025-10-27: 0 commits2025-10-28: 0 commits2025-10-29: 0 commits2025-10-30: 0 commits2025-10-31: 0 commits2025-11-01: 0 commits2025-11-02: 0 commits2025-11-03: 0 commits2025-11-04: 0 commits2025-11-05: 0 commits2025-11-06: 0 commits2025-11-07: 0 commits2025-11-09: 0 commits2025-11-10: 0 commits2025-11-11: 0 commits2025-11-12: 0 commits2025-11-13: 0 commits2025-11-14: 0 commits2025-11-15: 0 commits2025-11-16: 0 commits2025-11-17: 0 commits2025-11-18: 0 commits2025-11-19: 0 commits2025-11-20: 0 commits2025-11-21: 0 commits2025-11-22: 0 commits2025-11-23: 0 commits2025-11-24: 0 commits2025-11-25: 0 commits2025-11-26: 0 commits2025-11-27: 0 commits2025-11-28: 0 commits2025-11-29: 0 commits2025-11-30: 0 commits2025-12-01: 0 commits2025-12-02: 0 commits2025-12-03: 0 commits2025-12-04: 0 commits2025-12-05: 0 commits2025-12-06: 0 commits2025-12-07: 0 commits2025-12-08: 0 commits2025-12-09: 0 commits2025-12-10: 0 commits2025-12-11: 0 commits2025-12-12: 0 commits2025-12-13: 0 commits2025-12-14: 0 commits2025-12-15: 0 commits2025-12-16: 0 commits2025-12-17: 0 commits2025-12-18: 0 commits2025-12-19: 0 commits2025-12-20: 0 commits2025-12-21: 0 commits2025-12-22: 0 commits2025-12-23: 0 commits2025-12-24: 0 commits2025-12-25: 0 commits2025-12-26: 0 commits2025-12-27: 0 commits2025-12-28: 0 commits2025-12-29: 0 commits2025-12-30: 0 commits2025-12-31: 0 commits2026-01-01: 0 commits2026-01-02: 0 commits2026-01-03: 0 commits2026-01-04: 0 commits2026-01-05: 0 commits2026-01-06: 0 commits2026-01-07: 0 commits2026-01-08: 0 commits2026-01-09: 0 commits2026-01-10: 0 commits2026-01-11: 0 commits2026-01-12: 0 commits2026-01-13: 0 commits2026-01-14: 0 commits2026-01-15: 0 commits2026-01-16: 0 commits2026-01-17: 0 commits2026-01-18: 0 commits2026-01-19: 0 commits2026-01-20: 0 commits2026-01-21: 0 commits2026-01-22: 0 commits2026-01-23: 0 commits2026-01-24: 0 commits2026-01-25: 0 commits2026-01-26: 0 commits2026-01-27: 0 commits2026-01-28: 0 commits2026-01-29: 0 commits2026-01-30: 0 commits2026-01-31: 0 commits2026-02-01: 0 commits2026-02-02: 0 commits2026-02-03: 0 commits2026-02-04: 0 commits2026-02-05: 0 commits2026-02-06: 0 commits2026-02-07: 0 commits2026-02-08: 0 commits2026-02-09: 0 commits2026-02-10: 0 commits2026-02-11: 0 commits2026-02-12: 0 commits2026-02-13: 0 commits2026-02-14: 0 commits2026-02-15: 0 commits2026-02-16: 0 commits2026-02-17: 0 commits2026-02-18: 0 commits2026-02-19: 0 commits2026-02-20: 0 commits2026-02-21: 0 commits2026-02-22: 0 commits2026-02-23: 0 commits2026-02-24: 0 commits2026-02-25: 0 commits2026-02-26: 14 commits2026-02-27: 13 commits2026-02-28: 0 commits2026-03-01: 0 commits2026-03-02: 0 commits2026-03-03: 1 commit2026-03-04: 0 commits2026-03-05: 0 commits2026-03-06: 8 commits2026-03-07: 0 commits2026-03-08: 0 commits2026-03-09: 10 commits2026-03-10: 2 commits2026-03-11: 0 commits2026-03-12: 0 commits2026-03-13: 2 commits2026-03-14: 0 commits2026-03-15: 0 commits2026-03-16: 0 commits2026-03-17: 22 commits2026-03-18: 0 commits2026-03-19: 0 commits2026-03-20: 27 commits2026-03-21: 0 commits2026-03-22: 0 commits2026-03-23: 0 commits2026-03-24: 0 commits2026-03-25: 0 commits2026-03-26: 24 commits2026-03-27: 4 commits2026-03-28: 3 commits2026-03-29: 0 commits2026-03-30: 1 commit2026-03-31: 32 commits2026-04-01: 0 commits2026-04-02: 0 commits2026-04-03: 6 commits2026-04-04: 3 commits2026-04-05: 2 commits2026-04-06: 13 commits2026-04-07: 5 commits2026-04-08: 9 commits2026-04-09: 5 commits2026-04-10: 2 commits2026-04-11: 27 commits2026-04-12: 3 commits2026-04-13: 1 commit2026-04-14: 12 commits2026-04-15: 2 commits2026-04-16: 1 commit2026-04-17: 4 commits2026-04-18: 30 commits2026-04-19: 32 commits2026-04-20: 0 commits2026-04-21: 2 commits2026-04-22: 1 commit2026-04-23: 4 commits2026-04-24: 1 commit2026-04-25: 0 commits2026-04-26: 4 commits2026-04-27: 7 commits2026-04-28: 2 commits2026-04-29: 3 commits2026-04-30: 7 commits2026-05-01: 6 commits2026-05-02: 1 commit2026-05-03: 5 commits2026-05-04: 3 commits2026-05-05: 2 commits2026-05-06: 0 commits2026-05-07: 7 commits2026-05-08: 2 commits2026-05-09: 1 commit2026-05-10: 9 commits2026-05-11: 2 commits2026-05-12: 0 commits2026-05-13: 0 commits2026-05-14: 0 commits2026-05-15: 0 commits2026-05-16: 0 commits2026-05-17: 0 commits2026-05-18: 0 commits2026-05-19: 0 commits2026-05-20: 0 commits2026-05-21: 0 commits2026-05-22: 0 commits2026-05-23: 0 commits2026-05-24: 0 commits2026-05-25: 23 commits2026-05-26: 0 commits2026-05-27: 0 commits2026-05-28: 2 commits2026-05-29: 0 commits2026-05-30: 5 commits2026-05-31: 0 commits2026-06-01: 0 commits2026-06-02: 2 commits2026-06-03: 0 commits2026-06-04: 0 commits2026-06-05: 1 commit2026-06-06: 0 commits2026-06-07: 1 commit2026-06-08: 0 commits2026-06-09: 0 commits2026-06-10: 21 commits2026-06-11: 1 commit2026-06-12: 0 commits2026-06-13: 0 commits2026-06-14: 5 commits2026-06-15: 2 commits2026-06-16: 0 commits2026-06-17: 0 commits2026-06-18: 4 commits2026-06-19: 0 commits2026-06-20: 0 commits2026-06-21: 0 commits2026-06-22: 0 commits2026-06-23: 1 commit2026-06-24: 2 commits2026-06-25: 2 commits2026-06-26: 2 commits2026-06-27: 0 commits2026-06-28: 0 commits2026-06-29: 0 commits2026-06-30: 3 commits2026-07-01: 0 commits2026-07-02: 0 commits2026-07-03: 1 commit2026-07-04: 0 commits2026-07-05: 0 commits2026-07-06: 0 commits2026-07-07: 0 commits2026-07-08: 0 commits2026-07-09: 0 commits2026-07-10: 0 commits2026-07-11: 0 commits2026-07-12: 0 commits2026-07-13: 0 commits2026-07-14: 1 commit2026-07-15: 0 commits2026-07-16: 0 commits2026-07-17: 73 commits2026-07-18: 2 commits2026-07-19: 1 commit2026-07-20: 3 commits2026-07-21: 2 commits2026-07-22: 2 commits2026-07-23: 2 commits2026-07-24: 9 commits2026-07-25: 23 commits2026-07-26: 10 commits2026-07-27: 25 commits2026-07-28: 15 commits2026-07-29: 9 commits2026-07-30: 23 commits2026-07-31: 2 commits2026-08-01: 4 commits2026-08-02: 6 commits2026-08-03: 0 commits2026-08-04: 0 commits2026-08-05: 1 commit2026-08-06: 1 commit2026-08-07: 5 commits2026-08-08: 3 commits2026-08-09: 0 commits2026-08-10: 0 commits2026-08-11: 1 commit2026-08-12: 0 commits2026-08-13: 5 commits2026-08-14: 2 commits2026-08-15: 0 commits2026-08-16: 0 commits2026-08-17: 0 commits2026-08-18: 0 commits2026-08-19: 13 commits2026-08-20: 1 commit2026-08-21: 4 commits2026-08-22: 1 commit2026-08-23: 0 commits2026-08-24: 1 commit2026-08-25: 0 commits2026-08-26: 0 commits2026-08-27: 1 commit2026-08-28: 0 commits2026-08-29: 0 commits2026-08-30: 0 commits2026-08-31: 0 commits2026-09-01: 0 commits2026-09-02: 0 commits2026-09-03: 0 commits2026-09-04: 0 commits2026-09-05: 0 commits2026-09-06: 0 commits2026-09-07: 0 commits2026-09-08: 0 commits2026-09-09: 0 commits2026-09-10: 0 commits2026-09-11: 0 commits2026-09-12: 43 commits2026-09-13: 0 commits2026-09-14: 17 commits2026-09-15: 14 commits2026-09-16: 36 commits2026-09-17: 16 commits2026-09-18: 9 commits2026-09-19: 0 commits2026-09-20: 0 commits2026-09-21: 0 commits2026-09-22: 0 commits2026-09-23: 0 commits2026-09-24: 0 commits2026-09-25: 0 commits2026-09-26: 0 commits2026-09-27: 0 commits2026-09-28: 0 commits2026-09-29: 0 commits2026-09-30: 0 commits2026-10-01: 0 commits2026-10-02: 0 commits2026-10-03: 0 commits
853 commits in the last yearLessMore

Signals and awards

derived from tracked data
  • Widely adopted

    31,898 stars

  • Community-driven

    ~138 contributors

  • Well documented

    High community health score

  • Permissive license

    MIT

  • Continuous integration

    Automated checks passing

  • Repeat trending

    4 trending appearances

What code-review-graph does

This tool constructs a persistent, incremental knowledge graph of your entire codebase to optimize how AI coding assistants interact with large repositories. It tackles the massive token cost and context-window limitations of standard LLM workflows by mapping dependencies, functions, and file structures using advanced static analysis. The technical engine utilizes Tree-sitter to rapidly parse code into an AST, which is then transformed into a searchable graph that tools via MCP or CLI can query. What sets it apart is its focus on context reduction; instead of dumping whole files into a prompt, it precisely feeds the LLM only the relevant graph nodes and execution paths. It is an essential utility for making AI-assisted code reviews fast, accurate, and cost-effective.

This tool is designed for software engineers, DevOps professionals, and developers building or using advanced AI coding assistants on large repositories. It requires familiarity with command-line tools and local development environments.

  • Incremental Graph Building: updates the codebase map efficiently on every save, avoiding expensive full-repo rescans.
  • Tree-sitter Integration: leverages robust, multi-language static analysis to accurately map function calls and variable dependencies.
  • MCP Protocol Support: interfaces directly with the Model Context Protocol, allowing Claude and other agents to query the graph natively.
  • Targeted Context Extraction: reduces token usage by fetching only the specific code snippets relevant to a given query or PR.
  • Local-First Architecture: keeps all code analysis and graph storage entirely on the user's local machine for maximum security and speed.

Where teams use it

Optimized AI Code Review

Engineering teams use the graph to provide LLMs with the exact dependency context needed to accurately review complex Pull Requests.

Large Repository Navigation

Developers use the CLI to instantly trace execution paths and find function definitions across massive, monolithic codebases.

Token Cost Reduction

Organizations integrate the tool into their CI/CD pipelines to slash API costs by drastically reducing the size of prompts sent to AI models.

Agentic Refactoring

Autonomous coding agents query the MCP endpoint to understand architectural impact before suggesting wide-scale code changes.

Getting started: pip install code-review-graph && crg init

README

staging branch

code-review-graph

tirth8205%2Fcode-review-graph | Trendshift

A local code knowledge graph that gives AI coding tools precise review context over MCP.

English | 简体中文 | 日本語 | 한국어 | हिन्दी

PyPI Downloads Stars MIT Licence CI Python 3.10+ MCP Website Discord

Usage · Commands · FAQ · Troubleshooting · GitHub Action · Reproducing the benchmarks · Roadmap


AI coding tools often re-read large parts of a codebase to review a change. code-review-graph builds a structural map of the code with Tree-sitter, keeps it updated incrementally, and serves compact context over MCP, so the assistant reads only the files a change touches.

The Token Problem: reading flask's whole corpus costs 143,594 tokens, a graph answer costs 2,196 (65x fewer)


Quick Start

pip install code-review-graph          # or: pipx install code-review-graph
code-review-graph install              # detect installed AI coding tools and configure each one
code-review-graph build                # parse the codebase

install detects which AI coding tools you have, writes an MCP server entry for each, installs hooks and skills where the platform supports them, and adds graph instructions to the platform's rules file. The MCP entry uses poetry run or uv run inside a Poetry or uv project environment, uvx code-review-graph serve when uvx is on PATH, and otherwise the current Python interpreter. Restart the editor or tool afterwards.

One install, every platform: detects Codex, Claude Code, CodeBuddy Code, Cursor, Windsurf, Zed, Continue, OpenCode, Antigravity, Gemini CLI, Qwen, Qoder, Kiro, GitHub Copilot, GitHub Copilot CLI, and Hermes Agent

To configure one platform, pass --platform with one of codex, claude-code, cursor, windsurf, zed, continue, opencode, antigravity, gemini-cli, qwen, kiro, qoder, copilot, copilot-cli, codebuddy, or hermes:

code-review-graph install --platform cursor
code-review-graph install --platform codebuddy

Config file locations are listed in docs/USAGE.md. Requires Python 3.10+.

uninstall removes CRG-owned files and entries from a Git or SVN working tree and leaves other MCP servers, hooks, skills and JSONC comments alone. Run it from anywhere inside the tree. Shared config files are replaced atomically, so a failed write leaves the original intact.

code-review-graph uninstall --dry-run    # preview only
code-review-graph uninstall              # preview, confirm, apply
code-review-graph uninstall --yes        # apply without prompting
code-review-graph uninstall --all-repos  # also clean every registered repository
code-review-graph uninstall --keep-data  # remove integrations, keep graph databases
code-review-graph uninstall --keep-user-configs --repo .  # this project only

Then open the project and ask the assistant:

Build the code review graph for this project

Build time scales with repository size; a cold build of a ~3,000-file repository took about 40 seconds (measured). After that, hooks and watch mode keep the graph updated. If some files fail to parse, the result has status partial and names them in its summary; the CLI also prints a Warning: line on stderr, and those files keep their previous graph rows.

How It Works

How the assistant uses the graph: the user asks for a review, the assistant calls MCP tools, the graph returns blast radius and risk scores, the assistant reads only the affected files

The repository is parsed into ASTs with Tree-sitter and stored as a graph of nodes (functions, classes, imports) and edges (calls, inheritance, test coverage). At review time the graph is queried for the smallest set of files the assistant needs to read.

Architecture pipeline: Repository to Tree-sitter parser to SQLite graph to blast radius to minimal review set

Blast-radius analysis

When a file changes, the graph traces every caller, dependent and test that could be affected. The assistant reads those files instead of scanning the whole project.

Blast radius: a change to login() propagates to callers, dependents, and tests

Incremental updates

Hooks, the pre-commit hook and watch mode trigger incremental updates. The update diffs changed files, finds their dependents through the graph's import and call edges, and re-parses only the files whose SHA-256 hash changed. On a ~3,000-file project (django) a two-file edit re-indexes in about 2.5 seconds on the path the hooks use, of which ~1.4 s is process start-up; a no-op update costs only that start-up. See Incremental update latency.

Incremental update flow: a hook or watch update triggers a git diff, dependents are found through graph edges, and only files whose SHA-256 hash changed are re-parsed

Whole codebase or targeted answer?

Instead of feeding a whole corpus to the model, the graph returns a slice shaped to the question. In the 2026-08-02 capture of this repository at 84bde354, 208,821 source tokens became ~3,190 tokens per question. The repository has grown a lot since that snapshot, so both numbers are larger today.

code-review-graph at the 84bde354 snapshot: 208,821 source tokens funnel down to ~3,190 token graph responses, about 65x fewer tokens per question

Language coverage and notebooks

Language coverage by category: Web, Backend, Systems, Mobile, Scripting, Shells, Domain, and Other, plus Jupyter and Databricks notebooks

The parser extracts functions, classes, imports, call sites, inheritance and tests, using Tree-sitter where a grammar exists and targeted fallbacks elsewhere. Supported: Python, JavaScript/TypeScript/TSX, Go, Rust, Java, C/C++, C#, VB.NET, Ruby, Kotlin, Swift, PHP, Scala, Solidity, Dart, R, Perl, Lua/Luau, Objective-C, shell scripts, Elixir, Zig, PowerShell, Julia, ReScript, GDScript, Nix, Verilog/SystemVerilog, SQL, Terraform/OpenTofu (.tf; other .hcl files become file nodes only), Ansible YAML (playbooks, roles, tasks), Spring Boot application config (application.properties, application.yml, application.yaml and their application-<profile> variants; key names and value types only, never values), Vue/Svelte SFCs, Astro files (parsed with the TypeScript grammar), Jupyter and Databricks notebooks (.ipynb), and Perl XS files (.xs). Other YAML and other .properties files are not treated as source code.

PHP projects also get repository-bounded Composer PSR-4 resolution, Blade template references, and Laravel Route and Eloquent edges when the source shows explicit framework imports, model inheritance and receiver evidence.

Java projects get Spring dependency-injection call resolution, request endpoints and WebFlux routes, scheduled triggers, application-event publisher-to-listener edges, and Temporal workflow and activity edges. Each resolver runs after the parse and needs the injected field, published event or workflow stub to be visible in the repository.

Add your own language

If your repository uses a language the parser does not cover, add a languages.toml to .code-review-graph/ that maps file extensions to any grammar bundled in tree_sitter_language_pack, plus the node types for functions, classes, imports and calls:

[languages.erlang]
extensions = [".erl"]
grammar = "erlang"
function_node_types = ["function_clause"]
class_node_types = ["record_decl"]
import_node_types = ["import_attribute"]
call_node_types = ["call"]

The generic tree-sitter walker does the extraction. Built-in languages cannot be overridden. See docs/CUSTOM_LANGUAGES.md for the schema, validation rules and a worked example.

Risk-scored PR reviews in CI (GitHub Action)

The same analysis runs as a composite GitHub Action. The graph is built and queried on your CI runner; no source code is sent to an external service. On each pull request the action posts one sticky comment with risk-scored functions, affected execution flows and test gaps, updated in place on every push. The optional fail-on-risk input turns it into a merge gate.

# .github/workflows/code-review-graph.yml
on:
  pull_request:

permissions:
  contents: read
  pull-requests: write

jobs:
  review:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - uses: tirth8205/[email protected]
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}

See docs/GITHUB_ACTION.md for inputs, risk levels and caching, or the workflow this repository runs on itself in .github/workflows/pr-review.yml.


Benchmarks

Benchmarks across 6 repositories: ~63x median per-question token reduction (358x max), 0.69 average impact F1 against graph-derived ground truth

The median per-question token reduction across the 6 repositories is about 63x (whole-corpus baseline vs graph query). The 358x maximum is one repository (fastapi, the largest corpus), not the typical result.

All numbers come from the evaluation runner against 6 open-source repositories (13 commits). Every config pins an upstream SHA, Leiden runs with a fixed seed, and embeddings are deterministic on CPU, so two runs on different machines produce the same numbers. The reproduction recipe is in docs/REPRODUCING.md. A weekly report-only run on the two smallest configs lives in .github/workflows/eval.yml.

Token efficiency: ~63x median per-question reduction (range 35x to 358x; whole-corpus vs graph query)

For a typical agent question ("how does authentication work", "what is the main entry point", and so on), the graph returns ~2,200 to 3,900 tokens of search hits plus neighbour edges instead of every source file. The table averages the 5 sample questions defined in code_review_graph/token_benchmark.py.

Repo Snapshot SHA naive_corpus_tokens avg graph_tokens Reduction
fastapi 22381558 948,793 2,653 357.6x
flask a29f88ce 143,594 2,196 65.4x
code-review-graph 84bde354 208,821 3,190 65.5x
gin 5c00df8a 166,868 2,766 60.3x
httpx b55d4635 142,356 2,661 53.5x
express b4ab7d65 136,052 3,936 34.6x

Captured 2026-08-02 from clean clones at the pinned SHAs (crg 2.3.7, local all-MiniLM-L6-v2 embeddings). These numbers are lower than the 2026-05-25 capture they replace: node embedding text became richer, so avg graph_tokens rose in every repo. fastapi is measured at its current pin 22381558 rather than the retired 0227991a.

The Reduction column is naive_corpus_tokens / avg graph_tokens, so it divides out from the two columns beside it. The benchmark's own average_reduction_ratio averages the five per-question ratios instead, which always reads higher; those per-question figures are in docs/REPRODUCING.md.

The code-review-graph row is a snapshot, not a current measurement. The repository has grown since 84bde354, so its corpus and graph are both much larger today.

The whole-corpus baseline is an upper bound no real agent pays; an agent greps for identifiers and reads the best-matching files. The agent_baseline eval benchmark measures that case (a pure-Python grep over the corpus, top-3 files by match count, token-counted against the graph query cost). It writes evaluate/results/<repo>_agent_baseline_<date>.csv; no canonical capture has been published yet.

The formal token_efficiency benchmark measures a different scenario, the full get_review_context() JSON against only the changed-file content of a commit, and reports ratios below 1 for small commits because the response carries impact-radius edges and source snippets. The two benchmarks answer different questions; see docs/REPRODUCING.md.

Review and impact tools attach a compact context_savings estimate to their responses. The CLI shows the same figures in the Token Savings panel (see Usage below) and --verify compares them with OpenAI's cl100k_base tokenizer. Calibration across 222 sample files puts the estimate within about 1% of real tokens in aggregate (data).

Impact accuracy: 0.69 average F1 against graph-derived ground truth (recall 1.0 is a circular upper bound)

Blast-radius analysis recovers every file in the ground truth on all 13 evaluation commits. Read that as an upper bound, not as "100% recall": the ground truth (changed files plus files with call or import edges into them) comes from the same graph the predictor traverses. The lower precision is deliberate; flagging an extra file costs less than missing a broken dependency.

Repo Commits Avg F1 Avg Precision Recall (graph-derived upper bound)
httpx 2 0.863 0.785 1.0
code-review-graph 2 0.734 0.584 1.0
fastapi 2 0.697 0.539 1.0
express 2 0.667 0.500 1.0
flask 2 0.633 0.485 1.0
gin 3 0.609 0.439 1.0
Average 13 0.693 0.546 1.000

The benchmark also runs a co-change mode: the predictor is seeded with one changed file and graded against the other files the author touched in the same commit, which is evidence from git history rather than from the graph. Both modes appear in the result CSVs (ground_truth_mode column). In the 2026-08-02 capture co-change mode returned predicted_files = 0 on every graded commit, so it is not yet a usable measurement and no co-change number is quoted.

Build stats

From the same 2026-08-02 clean-room build at the pinned SHAs above. Embedding counts are lower than node counts because File nodes are not embedded. The code-review-graph row is that snapshot, not the repository as it stands now.

Repo Nodes Edges Embeddings
fastapi 6,287 32,036 5,159
express 1,990 19,492 1,849
gin 1,589 17,237 1,491
code-review-graph 1,446 9,094 1,354
flask 1,415 8,259 1,329
httpx 1,263 8,236 1,193

Limitations

  • Impact "recall 1.0" is circular. The historical ground truth comes from the same graph edges the predictor walks, so it is an upper bound by construction. The co-change mode is not yet a usable measurement.
  • Small single-file changes. Graph context can exceed a plain file read for trivial edits. The overhead is the structural metadata that makes multi-file analysis possible.
  • Search ranking. Keyword search usually finds the right result near the top, but ranking needs work. Express queries can return no hits because of module-pattern naming.
  • Flow detection. Entry-point detection is strongest for Python and PHP/Laravel. JavaScript and Go flow detection needs work.
  • Precision vs recall. Impact analysis is conservative. It flags files that might be affected, which means false positives in large dependency graphs.

Features

Feature Details
Incremental updates Re-parses only files whose hash changed. On a ~3,000-file repo a two-file edit takes ~2.5 s on the hook path (measured).
Language and notebook support See Language coverage above.
Framework-aware PHP parsing Repository-bounded Composer PSR-4 imports, Blade template references, evidence-gated Laravel Route-to-controller and Eloquent relationship edges
Framework-aware Java parsing Spring dependency-injection call resolution, request endpoints and WebFlux routes, scheduled triggers, application-event publisher-to-listener edges, Temporal workflow and activity edges, and Spring Boot config keys indexed without their values
Blast-radius analysis Which functions, classes and files are likely affected by a change
Auto-update hooks Editor hooks, a git pre-commit hook and watch mode update the graph as you work
Semantic search Optional vector embeddings via sentence-transformers, Google Gemini, MiniMax, Voyage AI, or any OpenAI-compatible endpoint (OpenAI, Azure, new-api, LiteLLM, vLLM, LocalAI)
Interactive visualisation D3.js force-directed graph with search, community legend toggles and degree-scaled nodes
Hub and bridge detection Most-connected nodes and chokepoints (betweenness centrality)
Surprise scoring Unexpected coupling: cross-community, cross-language, peripheral-to-hub edges
Knowledge gap analysis Isolated nodes, untested hotspots, thin communities
Suggested questions Review questions generated from bridges, hubs and surprises
Edge confidence Two-tier confidence (EXTRACTED/INFERRED) with float scores on edges
Graph traversal BFS/DFS from any node with configurable depth and token budget
Export formats GraphML (Gephi/yEd), Neo4j Cypher, Obsidian vault, JSON, and SVG (SVG needs matplotlib from the eval extra)
Token benchmarking code_review_graph/token_benchmark.py measures whole-corpus tokens against graph query tokens per question
Estimated context savings context_savings metadata (estimated, saved_tokens, saved_percent) on review, impact, detect-changes and architecture responses
Community auto-split Communities above 25% of the graph are split recursively with Leiden
Execution flows Call chains from entry points, sorted by weighted criticality
Community detection Leiden clustering with resolution scaled to graph size
Architecture overview Community-based architecture map with coupling warnings
Risk-scored reviews detect_changes maps diffs to affected functions, flows and test gaps
Custom languages New languages via .code-review-graph/languages.toml, no fork needed
GitHub Action Sticky risk-scored PR review comments in CI, with an optional fail-on-risk merge gate
Refactoring tools Rename preview, framework-aware dead code detection, community-driven suggestions
Wiki generation Markdown wiki from community structure
Multi-repo registry Register several repos and search across them
Multi-repo daemon crg-daemon watches several repos as child processes, with health checks and restart
MCP prompts 5 workflow templates: review, architecture, debug, onboard, pre-merge
Full-text search FTS5 hybrid search combining keyword and vector similarity
Local storage One SQLite file in .code-review-graph/; no external database or cloud service

Usage

Skills

install writes these four skills for the platforms that support them (Claude Code, Gemini CLI, CodeBuddy Code, Hermes Agent and Qoder). Ask for one by name.

Skill Description
explore-codebase Navigate and understand codebase structure using the knowledge graph
review-changes Perform a structured code review using change detection and impact
debug-issue Systematically debug issues using graph-powered code navigation
refactor-safely Plan and execute safe refactoring using dependency analysis

Qoder also gets build-graph, review-delta and review-pr from the repository's skills/ directory.

CLI reference
code-review-graph install          # Detect and configure all platforms
code-review-graph install --platform <name>  # One platform
code-review-graph uninstall --dry-run  # Preview removal of installed artifacts
code-review-graph build            # Parse the whole codebase
code-review-graph update           # Incremental update (changed files only)
code-review-graph status           # Graph statistics
code-review-graph watch            # Update on file changes
code-review-graph forget <path>    # Drop already-parsed files from the graph
code-review-graph dead-code        # Functions and classes with no callers or tests
code-review-graph visualize        # Interactive HTML graph
code-review-graph visualize --format json      # Export graph data as JSON
code-review-graph visualize --format graphml   # Export as GraphML
code-review-graph visualize --format svg       # Export as SVG (needs matplotlib)
code-review-graph visualize --format obsidian  # Export as Obsidian vault
code-review-graph visualize --format cypher    # Export as Neo4j Cypher
code-review-graph wiki             # Markdown wiki from communities
code-review-graph detect-changes --brief         # Risk panel + token savings (read-only)
code-review-graph detect-changes --brief --base main  # Against the merge base of main and HEAD
code-review-graph update --brief                 # Refresh graph + same panel
code-review-graph detect-changes --brief --verify  # Cross-check against tiktoken
code-review-graph register <path>  # Register repo in the multi-repo registry
code-review-graph unregister <path|alias>  # Remove repo from the registry
code-review-graph repos            # List registered repositories
code-review-graph daemon start     # Start the multi-repo watch daemon
code-review-graph daemon stop      # Stop the daemon
code-review-graph daemon status    # Daemon status and repos
code-review-graph eval             # Run evaluation benchmarks
code-review-graph serve            # Start the MCP server (stdio)
code-review-graph serve --http     # MCP over Streamable HTTP on localhost:5555

This is a selection. code-review-graph --help lists every command, and docs/COMMANDS.md documents their flags.

When detect-changes --base names a branch, the diff runs against the merge base of that branch and HEAD. Commit hashes and other revisions are used as given.

visualize --format svg needs matplotlib, which ships in the eval extra (pip install "code-review-graph[eval]"). The other export formats need no extra install.

JSON exports are written inside the local graph data directory, which Git ignores by default. They can contain absolute paths and code-structure metadata, so inspect an export before publishing it.

Token Savings panel: detect-changes --brief vs update --brief

Both commands print the same panel showing how many tokens the graph saved compared with handing the changed files to an agent raw. They differ in one thing: whether the graph is refreshed first.

┌─────────────────────── Token Savings ────────────────────────┐
│ Full context would be:     12,921 tokens                     │
│ Graph context used:           762 tokens                     │
│ Saved:                     12,159 tokens (~94%)              │
│ Breakdown: Functions 244 · Tests 191 · Risk 244 · Other 83   │
└──────────────────────────────────────────────────────────────┘
Command What it does When to use
detect-changes --brief Read-only. Queries the existing graph for the current changes and prints the panel. Most of the time; hooks or crg-daemon keep the graph fresh.
update --brief Re-parses the changed files into the graph first, then prints the same panel. After a rebase, a large change set, or whenever the graph may be stale.

Add --verify to either command to compare the figures with OpenAI's cl100k_base tokenizer (needs pip install tiktoken). The estimate is within about 1% of real tokens in aggregate; see docs/REPRODUCING.md.

The same context_savings metadata is attached to the JSON responses of the get_impact_radius, get_review_context, detect_changes and get_architecture_overview MCP tools.

Multi-repo daemon

If your editor does not support hooks (for example Cursor or OpenCode), or you want the graph kept fresh without editor integration, the daemon watches your repositories and updates their graphs. It ships with code-review-graph; no separate install.

# 1. Register the repos to watch
crg-daemon add ~/project-a --alias proj-a
crg-daemon add ~/project-b

# 2. Start the daemon (runs in the background)
crg-daemon start

# 3. Check on it
crg-daemon status                 # daemon and per-repo watcher status
crg-daemon logs --repo proj-a -f  # tail logs for one repo
crg-daemon stop                   # stop the daemon and all watchers

Also available as code-review-graph daemon start|stop|status|....

crg-daemon add writes to ~/.code-review-graph/watch.toml, which you can also edit directly:

[[repos]]
path = "/home/user/project-a"
alias = "proj-a"

[[repos]]
path = "/home/user/project-b"
alias = "project-b"

The daemon watches this file and starts or stops watcher processes as repos are added or removed. A health check every 30 seconds restarts dead watchers.

See docs/COMMANDS.md for the full config reference.

30 MCP tools

The assistant uses these once the graph is built.

Tool Description
build_or_update_graph_tool Build or incrementally update the graph
run_postprocess_tool Re-run flow detection, community detection and FTS indexing
get_minimal_context_tool Compact context (~100 tokens); call this first
get_impact_radius_tool Blast radius of changed files
get_review_context_tool Review context with structural summary
query_graph_tool Callers, callees, tests, imports, inheritance queries
traverse_graph_tool BFS/DFS traversal from any node with a token budget
semantic_search_nodes_tool Search code entities by name or meaning
embed_graph_tool Compute vector embeddings for semantic search
list_graph_stats_tool Graph size and health
get_docs_section_tool Retrieve documentation sections
find_large_functions_tool Functions, classes or files above a line-count threshold
list_flows_tool Execution flows sorted by criticality
get_flow_tool One execution flow
get_affected_flows_tool Flows affected by changed files
list_communities_tool Detected code communities
get_community_tool One community
get_architecture_overview_tool Architecture overview from community structure
detect_changes_tool Risk-scored change impact analysis
get_hub_nodes_tool Most-connected nodes
get_bridge_nodes_tool Chokepoints by betweenness centrality
get_knowledge_gaps_tool Structural weaknesses and untested hotspots
get_surprising_connections_tool Unexpected cross-community coupling
get_suggested_questions_tool Review questions generated from the analysis
refactor_tool Rename preview, dead code detection, suggestions
apply_refactor_tool Apply a previously previewed refactoring
generate_wiki_tool Markdown wiki from communities
get_wiki_page_tool One wiki page
list_repos_tool Registered repositories
cross_repo_search_tool Search registered repositories; repos limits the search to a subset

MCP prompts (5 workflow templates): review_changes, architecture_map, debug_issue, onboard_developer, pre_merge_check

Configuration

To exclude paths from indexing, create a .code-review-graphignore file in the repository root:

generated/**
*.generated.ts
vendor/**
node_modules/**

In git repositories only tracked files are indexed (git ls-files), so gitignored files are skipped. Use .code-review-graphignore to exclude tracked files or when git is not available. The default ignore list is in docs/USAGE.md.

Optional dependency groups:

pip install "code-review-graph[embeddings]"          # Local vector embeddings (sentence-transformers)
pip install "code-review-graph[google-embeddings]"   # Google Gemini embeddings
pip install "code-review-graph[communities]"         # Community detection (igraph)
pip install "code-review-graph[enrichment]"          # Python call-resolution enrichment (Jedi)
pip install "code-review-graph[eval]"                # Evaluation benchmarks and SVG export (matplotlib)
pip install "code-review-graph[wiki]"                # ollama client (not used by the current wiki generator)
pip install "code-review-graph[all]"                 # All optional dependencies

Environment Variables

Variable Description Default
CRG_GIT_TIMEOUT Timeout in seconds for Git operations (build, update, watch) 30
CRG_DISCOVERY_TIMEOUT Timeout in seconds for each Git command that discovers what changed, when a review tool or command was not given an explicit file list. Running out reports an error, never "no changes" 5, or CRG_GIT_TIMEOUT when you set that explicitly
CRG_DATA_DIR Directory for graph databases and generated artefacts -
CRG_HOOK_WORKTREES Set to 1 to let the pre-commit hook run in linked git worktrees -
CRG_EMBEDDING_MODEL Default model for local vector embeddings all-MiniLM-L6-v2
CRG_ACCEPT_CLOUD_EMBEDDINGS Set to 1 to suppress the cloud embedding egress warning -
CRG_ALLOW_REMOTE_CODE Allow HuggingFace models that require trust_remote_code=True 0
CRG_MAX_IMPACT_NODES Maximum nodes in impact analysis 500
CRG_MAX_IMPACT_DEPTH Search depth for blast-radius analysis 2
CRG_MAX_BFS_DEPTH Maximum depth for graph traversal 15
CRG_MAX_CHANGED_FUNCS Maximum changed functions analysed in one change report 500
CRG_MAX_TRANSITIVE_FRONTIER Maximum frontier size for transitive caller/callee expansion 50
CRG_CALLER_TEST_ROUTE_DEPTH Hops to walk up incoming CALLS when looking for a tested caller of an untested changed symbol. Reported as a note, never as coverage 2
CRG_CALLER_TEST_ROUTE_MAX_CALLERS Maximum callers examined while looking for that tested caller 500
CRG_TOOL_TIMEOUT Timeout in seconds for read-only MCP tools (0 disables). Does not bound the tools that write: build, postprocess, embed, wiki and apply-refactor 0
CRG_CHURN_WINDOW_DAYS Window for detect-changes --churn commit counts 90
CRG_LEIDEN_SEED Seed for Leiden community detection 42
CRG_RECURSE_SUBMODULES Include git submodules when set to 1, true or yes -
CRG_TOOLS Comma-separated allowlist of MCP tools to expose when serving -
GOOGLE_API_KEY API key for Google Gemini embeddings -
MINIMAX_API_KEY API key for MiniMax embeddings -
VOYAGE_API_KEY API key for Voyage embeddings -
CRG_VOYAGE_MODEL Model for Voyage embeddings voyage-code-3
CRG_VOYAGE_OUTPUT_DIMENSION Output dimension for Voyage embeddings 1024
CRG_VOYAGE_OUTPUT_DTYPE Output dtype for Voyage embeddings float
CRG_VOYAGE_BASE_URL Voyage embeddings endpoint https://api.voyageai.com/v1
CRG_VOYAGE_BATCH_SIZE Batch size for Voyage requests 100
CRG_VOYAGE_MIN_INTERVAL_SEC Minimum delay between Voyage requests 0
CRG_OPENAI_BASE_URL OpenAI-compatible embeddings endpoint -
CRG_OPENAI_API_KEY API key for OpenAI-compatible embeddings -
CRG_OPENAI_MODEL Model for OpenAI-compatible embeddings -
CRG_OPENAI_DIMENSION Pin the embedding dimension (v3 models support reduction) -
CRG_OPENAI_BATCH_SIZE Batch size for OpenAI-compatible requests 100
NO_COLOR Disable ANSI colours in the terminal -
CRG_SERIAL_PARSE Set to 1 to disable parallel parsing (for debugging) -

OpenAI-compatible embeddings (OpenAI, Azure, or a self-hosted gateway such as new-api, LiteLLM, vLLM, LocalAI, or Ollama in OpenAI mode) need no extra install. Set the variables and pass provider="openai" to embed_graph:

export CRG_OPENAI_BASE_URL=http://127.0.0.1:3000/v1     # or https://api.openai.com/v1
export CRG_OPENAI_API_KEY=sk-...
export CRG_OPENAI_MODEL=text-embedding-3-small          # whatever your gateway serves
# optional:
export CRG_OPENAI_DIMENSION=1536                        # pin dim (v3 models support reduction)
export CRG_OPENAI_BATCH_SIZE=100                        # lower for gateways with tight limits
                                                        # (e.g. Qwen text-embedding-v4 caps at 10)

The cloud-egress warning is skipped when the base URL points at localhost (127.0.0.1, localhost, 0.0.0.0, ::1).

Voyage embeddings need no extra install. Set VOYAGE_API_KEY and pass provider="voyage" to embed_graph; the default model is voyage-code-3:

export VOYAGE_API_KEY=pa-...
export CRG_ACCEPT_CLOUD_EMBEDDINGS=1
code-review-graph embed --provider voyage --model voyage-code-3

Model selection. Avoid -preview, -beta or -exp model IDs for an index you plan to keep; preview models can change weights (a different dimension forces a full re-embed) or be withdrawn. Prefer GA releases such as text-embedding-3-small / text-embedding-3-large (OpenAI), Qwen/Qwen3-Embedding-8B (self-hosted vLLM or LocalAI), or gemini-embedding-001 (native Gemini provider, which needs GOOGLE_API_KEY).

The embedding text is identifiers, signatures, structural context, and a bounded first-paragraph docstring or doc-comment summary. Function bodies are not sent. Graphs created before documentation extraction was added need one full code-review-graph build before re-embedding. Routine builds never refresh embeddings; to refresh after a build, pass both --embedding-provider and --embedding-model. Cloud providers receive this source-derived text and may charge for it.

Tool Filtering

CRG exposes 30 MCP tools by default. To limit the server to a subset, use --tools or the CRG_TOOLS environment variable:

# CLI flag
code-review-graph serve --tools query_graph_tool,semantic_search_nodes_tool,detect_changes_tool

# Environment variable
CRG_TOOLS=query_graph_tool,semantic_search_nodes_tool code-review-graph serve

The flag takes precedence over the variable. When neither is set, all tools are available. In an MCP client config:

{
  "mcpServers": {
    "code-review-graph": {
      "command": "code-review-graph",
      "args": ["serve", "--tools", "query_graph_tool,semantic_search_nodes_tool,detect_changes_tool,get_review_context_tool"]
    }
  }
}

FAQ and comparisons

Answers in docs/FAQ.md:

Troubleshooting

More cases, including Windows/WSL, are in docs/TROUBLESHOOTING.md.

pip / pipx cannot download hatchling (or Errno 9 / Bad file descriptor to PyPI)

Installing from a source tree (for example pipx install .) needs build dependencies from PyPI. If you see Could not find a version that satisfies the requirement hatchling after connection warnings, the Python in that terminal may not be able to open an HTTPS connection to pypi.org. This is seen most often in an editor's integrated terminal, and sometimes with a VPN, firewall or proxy.

  1. Run the same command from Terminal.app or iTerm instead of the editor's terminal.

  2. Install from a checkout with uv, which uses different download machinery:

    cd /path/to/code-review-graph
    uv tool install . --force
  3. For development in a clone, use uv sync and uv run code-review-graph ....

To diagnose: python3 scripts/diagnose_pypi_connectivity.py. If it prints FAILED, the problem is the network environment, not the package name.

Windows: Invalid JSON: EOF while parsing or MCP error -32000: Connection closed

Do not use a cmd /c wrapper in the Claude Code config. Point ~/.claude.json at the .exe directly and set UTF-8 through the config:

"code-review-graph": {
  "command": "C:\\path\\to\\your\\venv\\Scripts\\code-review-graph.exe",
  "args": ["serve", "--repo", "C:\\path\\to\\your\\project"],
  "env": { "PYTHONUTF8": "1" }
}

Contributing

git clone https://github.com/tirth8205/code-review-graph.git
cd code-review-graph
python3 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytest

Pull requests target staging (the default branch). Changes are promoted staging → testing → main, and releases are tagged from main. The first step runs once a day by itself when staging is green; promotion to main is never automatic. See CONTRIBUTING.md for the full flow.

To add a built-in language, edit code_review_graph/parser.py: add the extension to EXTENSION_TO_LANGUAGE and node type mappings to _CLASS_TYPES, _FUNCTION_TYPES, _IMPORT_TYPES and _CALL_TYPES. Include a test fixture and open a PR. For a language you only need in one repository, use languages.toml instead.

Licence

MIT. See LICENSE.


code-review-graph.com

pip install code-review-graph && code-review-graph install

View on GitHub

Recent activity

commits and pull requests

Releases and announcements

30 total
  1. v2.3.9v2.3.9Sep 18, 2026

    ## [2.3.9] - 2026-09-18 ### Added - `visualize` can draw a neighbourhood instead of the whole repository. The D3 page falls back to one bubble per community past 3000 nodes or 9000 edges, which a shallow clone of django (45,111 nodes, 397,762 edges) passes by 15x and 44x, so every serious codebase got the bubble view. Nine new flags seed a view and bound it: `--seed-symbol`, `--seed-file`, `--seed-changed` with `--seed-changed-base`, `--seed-flow`, `--path-from` and `--path-to` for a shortest path, and `--depth`, `--render-depth` and `--max-nodes` for how much is carried and drawn. Nodes outside the neighbourhood are absent from the payload rather than dimmed. A hop is a semantic edge (CALLS, IMPORTS_FROM, INHERITS, IMPLEMENTS, TESTED_BY, DEPENDS_ON); CONTAINS is structural and deliberately not a hop. Search, filters, community colouring, the flow selector and the keyboard shortcuts all keep working, and the default output is still one self-contained HTML file. The whole-repository view is unchanged when no seed flag is passed. - `cross_repo_search_tool` accepts `repos`, a list of registry aliases or folder names, to search only part of the registry.

  2. v2.3.8v2.3.8Aug 21, 2026

    Patch release. 85 merged pull requests since v2.3.7, most of them fixes from community reports. ## Watch mode stops going quiet `watch` was the weakest surface in 2.3.7, and three separate failures could leave the daemon reporting `ok` while the graph stopped updating: - OS watches are no longer registered inside ignored trees, so a Maven `target/` or a large `node_modules` cannot exhaust the inotify budget (#811). - Deleting and recreating a watched directory (`rm -rf src && mkdir src`, or two ordinary `git checkout`s) is recognized as a replaced directory rather than a dead watcher, on filesystems that change the inode and on those that hand the same one straight back. - A repository reached through a symlinked path is watched and indexed instead of silently dropping every event, through both `watch --repo` and `serve --auto-watch` (#892). ## One graph per repository, however you spell the root Every path-valued `--repo` is canonicalized at the CLI boundary, and the full build, incremental update and watch entry points each resolve their root. `.`, a relative path, a trailing slash, a symlinked path and an absolute path no longer split the graph or reconcile each other away.

  3. v2.3.7v2.3.7Jul 18, 2026

    ## code-review-graph 2.3.7 Maintainer-reconciliation release containing the verified work merged since v2.3.6. The four client-validation drafts remain excluded. No breaking changes. ### Highlights - expanded CLI-first workflows, CommonJS parsing, quiet/JSON output, enrichment, and dead-code analysis - broader Terraform, Ansible, VB.NET, SystemVerilog, Rust, PHP/Laravel, Julia, Python, C#, Java, Spring, and WebFlux graph coverage - bounded transitive test coverage, churn risk, weighted impact ranking, graph provenance, documentation-aware embeddings, and safe JSON export - safer uninstall and platform configuration, including CodeBuddy and official OpenCode contracts - hardened MCP concurrency, daemon lifecycle, Windows process handling, Git path parsing, ignore rules, community detection, and visualization layout - updated supported dependency and GitHub Action versions, plus secure fork-PR review handling - closed all three open high-severity CodeQL alerts ### Validation - release PR: 15/15 checks passed - merged main commit: 13/13 checks passed - wheel and source distribution built successfully with version 2.3.7 See [CHANGELOG.md](https://github.com/tirth8205/code-review-

  4. **Community-response release.** Built from a full audit of every open PR, issue, and discussion — community fixes merged with credit, verified defects fixed (including two open Windows bugs), benchmark claims made independently checkable, and the project's first self-hosted PR review bot: this repo now reviews its own pull requests with its own graph. ## Highlights - **Custom languages without forking** (#320): drop a `.code-review-graph/languages.toml` into your repo to index any grammar shipped by tree-sitter-language-pack. See [docs/CUSTOM_LANGUAGES.md](docs/CUSTOM_LANGUAGES.md). - **GitHub Action for risk-scored PR reviews**: builds/restores the graph from CI cache and posts a sticky review comment with risk table, affected flows, test gaps, and token savings. See [docs/GITHUB_ACTION.md](docs/GITHUB_ACTION.md). - **Honest benchmarks**: new `agent_baseline` benchmark (graph vs a realistic grep-and-read agent), failed eval runs excluded from aggregates instead of inflating them, non-circular co-change ground truth for impact accuracy, weekly report-only eval CI. README now leads with the ~82x median; 528x is the best case, not the headline. - **docs/FAQ.md**: vs LSP, vs RAG, vs

  5. **Real-time token savings, visible to humans.** The estimated context-savings metric introduced in 2.3.4 was JSON-only. In 2.3.5 it surfaces as a clean boxed panel on the CLI and is verifiable against a real tokenizer in one flag — so when you reach for `code-review-graph` to review a change, you can immediately *see* how much of your context window the graph just kept out. ![Token Savings demo](https://github.com/tirth8205/code-review-graph/raw/main/diagrams/context-savings-demo.gif) ## Highlights - 🪟 **Token Savings panel** on both `code-review-graph detect-changes --brief` and the new `code-review-graph update --brief`. Per-category breakdown (Functions / Tests / Risk / Other) that sums exactly to the graph response size. - ✅ **`--verify` flag** cross-checks the displayed numbers against OpenAI's `cl100k_base` tokenizer. Calibration shows the estimate stays within **+0.5%** of real GPT-4 tokens in aggregate across 222 mixed-language source files (data in `docs/REPRODUCING.md`). - 🔁 **Deterministic eval pipeline** — pinned upstream SHAs, full clones with `returncode` checks, fixed Leiden seed. Two contributors running the benchmark recipe on different machines on different d

Code frequency

additions and deletions
+74.3K-74.3KWeek of 2026-02-22: +10,701 linesWeek of 2026-02-22: -3,817 linesWeek of 2026-03-01: +108 linesWeek of 2026-03-01: -86 linesWeek of 2026-03-08: +3,609 linesWeek of 2026-03-08: -427 linesWeek of 2026-03-15: +17,882 linesWeek of 2026-03-15: -407 linesWeek of 2026-03-22: +18,169 linesWeek of 2026-03-22: -3,179 linesWeek of 2026-03-29: +3,619 linesWeek of 2026-03-29: -722 linesWeek of 2026-04-05: +13,446 linesWeek of 2026-04-05: -6,149 linesWeek of 2026-04-12: +18,291 linesWeek of 2026-04-12: -1,112 linesWeek of 2026-04-19: +4,147 linesWeek of 2026-04-19: -2,930 linesWeek of 2026-04-26: +5,979 linesWeek of 2026-04-26: -383 linesWeek of 2026-05-03: +1,590 linesWeek of 2026-05-03: -5,312 linesWeek of 2026-05-10: +2,005 linesWeek of 2026-05-10: -119 linesWeek of 2026-05-17: +0 linesWeek of 2026-05-17: -0 linesWeek of 2026-05-24: +7,177 linesWeek of 2026-05-24: -672 linesWeek of 2026-05-31: +407 linesWeek of 2026-05-31: -10 linesWeek of 2026-06-07: +5,698 linesWeek of 2026-06-07: -479 linesWeek of 2026-06-14: +1,216 linesWeek of 2026-06-14: -90 linesWeek of 2026-06-21: +1,202 linesWeek of 2026-06-21: -15 linesWeek of 2026-06-28: +962 linesWeek of 2026-06-28: -31 linesWeek of 2026-07-05: +0 linesWeek of 2026-07-05: -0 linesWeek of 2026-07-12: +21,952 linesWeek of 2026-07-12: -1,288 linesWeek of 2026-07-19: +8,987 linesWeek of 2026-07-19: -454 linesWeek of 2026-07-26: +12,504 linesWeek of 2026-07-26: -2,907 linesWeek of 2026-08-02: +1,458 linesWeek of 2026-08-02: -486 linesWeek of 2026-08-09: +526 linesWeek of 2026-08-09: -382 linesWeek of 2026-08-16: +10,955 linesWeek of 2026-08-16: -560 linesWeek of 2026-08-23: +8 linesWeek of 2026-08-23: -2 linesWeek of 2026-08-30: +0 linesWeek of 2026-08-30: -0 linesWeek of 2026-09-06: +5,711 linesWeek of 2026-09-06: -547 linesWeek of 2026-09-13: +74,319 linesWeek of 2026-09-13: -12,850 linesWeek of 2026-09-20: +0 linesWeek of 2026-09-20: -0 linesWeek of 2026-09-27: +0 linesWeek of 2026-09-27: -0 linesFeb 22, 2026Sep 27, 2026
+252.6K lines added, -45.4K removed over the last year.

Commits per week

last 52 weeks
920Week of 2025-10-04: 0 commitsWeek of 2025-10-11: 0 commitsWeek of 2025-10-18: 0 commitsWeek of 2025-10-25: 0 commitsWeek of 2025-11-01: 0 commitsWeek of 2025-11-09: 0 commitsWeek of 2025-11-16: 0 commitsWeek of 2025-11-23: 0 commitsWeek of 2025-11-30: 0 commitsWeek of 2025-12-07: 0 commitsWeek of 2025-12-14: 0 commitsWeek of 2025-12-21: 0 commitsWeek of 2025-12-28: 0 commitsWeek of 2026-01-04: 0 commitsWeek of 2026-01-11: 0 commitsWeek of 2026-01-18: 0 commitsWeek of 2026-01-25: 0 commitsWeek of 2026-02-01: 0 commitsWeek of 2026-02-08: 0 commitsWeek of 2026-02-15: 0 commitsWeek of 2026-02-22: 27 commitsWeek of 2026-03-01: 9 commitsWeek of 2026-03-08: 14 commitsWeek of 2026-03-15: 49 commitsWeek of 2026-03-22: 31 commitsWeek of 2026-03-29: 42 commitsWeek of 2026-04-05: 63 commitsWeek of 2026-04-12: 53 commitsWeek of 2026-04-19: 40 commitsWeek of 2026-04-26: 30 commitsWeek of 2026-05-03: 20 commitsWeek of 2026-05-10: 11 commitsWeek of 2026-05-17: 0 commitsWeek of 2026-05-24: 30 commitsWeek of 2026-05-31: 3 commitsWeek of 2026-06-07: 23 commitsWeek of 2026-06-14: 11 commitsWeek of 2026-06-21: 7 commitsWeek of 2026-06-28: 4 commitsWeek of 2026-07-05: 0 commitsWeek of 2026-07-12: 76 commitsWeek of 2026-07-19: 42 commitsWeek of 2026-07-26: 88 commitsWeek of 2026-08-02: 16 commitsWeek of 2026-08-09: 8 commitsWeek of 2026-08-16: 19 commitsWeek of 2026-08-23: 2 commitsWeek of 2026-08-30: 0 commitsWeek of 2026-09-06: 43 commitsWeek of 2026-09-13: 92 commitsWeek of 2026-09-20: 0 commitsWeek of 2026-09-27: 0 commitsOct 4, 2025Sep 27, 2026
853 commits in the last 52 weeks.

When work happens

weekday and hour
SunMonTueWedThuFriSat036912151821Sun 0:00 — 7 commitsSun 1:00 — 1 commitsSun 2:00 — 14 commitsSun 3:00 — 7 commitsSun 4:00 — 3 commitsSun 5:00 — 1 commitsSun 6:00 — 0 commitsSun 7:00 — 2 commitsSun 8:00 — 1 commitsSun 9:00 — 2 commitsSun 10:00 — 1 commitsSun 11:00 — 0 commitsSun 12:00 — 2 commitsSun 13:00 — 6 commitsSun 14:00 — 5 commitsSun 15:00 — 6 commitsSun 16:00 — 4 commitsSun 17:00 — 3 commitsSun 18:00 — 5 commitsSun 19:00 — 1 commitsSun 20:00 — 1 commitsSun 21:00 — 1 commitsSun 22:00 — 4 commitsSun 23:00 — 1 commitsMon 0:00 — 20 commitsMon 1:00 — 0 commitsMon 2:00 — 0 commitsMon 3:00 — 1 commitsMon 4:00 — 0 commitsMon 5:00 — 0 commitsMon 6:00 — 0 commitsMon 7:00 — 2 commitsMon 8:00 — 0 commitsMon 9:00 — 0 commitsMon 10:00 — 0 commitsMon 11:00 — 4 commitsMon 12:00 — 24 commitsMon 13:00 — 6 commitsMon 14:00 — 4 commitsMon 15:00 — 4 commitsMon 16:00 — 8 commitsMon 17:00 — 6 commitsMon 18:00 — 10 commitsMon 19:00 — 11 commitsMon 20:00 — 0 commitsMon 21:00 — 1 commitsMon 22:00 — 2 commitsMon 23:00 — 5 commitsTue 0:00 — 2 commitsTue 1:00 — 6 commitsTue 2:00 — 0 commitsTue 3:00 — 0 commitsTue 4:00 — 1 commitsTue 5:00 — 1 commitsTue 6:00 — 0 commitsTue 7:00 — 0 commitsTue 8:00 — 1 commitsTue 9:00 — 1 commitsTue 10:00 — 2 commitsTue 11:00 — 1 commitsTue 12:00 — 23 commitsTue 13:00 — 24 commitsTue 14:00 — 18 commitsTue 15:00 — 9 commitsTue 16:00 — 8 commitsTue 17:00 — 1 commitsTue 18:00 — 1 commitsTue 19:00 — 7 commitsTue 20:00 — 5 commitsTue 21:00 — 5 commitsTue 22:00 — 4 commitsTue 23:00 — 0 commitsWed 0:00 — 0 commitsWed 1:00 — 2 commitsWed 2:00 — 1 commitsWed 3:00 — 0 commitsWed 4:00 — 1 commitsWed 5:00 — 0 commitsWed 6:00 — 0 commitsWed 7:00 — 0 commitsWed 8:00 — 0 commitsWed 9:00 — 0 commitsWed 10:00 — 5 commitsWed 11:00 — 8 commitsWed 12:00 — 0 commitsWed 13:00 — 1 commitsWed 14:00 — 0 commitsWed 15:00 — 2 commitsWed 16:00 — 1 commitsWed 17:00 — 2 commitsWed 18:00 — 14 commitsWed 19:00 — 12 commitsWed 20:00 — 11 commitsWed 21:00 — 5 commitsWed 22:00 — 23 commitsWed 23:00 — 11 commitsThu 0:00 — 6 commitsThu 1:00 — 11 commitsThu 2:00 — 3 commitsThu 3:00 — 0 commitsThu 4:00 — 0 commitsThu 5:00 — 0 commitsThu 6:00 — 0 commitsThu 7:00 — 0 commitsThu 8:00 — 0 commitsThu 9:00 — 1 commitsThu 10:00 — 7 commitsThu 11:00 — 6 commitsThu 12:00 — 2 commitsThu 13:00 — 2 commitsThu 14:00 — 10 commitsThu 15:00 — 14 commitsThu 16:00 — 4 commitsThu 17:00 — 12 commitsThu 18:00 — 5 commitsThu 19:00 — 11 commitsThu 20:00 — 9 commitsThu 21:00 — 12 commitsThu 22:00 — 3 commitsThu 23:00 — 2 commitsFri 0:00 — 3 commitsFri 1:00 — 0 commitsFri 2:00 — 0 commitsFri 3:00 — 0 commitsFri 4:00 — 0 commitsFri 5:00 — 0 commitsFri 6:00 — 0 commitsFri 7:00 — 0 commitsFri 8:00 — 0 commitsFri 9:00 — 1 commitsFri 10:00 — 6 commitsFri 11:00 — 9 commitsFri 12:00 — 18 commitsFri 13:00 — 13 commitsFri 14:00 — 20 commitsFri 15:00 — 21 commitsFri 16:00 — 16 commitsFri 17:00 — 12 commitsFri 18:00 — 9 commitsFri 19:00 — 24 commitsFri 20:00 — 8 commitsFri 21:00 — 12 commitsFri 22:00 — 5 commitsFri 23:00 — 6 commitsSat 0:00 — 5 commitsSat 1:00 — 7 commitsSat 2:00 — 3 commitsSat 3:00 — 0 commitsSat 4:00 — 2 commitsSat 5:00 — 1 commitsSat 6:00 — 2 commitsSat 7:00 — 3 commitsSat 8:00 — 3 commitsSat 9:00 — 3 commitsSat 10:00 — 41 commitsSat 11:00 — 5 commitsSat 12:00 — 1 commitsSat 13:00 — 3 commitsSat 14:00 — 4 commitsSat 15:00 — 0 commitsSat 16:00 — 6 commitsSat 17:00 — 11 commitsSat 18:00 — 8 commitsSat 19:00 — 2 commitsSat 20:00 — 4 commitsSat 21:00 — 12 commitsSat 22:00 — 8 commitsSat 23:00 — 12 commits
Commit volume by weekday and hour (UTC). Larger dots mean more commits.

Who is committing

last 52 weeks
Maintainer commits852 (69%)
Community commits377 (31%)

1,229 commits in total over the last year.

DateListRankStars gained
Jul 22, 2026daily#15+4
Jul 21, 2026daily#19+3
Jul 19, 2026daily#21+5
Apr 12, 2026daily#23+220
  • public-apis/public-apis

    A collective list of free APIs

    486.1K stars · Python

  • donnemartin/system-design-primer

    Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.

    373.2K stars · Python

  • practical-tutorials/project-based-learning

    Curated list of project-based tutorials

    285.8K stars · Python

  • affaan-m/ECC

    The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

    272.8K stars · JavaScript

  • NousResearch/hermes-agent

    The agent that grows with you

    251.2K stars · Python

  • n8n-io/n8n

    Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

    206.7K stars · TypeScript