Metadata-Version: 2.4
Name: intentdiff
Version: 0.1.1
Summary: A structure-aware Git diff that separates formatting, movement, refactoring, and meaningful edits.
Author: intentdiff contributors
License-Expression: MIT OR Apache-2.0
Project-URL: Homepage, https://github.com/harivilasp/intentdiff
Project-URL: Repository, https://github.com/harivilasp/intentdiff
Project-URL: Issues, https://github.com/harivilasp/intentdiff/issues
Keywords: diff,git,review,rust,cli
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Version Control :: Git
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE-MIT
License-File: LICENSE-APACHE
Dynamic: license-file

# 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

```bash
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:

```bash
cargo install intentdiff --locked
```

Requirements:

- Python 3.8+
- Rust/Cargo available on `PATH`, unless `INTENTDIFF_BINARY` points to a preinstalled native binary

If you already installed the native binary:

```bash
INTENTDIFF_BINARY=/path/to/intentdiff intentdiff --help
```

## Quick start

```bash
# 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_only`
- `comment_only`
- `documentation_only`
- `import_reorder`
- `moved_unchanged`
- `moved_modified`
- `probable_rename`
- `literal_changed`
- `operator_changed`
- `control_flow_changed`
- `textual_change`
- `binary_change`
- `unknown`

Every classification includes confidence and evidence in JSON output. The tool does not casually claim runtime behavioral equivalence.

## Example

```text
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.
