devdotfast/diffr

Structural diffs with a streaming API and interactive terminal frontend

Rust

5

13 commits

updated Sep 24, 2026

See the code

See what people are saying

README

diffr

diffr is experimental and in alpha. API breakages are possible at any time, although we will do our best to warn you of them.

diffr is a Rust-based structural diffing (AST-aware) library. It is also packaged as a CLI with a built-in TUI, and it has a WASM plugin system for extensibility.

Features

  1. Interactive TUI with AST-aware code folding
  2. Sane defaults for AI coding
  • Summarize long changes as pseudocode
  • Collapse tests and docs
  1. WASM-based plugin system

Usage

diffr accepts the exact same arguments that git diff does.

diffr                         # index versus working tree
diffr --cached                # staged changes
diffr main...HEAD -- src/      # merge-base comparison

Installation

CLI and terminal UI (Apple Silicon macOS and x64 Linux):

brew install devdotfast/tap/diffr

The CLI, from crates.io (prebuilt via cargo-binstall, or compiled):

cargo binstall diffr-cli
cargo install diffr-cli --locked

From source: cargo xtask install (requires Rust and Bun).

History

diffr is a fork of the lovely difftastic(MIT, Wilfred Hughes) and its terminal UI from hunk (MIT, Modem Labs).

We forked difftastic(MIT, Wilfred Hughes) because of the following 3 technical reasons:

  1. TUI affordance
  2. AST-based fold matching
  3. Plugin System

We hope in the future that we can find some way to upstream some / all of these features. Obviously everyone works differently and this is quite an opinionated stance on things, so we imagine this may take time.

Known Limitations

  1. Semantic diff summarization is only supported for the Gemini class of models right now. Turn it on via: a. Through the TUI:
    • Run diffr config
    • Search for 'summarization'
    • Enable in the dropdown
    • Add your API key for Gemini if you don't already have on your path b. Through the Whiteboard app.
  2. The plugin API is a bit awkward and will be simplified radically in the coming releases.

Plugin API

diffr has a powerful, wasm-based plugin API which customizes how it presents changed files. For more details, read the docs.

License

MIT. See LICENSE for the terms and NOTICE for the third-party work diffr builds on, starting with the lovely difftastic.

difftastic
structural-diff
tree-sitter

Contributors

sidkmenon

7 commits

thesiti92

6 commits

devdotfast/diffr

Structural diffs with a streaming API and interactive terminal frontend

Rust

5

13 commits

updated Sep 24, 2026

See the code

See what people are saying

README

diffr

diffr is experimental and in alpha. API breakages are possible at any time, although we will do our best to warn you of them.

diffr is a Rust-based structural diffing (AST-aware) library. It is also packaged as a CLI with a built-in TUI, and it has a WASM plugin system for extensibility.

Features

  1. Interactive TUI with AST-aware code folding
  2. Sane defaults for AI coding
  • Summarize long changes as pseudocode
  • Collapse tests and docs
  1. WASM-based plugin system

Usage

diffr accepts the exact same arguments that git diff does.

diffr                         # index versus working tree
diffr --cached                # staged changes
diffr main...HEAD -- src/      # merge-base comparison

Installation

CLI and terminal UI (Apple Silicon macOS and x64 Linux):

brew install devdotfast/tap/diffr

The CLI, from crates.io (prebuilt via cargo-binstall, or compiled):

cargo binstall diffr-cli
cargo install diffr-cli --locked

From source: cargo xtask install (requires Rust and Bun).

History

diffr is a fork of the lovely difftastic(MIT, Wilfred Hughes) and its terminal UI from hunk (MIT, Modem Labs).

We forked difftastic(MIT, Wilfred Hughes) because of the following 3 technical reasons:

  1. TUI affordance
  2. AST-based fold matching
  3. Plugin System

We hope in the future that we can find some way to upstream some / all of these features. Obviously everyone works differently and this is quite an opinionated stance on things, so we imagine this may take time.

Known Limitations

  1. Semantic diff summarization is only supported for the Gemini class of models right now. Turn it on via: a. Through the TUI:
    • Run diffr config
    • Search for 'summarization'
    • Enable in the dropdown
    • Add your API key for Gemini if you don't already have on your path b. Through the Whiteboard app.
  2. The plugin API is a bit awkward and will be simplified radically in the coming releases.

Plugin API

diffr has a powerful, wasm-based plugin API which customizes how it presents changed files. For more details, read the docs.

License

MIT. See LICENSE for the terms and NOTICE for the third-party work diffr builds on, starting with the lovely difftastic.

difftastic
structural-diff
tree-sitter

Contributors

sidkmenon

7 commits

thesiti92

6 commits

Languages

Rust

74.6%

TypeScript

19.2%

JavaScript

2.3%

HTML

2.0%

Tree-sitter Query

1.3%