Cut AI code review token costs by automatically giving Claude Code or Cursor only the relevant files for each task
Find all callers, dependents, and tests affected by changing a function in a large monorepo in under 2 seconds
Connect the code graph to any MCP-compatible AI tool with a single pip install and auto-configure
Track code impact across 24 supported languages including Python, TypeScript, and Jupyter notebooks
Requires Python 3.10+ and a compatible AI coding tool, auto-configures Claude Code, Cursor, and others on install.
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.
← tirth8205 on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.