Dffy: A fast terminal-native Git diff viewer, written in Rust
Rust-based terminal diff viewer dffy displays initial files from a 48MB Linux kernel patch in 9.5 milliseconds using background stream processing.
By Dillip Chowdary • Nov 16, 2026 • Source: github.com

At a glance
- Product
- dffy
- Language
- Rust
- License
- MIT
- First-screen latency
- 9.5ms for 48MB Linux kernel patch
- Pager memory
- 3.0MB while streaming 48MB patch
- Language syntax
- 18 languages supported
In this post
Developer Antonio Malucelli released dffy, an open-source terminal diff viewer written in Rust designed specifically for fast navigation across large software repositories up to the scale of the Linux kernel. According to github.com's report, the tool operates as a full-screen interactive interface showing a file tree on the left and split or unified diffs on the right, while automatically printing standard output when piped. Instead of computing an entire changeset up front, the application renders the earliest discovered files immediately and streams remaining calculations in the background.
This overview details dffy's design goals, architecture, installation steps, and benchmark results against competing command-line diff viewers. The tool targets engineers who work on substantial codebases or review git revisions over terminal sessions, including remote SSH workflows conducted from mobile devices.
01Background loading across large repositories
The utility was created to solve performance bottlenecks found in existing terminal viewers when handling massive patches. Alternatives like lumen rely on AI features, hunk runs on TypeScript via a JavaScript runtime, and tools such as diffs.com operate inside web browsers. In contrast, dffy provides a single native binary compiled in Rust that requires no external TUI framework.
Because calculations run asynchronously in the background, opening a 13,000-file changeset happens as rapidly as displaying a one-line modification. The custom rendering engine draws full frames in approximately 200 microseconds, allowing real-time navigation without screen lag. Repositories monitored with the watch flag rely on a single shared filesystem watcher to handle multiple open views efficiently.
02Layout adapting across local and SSH sessions
The interface features an interactive file tree, fuzzy file searching, syntax highlighting across 18 languages, and emphasized word-level changes. It automatically selects unified or split diff representations based on the current terminal width. Single-key shortcuts control navigation: n and N jump between modifications, f and F switch files, slash opens search, o initiates file finding, space opens the command palette, and q exits.
When operated over SSH connections from mobile phones, dffy maintains a frameless presentation with standard letter keybindings. Mouse text selection functions directly over remote sessions for quick clipboard operations. Users can customize displays using 16 built-in themes and a plain key-value configuration file located at ~/.config/dffy/config.
03Installation options and git command integration
Installation is supported across several package management channels and shell scripts:
Advertisement
Tech Pulse Daily
Get tomorrow's pulse first
Join engineers who read Tech Pulse before stand-up. Free, weekday mornings.
- Homebrew tap run brew install --cask amalucelli/tap/dffy
- Shell installer run curl -fsSL https://raw.githubusercontent.com/amalucelli/dffy/main/install.sh | sh
- Markdown plugin installation append sh -s -- --plugin markdown to the shell installer
Note: Renderer plugins, such as diffing Markdown files as formatted rich text, remain experimental features.
The binary integrates directly into daily git commands and handles uncommitted files, specific revisions like HEAD~3, merge bases via main...feature, or single commit messages using show HEAD. It also functions outside git repositories to contrast arbitrary directory trees and individual files. Setting core.pager to dffy integrates it into git paging, while interactive.diffFilter can be assigned to dffy --color-only for git add -p sessions.
04Benchmark comparisons across git diff tools
The project benchmarks against several established terminal pagers and viewers, evaluating rendering speed, file-tree capabilities, and memory consumption.
| Tool | Interactive file tree | Watch mode | git pager | git add -p | Syntax diff | Single binary |
|---|---|---|---|---|---|---|
| dffy | Yes | Yes | Yes | Yes | Yes | Yes |
| hunk 0.25.0 | Yes | Yes | Yes | No | No | Partial |
| lumen 2.32.0 | Yes | Yes | No | No | No | Yes |
| difftastic 0.72.0 | No | No | No | No | Yes | Yes |
| delta 0.20.1 | No | No | Yes | Yes | No | Yes |
| diff-so-fancy 1.4.14 | No | No | Yes | Yes | No | No |
| GNU diffutils 3.10 | No | No | No | No | No | Yes |
In timed tests opening the Linux v6.0..v6.1 patch comprising 13,168 changed files across a 48MB diff, dffy displayed the first changed line in 9.5ms using 90MB of memory. By comparison, lumen 2.32.0 required 12.4 seconds and 676MB of memory, while hunk 0.25.0 took 17.7 seconds and 4.26GB of memory. When used as a standard pipe pager, dffy streamed the entire 48MB patch in 217ms while consuming only 3.0MB of memory.
05Syntax aware tracking and upcoming features
The internal diff engine implements histogram matching along with tree-sitter style syntax recognition that flags reformatted code with a tilde and moved blocks with a double right-angle bracket. File renames are tracked automatically using git's native detection criteria. An integrated watch mode actively monitors files and refreshes the diff viewer as developers stage, modify, or commit changes.
Unlike hunk and lumen, dffy intentionally omits AI agent annotations and restricts its scope to git rather than supporting alternative version control systems like Jujutsu, Mercurial, or Sapling. The project is licensed under the MIT license, with ongoing development focused on refining experimental renderer plugins, dotfile configurations, and expanded syntax handling.
Frequently asked questions
What makes dffy faster than traditional terminal diff tools on large repositories?
Rather than computing the entire diff before rendering, dffy immediately displays the initial files it discovers while calculating the remaining changes asynchronously in the background.
Can dffy be used as a drop-in pager for git commands?
Yes, configuring core.pager to dffy and interactive.diffFilter to dffy --color-only allows it to handle standard git paging and git add -p staging sessions.
Does dffy support file comparisons outside of git repositories?
Yes, passing two file paths or directory paths directly to the command allows comparing arbitrary files without an active git repository.
Sources
Author
Dillip Chowdary
Writes Tech Bytes coverage of AI, engineering, and the tools that actually ship. Editor of Tech Pulse Daily.
Related on Tech Bytes
Advertisement