diffctx — what a git change reaches, and the code to review it
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
**diffctx tells an agent or a reviewer what a change reaches outside its
diff** — the callers, the tests that reach them, the contracts it crosses —
**and selects the code needed to understand it** under a token budget. Local,
deterministic, no index, no model calls. Caller resolution is static and per
language; where it cannot resolve, the answer says so instead of printing a
zero.
> Formerly published as treemapper — every command, flag, and API call works unchanged.
Install
pipx, pip, cargo, npm, Docker, Scoop, other MCP clients and the Python API:
integrations.
Usage
--diff takes a git range, staged, or a duration window ending now (24h,
90min, 2w). Every flag, default and exit code:
command-line reference.
How it compares
Whole-repo packers export everything; code-graph servers answer queries
against a maintained index. diffctx is **diff-seeded**: the input is a change,
the output is what it touches and what explains it. Measured results, and when
the other two fit better: COMPARISON.md.
More
- Documentation site — the pipeline end to end
- Command-line reference — rendered from diffctx --help
- Integrations — install, MCP clients, Python API
- FAQ — heuristic or oracle, ignore rules, monorepos, secrets
- Token counting — --budget for non-GPT models
- GitHub Action — diff context as a CI step
- Benchmarks and the paper
- Changelog · Security
- Parameter strategy
Apache 2.0