Skip to content
nikolay-ePublic

About

Smart git diff context for LLMs and AI agents: budgeted fragment selection, deterministic, MCP server included

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

6 stars

Watchers

1 watching

Forks

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Latest commit

 

History

69 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

diffctx — what a git change reaches, and the code to review it

CI PyPI crates.io npm MCP Registry

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

# Claude Code: the MCP server, /diffctx:impact, and hooks that run it before commit and push
claude plugin marketplace add nikolay-e/diffctx
claude plugin install diffctx@diffctx

# any MCP client
claude mcp add diffctx -- uvx --from 'diffctx[mcp]' diffctx-mcp

# CLI, zero-install
uvx diffctx . --diff HEAD~1

pipx, pip, cargo, npm, Docker, Scoop, other MCP clients and the Python API: integrations.

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.

diffctx demo

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

Apache 2.0

About

Smart git diff context for LLMs and AI agents: budgeted fragment selection, deterministic, MCP server included

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

6 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages