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.
-
Interactive TUI with AST-aware code folding
-
Sane defaults for AI coding
- Summarize long changes as pseudocode
- Collapse tests and docs
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 comparisonCLI and terminal UI (Apple Silicon macOS and x64 Linux):
brew install devdotfast/tap/diffrThe CLI, from crates.io (prebuilt via cargo-binstall, or compiled):
cargo binstall diffr-cli
cargo install diffr-cli --lockedFrom source: cargo xtask install (requires Rust and Bun).
diffr is a fork of the lovely difftastic(MIT, Wilfred Hughes) and its terminal UI from hunk (MIT, Modem Labs).
We forked difftastic because of the following 3 technical reasons:
- TUI affordance
- AST-based fold matching
- 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.
- 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.
- Run
- The plugin API is a bit awkward and will be simplified radically in the coming releases.
diffr has a powerful, wasm-based plugin API which customizes how it presents changed files. For more details, read the docs.
MIT. See LICENSE for the terms and NOTICE for the third-party work
diffr builds on, starting with the lovely
difftastic.

