Evidence-backed codebase intelligence and change-impact analysis for AI coding agents
pip install repograph-codeintel==0.1.0 Copy PIP instructions
See what a code change touches — before you ship it. Local. No account, no API key, no code execution.
RepoGraph is a local code graph and change impact analysis tool for AI coding agents. It reads your repository, records what imports what, and answers one question:
"If I change this file, what else might break?"
You get the files, tests and routes that depend on it. Every item carries its evidence (file and line) and a confidence label. It also tells you what it could not see.
repograph index . repograph impact src/payments/refund.py Real output from the test fixture, with the route and documentation-mention lines removed for length:
changed files (1): src/shop/services/subscription.py changed symbols: 1 function cancel src/shop/services/subscription.py:6 direct dependents (4): [confirmed] src/shop/__init__.py (imports-changed-file at line 1) [confirmed] src/shop/api/routes.py (imports-changed-file at line 3) [confirmed] src/shop/services/billing.py (imports-changed-file at line 1) [confirmed] tests/test_subscription.py (imports-changed-file at line 1) transitive dependents: 1 [confirmed] depth 2 src/shop/app.py related tests (1): [inferred] tests/test_subscription.py (test-imports-changed-file, test-name-matches-changed-file, test-name-matches-dependent) blind spots: - repo-dynamic-imports (2): Dynamic imports exist in the repository; their runtime targets may include the changed files. - repo-parse-errors (1): Files with parse errors contribute no symbols or edges anywhere in the index. note: absence of static evidence is not evidence of safety. Python, TypeScript, JavaScript, JSX and TSX. Static analysis only. Alpha.
Python 3.10 or newer. Nothing else — no database server, no Docker, no cloud.
git clone https://github.com/INDEX0-RESEARCH-LABS/repograph.git cd repograph && python -m venv .venv && .venv/bin/pip install -e . .venv/bin/repograph version Not on PyPI yet. pipx install --editable . works too. Linux is tested in CI; macOS and Windows should work but are untested.
repograph init . # create .repograph/ repograph index . # build the map repograph status . # check what was found repograph impact src/app.py # ask what depends on it That is the loop. Re-index after you edit: repograph index . && repograph impact --diff.
If repograph is not found, activate the venv (source .venv/bin/activate). These commands only read files.
repograph tests --diff On pallets/click (44 test files), changing src/click/core.py:
run these (6, 14% of 44): [inferred] tests/test_context.py (test-imports-changed-file, test-name-matches-dependent) [inferred] tests/test_defaults.py (test-imports-changed-file, test-name-matches-dependent) [inferred] tests/test_deprecations.py (test-imports-changed-file, test-name-matches-dependent) [inferred] tests/test_parser.py (test-name-matches-dependent) [inferred] tests/test_shell_completion.py (test-imports-changed-file, test-name-matches-dependent) [inferred] tests/test_testing.py (test-name-matches-dependent) cannot rule out (0): reachable but not selected (37): tests/conftest.py tests/test_abort_interrupt.py tests/test_arguments.py ... --command prints only the pytest line, for CI. --strict exits 3 when a test cannot be ruled out or nothing was selected.
Measured, and the number is bad. On 22 one-function mutations across click, Flask and packaging, the selected set caught 41 of 180 failing test files (pooled recall 0.23, median 0.38) while selecting a median 6.7% of test files. Adding every disclosed "reachable but not selected" file catches 179/180 — but that is 98.9% of the suite, i.e. no saving. Details: research/TEST_SELECTION_GATE_RESULTS.md.
So treat this command as a disclosure aid, not a gate: it tells you some files a change reaches, and it names the ones it cannot justify selecting. It does not know which tests exercise which behaviour, and it will omit files that fail. Run the suite before trusting it.
One command registers the server and installs the instructions that make the agent actually use it:
repograph setup . It writes a project .mcp.json plus a Claude Code skill (and a Cursor rule when .cursor/ exists), shows the diff first, and backs up any file it changes. Add --client codex to register it in ~/.codex/config.toml; --dry-run writes nothing.
What breaks if I change the refund calculation?
Without the instructions an agent tends to keep grepping — a measured failure mode, not a guess. The skill tells it when the graph is the cheaper answer, in what order to call the tools, and to read blind_spots before acting.
repograph serve --root /path/to/your/project { "mcpServers": { "repograph": { "command": "repograph", "args": ["serve", "--root", "/absolute/path/to/your/project"] } } } Claude Code and Cursor accept this JSON shape. Use an absolute --root and put repograph on the client's PATH.
Security: serve --http has no authentication and binds to 127.0.0.1 by default. Do not expose it to an untrusted network.
Measured in October 2026 with a pre-registered protocol and two independent AI labelers, on three repositories never used to build the tool.
Method, raw samples and threats to validity: research/EDGE_ACCURACY_RESULTS.md.
One Linux machine, one run per project (Python 3.14.8, October 2026). Index step only.
Express is a known weak spot: its CommonJS export style yields few symbols from many files. The report says so instead of hiding it.
It is not a compiler, a type checker, a semantic search engine, or a replacement for tests.
.venv/bin/pip install -e '.[dev]' .venv/bin/python -m pytest 75 tests, 69% direct coverage, CI on Python 3.10, 3.12 and 3.13. The CLI and MCP server are tested through subprocesses, so coverage does not attribute those runs to their modules.
code-intelligence code-graph mcp change-impact dependency-graph static-analysis tree-sitter ai-agents
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
None of the files in this release were uploaded with provenance metadata.
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.




