Skip to Content
DocsQuick Start

Quick Start

Get DiffContext running on your repo in under a minute.

Installation

pip install diffcontext

Zero runtime dependencies in the core package.

For MCP integration (Claude Code / Cursor / Windsurf):

pip install "diffcontext[mcp]"

Requirements: Python 3.9+, zero runtime dependencies in the core package.

Your First Analysis

Index a Python repo

diffcontext index /path/to/project

First run: a few seconds. Subsequent warm runs: ~0.02s (content-addressed SQLite cache).

Find blast radius of a change

# "Who is affected if I change this function?" diffcontext blast --changed ./src/auth.py:validate_jwt

Compile LLM-ready context

diffcontext compile --changed ./src/auth.py:validate_jwt --max-tokens 8000

Or start from an actual git diff

diffcontext compile --ref HEAD~1

Get machine-readable output for scripts and agents

diffcontext compile --changed ./src/auth.py:validate_jwt --json

Check if the context is actually sufficient

diffcontext verify --ref HEAD~1 diffcontext verify --from-history 30 --calibrate

Symbol IDs are always ./relative/path.py:ClassName.method — no parentheses, no arguments.

What You’ll See

=== DIFFCONTEXT META === Repo symbols total : 648 Symbols IN context : 18 Symbols DROPPED : 630 ← you cannot see these Graph confidence : 100% ✓ Context tokens (code) : 5,644 Output tokens (full) : 7,012 ... DROPPED SYMBOLS (630) — scored but cut by token budget: - ./src/black/linegen.py:transform_line (score: 71) ...

Every function in the body is annotated with its callers and callees. Anything referenced but not included is tagged [NOT IN CONTEXT] — so the model knows the difference between “this function doesn’t exist” and “this function exists but wasn’t shown to me.”

Next Steps

  • Usage Guide — day-to-day workflows, symbol IDs, depth tuning
  • Architecture — how the pipeline works under the hood
  • Benchmarks — measured recall vs grep on real commit history
Last updated on