diffctx — what a git change reaches, and the code to review it
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
diffctx is a command-line tool; the MCP server, the Claude Code plugin and the GitHub Action run the same engine.
CLI
uvx diffctx . --diff HEAD~1 # zero-install, run once via uv
pipx install diffctx # isolated CLI
pip install diffctx # into an active environment
cargo install diffctx # native binary from crates.io, no Python
npx diffctx . --diff HEAD~1 # npm wrapper over the native binary
docker run --rm -v "$PWD:/repo" ghcr.io/nikolay-e/diffctx . --diff HEAD~1
scoop bucket add diffctx https://github.com/nikolay-e/diffctx # Windows
scoop install diffctx/diffctx
The native binary — cargo, npm, Docker, Scoop and the
release archives for
Linux, macOS and Windows on x64 and ARM — answers --diff and --symbol in
every mode; whole-tree export, Markdown packs, diffctx graph and the MCP
server need the Python package.
Any MCP client
Registered as io.github.nikolay-e/diffctx.
claude mcp add diffctx -- uvx --from 'diffctx[mcp]' diffctx-mcp
codex mcp add diffctx -- uvx --from 'diffctx[mcp]' diffctx-mcp
gemini mcp add diffctx uvx -- --from 'diffctx[mcp]' diffctx-mcp
Cursor, VS Code, Claude Desktop, Windsurf, Zed, Continue and the Python API: integrations.
Claude Code plugin
The MCP server plus /diffctx:impact and hooks that run it on each commit and
push.
claude plugin marketplace add nikolay-e/diffctx
claude plugin install diffctx@diffctx
CI
The GitHub Action hands a pull request's diff context to any review step.
Usage
diffctx . --diff --mode impact # uncommitted work: callers outside the diff, their tests, contracts
diffctx . --symbol parse_config # the same for a name, no change needed
diffctx . --diff main...feature # the code to review a branch, packed under the auto budget
diffctx . --diff HEAD~1 --budget 12000 # the last commit, capped at 12k o200k tokens
diffctx . --diff 24h --mode locate # today's work as ranked JSON, no source bodies
diffctx . # whole-tree export, Markdown
--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 —
--budgetfor non-GPT models - Benchmarks and the paper
- Changelog · Security
- Parameter strategy
Apache 2.0
Metadata
Release files for diffctx 1.20.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| diffctx-1.20.0.tar.gz | 796.5 kB | With provenance | Details for diffctx-1.20.0.tar.gz |
Built distributions (wheels)
Total release size: 136.7 MB
Release files / diffctx-1.20.0.tar.gz
| Download URL | diffctx-1.20.0.tar.gz |
|---|---|
| Size | 796.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ca5247ae63e9eb49ae87ae58c958072bac35369d700677ea523c4a75ef7094e2
|
|
BLAKE2b-256 checksum How to use checksums |
7415624a891fdb1a88cdd12487207119e49b6b673050ca7fda31e5a58d9c0075
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / diffctx-1.20.0-cp314-cp314t-win_arm64.whl
| Download URL | diffctx-1.20.0-cp314-cp314t-win_arm64.whl |
|---|---|
| Size | 11.1 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading Windows ARM64 |
|
SHA-256 checksum How to use checksums |
b2b75d7ef088eeb31a2269448141eda61e02f3d388891d8f68d5612a4ba18fa1
|
|
BLAKE2b-256 checksum How to use checksums |
c08bca5fe3ad8102c80c631be3ea28266feb9bd7442c171eef3be34b8aeffaca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / diffctx-1.20.0-cp314-cp314t-win_amd64.whl
| Download URL | diffctx-1.20.0-cp314-cp314t-win_amd64.whl |
|---|---|
| Size | 11.5 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading Windows x86-64 |
|
SHA-256 checksum How to use checksums |
2b075eb5bf28cd004265c51c7edd17d09777176f2d71ea58497bf4ae1c08db64
|
|
BLAKE2b-256 checksum How to use checksums |
a4c1d8a9a531e68214b1862721d68019a6a4e51567b7c63a445e9929e590c0b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / diffctx-1.20.0-cp314-cp314t-manylinux_2_28_x86_64.whl
| Download URL | diffctx-1.20.0-cp314-cp314t-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 11.5 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
df8d2a8a6866b760cd87949eba953520092b6b300604cb55c6c8dc1635018fa6
|
|
BLAKE2b-256 checksum How to use checksums |
42625d447c20f03cc9e1410a8c05584f67cb96f62d9320dd5c59c6b42c83bf44
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / diffctx-1.20.0-cp314-cp314t-manylinux_2_28_aarch64.whl
| Download URL | diffctx-1.20.0-cp314-cp314t-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 11.1 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
4703f2251ff36038a86a4180297341e05b569cb955eb0c0393058cae22dc1ffc
|
|
BLAKE2b-256 checksum How to use checksums |
7425ea56ba8bbb0b17ebe3c1fda86975e528bb282ccc6dbfe1f7db2bc1e80b2c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / diffctx-1.20.0-cp314-cp314t-macosx_11_0_arm64.whl
| Download URL | diffctx-1.20.0-cp314-cp314t-macosx_11_0_arm64.whl |
|---|---|
| Size | 11.4 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
d20417a18b8f18b7b857990ecf13591f73cbadc2d0e4dbacbf9169f3cdd88dd9
|
|
BLAKE2b-256 checksum How to use checksums |
299163c29991f7c6be9f572ef0cd1d5088d64b673a6a972192040f4adf69e6ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / diffctx-1.20.0-cp314-cp314t-macosx_10_12_x86_64.whl
| Download URL | diffctx-1.20.0-cp314-cp314t-macosx_10_12_x86_64.whl |
|---|---|
| Size | 11.3 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
98de001156e45ffbf646386e970f8bd72badf3d58cdeed1d1e475db1c11c3261
|
|
BLAKE2b-256 checksum How to use checksums |
bfe4219edd028ab8681339aa183e8af5c160a12c4310e779778c30fe6b9347c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / diffctx-1.20.0-cp310-abi3-win_arm64.whl
| Download URL | diffctx-1.20.0-cp310-abi3-win_arm64.whl |
|---|---|
| Size | 11.1 MB |
| Tags | CPython 3.10 Windows ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
c50dbc57477a297d5c0b2393b92572f08e2dabbf31a986ff29d51b77ae62377c
|
|
BLAKE2b-256 checksum How to use checksums |
eb3475051a03bf094b2ca5f9cd86627e3f7cad074d51927fa829bf5968e075e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / diffctx-1.20.0-cp310-abi3-win_amd64.whl
| Download URL | diffctx-1.20.0-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 11.5 MB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
aa4880d94e33dd163e87b74358980a255c1a85f8d4a650cc86e007495badf787
|
|
BLAKE2b-256 checksum How to use checksums |
de08d253b00c7360489006bb729c16bc9fcd5be1879acfda09af322516546bfb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / diffctx-1.20.0-cp310-abi3-manylinux_2_28_x86_64.whl
| Download URL | diffctx-1.20.0-cp310-abi3-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 11.5 MB |
| Tags | CPython 3.10 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
ac02feaaf745f2ea0bb4a1e137fc265db78b62a981c19949351501c10fed8f37
|
|
BLAKE2b-256 checksum How to use checksums |
00d2006a492bd0982a3b127ce2ff2b097a518e75b5a87a4ed20013e28f919512
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / diffctx-1.20.0-cp310-abi3-manylinux_2_28_aarch64.whl
| Download URL | diffctx-1.20.0-cp310-abi3-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 11.1 MB |
| Tags | CPython 3.10 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
0552cea3e5258d411210baf9cb7e88818555757dacfe5718625bf958bc51a25e
|
|
BLAKE2b-256 checksum How to use checksums |
8dbd345b552a482f6738154600fce8ba2694b912ffe9ace0bf05431cb2e62f79
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / diffctx-1.20.0-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | diffctx-1.20.0-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 11.4 MB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
8b18d1e5c059880526d2eab08fe350a7ed6a492acc234310280ddf8c82962f1f
|
|
BLAKE2b-256 checksum How to use checksums |
1c603adbac3dc4a85405b79e09f2e68dc41e5069d2d16ef91c88e2d556687faf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / diffctx-1.20.0-cp310-abi3-macosx_10_12_x86_64.whl
| Download URL | diffctx-1.20.0-cp310-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 11.3 MB |
| Tags | CPython 3.10 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
4ea71c2f223118c0be66b1459a30ce3201b5b626d288c7ded4787b6c5a1ca623
|
|
BLAKE2b-256 checksum How to use checksums |
c99f8859f887594d697cc4f77b70ea14f802588cc5d76336d71d67aaf35eb9d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logSecurity for diffctx 1.20.0
Provenance
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.
Full provenance
All 13 files in this release have been uploaded with provenance metadata.
Attestation for diffctx-1.20.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logA note on package security
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.