dimpact is a CLI for language-aware impact analysis from git diffs or explicit symbol seeds.
It maps changed lines to symbols, builds reference relationships, and reports what code is likely affected.
- Parse unified git diffs from stdin
- Detect changed symbols in Rust, Ruby, Python, JavaScript, TypeScript, TSX, Go, and Java
- Compute caller / callee impact from a diff or from seed symbols
- Output JSON, YAML, DOT, or HTML
- Generate Symbol IDs from file / line / name
- Persist analysis data with a local SQLite cache
- Use Tree-Sitter by default, with an LSP engine available when needed
cargo build --release
./target/release/dimpact --helpcargo install dimpact
dimpact --helpdocker pull ghcr.io/n01e0/dimpact:latest
docker run --rm ghcr.io/n01e0/dimpact:latest --helpIf you want to analyze the current repository from the container, mount the working tree at /work and pipe the diff on stdin:
git diff --no-ext-diff | docker run -i --rm -v "$PWD":/work ghcr.io/n01e0/dimpact:latest impact --direction callers --with-edges -f jsongit diff --no-ext-diff | dimpact diff -f jsongit diff --no-ext-diff | dimpact changed --lang auto -f jsongit diff --no-ext-diff | dimpact impact --direction callers --with-edges -f jsondimpact impact \
--seed-symbol 'rust:src/lib.rs:fn:foo:12' \
--direction callers \
-f jsondimpact id --path src/lib.rs --name foo --kind fn --rawdimpact schema --list
dimpact schema --id dimpact:json/v1/impact/default/summary_only/call_graph
dimpact schema resolve impact --per-seed --with-edges --with-propagationThe schema subcommand family is an inspection/help layer for JSON contracts. It does not rewrite the normal JSON payload shape.
That means:
dimpact diff -f jsonstill returns its top-level array payloaddimpact changed -f jsonstill returns its top-level object payloaddimpact impact -f jsonstill returns its top-level object payloaddimpact impact --per-seed -f jsonstill returns its top-level array payloaddimpact id -f jsonstill returns its top-level array payload
Normal JSON output does not embed _schema, json_schema, or data wrapper fields.
Use these commands to work with the schema layer directly:
dimpact schema --list— list the registered canonical schema ids and document pathsdimpact schema --id <schema-id>— fetch the concrete JSON Schema document for one iddimpact schema resolve <subcommand> ...— resolve the canonical profile/id/path that a JSON command corresponds to
Schema documents live under resources/schemas/json/v1/.
| Command | Purpose |
|---|---|
diff |
Parse unified diff input from stdin |
changed |
Resolve changed lines to symbols |
impact |
Compute callers / callees / both from diff or seeds |
id |
Generate Symbol IDs from file, line, and name |
schema |
List, resolve, and fetch registered JSON schemas |
cache |
Build, update, inspect, or clear the local cache |
completions |
Generate shell completion scripts |
--direction callers|callees|both--with-edges--max-depth N--engine auto|ts|lsp--seed-symbol LANG:PATH:KIND:NAME:LINE--seed-json <json|path|->-f json|yaml|dot|html
dimpact can persist symbols and reference edges in SQLite for faster repeated analysis.
dimpact cache build --scope local
dimpact cache stats --scope localDefault local cache path:
.dimpact/cache/v1/index.db
diff,changed, and diff-basedimpactexpect unified diff input on stdin.- Seed-based
impactdoes not require stdin. - Tree-Sitter is the default engine.
- LSP mode is available via
--engine lsp.
For LSP graduation notes, strict-LSP workflow details, and design memos, see docs/.
MIT. See LICENSE.