A structure-aware Git diff that separates formatting, movement, refactoring, and meaningful edits.
Project description
intentdiff
intentdiff is a structure-aware Git diff for code review. It helps developers see what actually changed by separating formatting noise, moved code, probable renames, import reorders, comment/doc edits, and meaningful edits.
This PyPI package provides the intentdiff command for Python users.
Install
python -m pip install intentdiff
intentdiff --help
This package is currently a lightweight installer shim. On first run it installs the native Rust CLI with:
cargo install intentdiff --locked
Requirements:
- Python 3.8+
- Rust/Cargo available on
PATH, unlessINTENTDIFF_BINARYpoints to a preinstalled native binary
If you already installed the native binary:
INTENTDIFF_BINARY=/path/to/intentdiff intentdiff --help
Quick start
# unstaged Git changes
intentdiff
# staged changes
intentdiff --staged
# compare revisions
intentdiff main...HEAD
intentdiff HEAD~1 HEAD
# direct file comparison
intentdiff old.py new.py
# machine-readable output
intentdiff --format json
# CI-style check
intentdiff --check --meaningful-only
What it classifies
intentdiff produces explicit change events such as:
formatting_onlycomment_onlydocumentation_onlyimport_reordermoved_unchangedmoved_modifiedprobable_renameliteral_changedoperator_changedcontrol_flow_changedtextual_changebinary_changeunknown
Every classification includes confidence and evidence in JSON output. The tool does not casually claim runtime behavioral equivalence.
Example
Summary
5 files changed
1 meaningful edits
2 formatting-only changes
1 unchanged code moves
1 import reorders
Review first
Medium src/auth.rs:81
numeric literal set changed
Language support
v0.1 supports a focused initial set:
- Rust
- Python
- JavaScript
- TypeScript / TSX
- JSON
- YAML
- TOML
- Markdown
Malformed and unsupported files fall back to token or normalized textual comparison, so visible changes are retained.
Privacy and safety
By default, intentdiff:
- makes no network requests;
- collects no telemetry;
- does not execute project code;
- does not run formatters or external tools automatically.
The PyPI shim may invoke Cargo to install the Rust binary. The core CLI remains local-first.
More information
- GitHub: https://github.com/harivilasp/intentdiff
- crates.io: https://crates.io/crates/intentdiff
- PyPI: https://pypi.org/project/intentdiff/
Current limitation
This PyPI package is a shim in v0.1, not a bundled native wheel containing the Rust binary. Prebuilt platform wheels are planned.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file intentdiff-0.1.1.tar.gz.
File metadata
- Download URL: intentdiff-0.1.1.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e927e2bb96f81590e8068443843d078790c08164586dcc0f4543f758b3a66050
|
|
| MD5 |
e309338c8715640884b6124f019b727f
|
|
| BLAKE2b-256 |
7955343e3b7a4d9e69034f0b3680c2308caf966c35999294b1e1f19a516e98a5
|
File details
Details for the file intentdiff-0.1.1-py3-none-any.whl.
File metadata
- Download URL: intentdiff-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
519e7640f33de78035ef7d0f29e720e73376c67083aeb4dfd65cbe23fb3a9616
|
|
| MD5 |
6bd147b9e160b5e086faa0351ced055f
|
|
| BLAKE2b-256 |
83df6a3202e6d3a3e33b32f36bd0356886172c0426ba7ae89b16615d625ce703
|