A fast terminal diff viewer for git, with a review loop for your coding agent.
Opens a diff the size of a Linux kernel release in milliseconds.
brew install --cask amalucelli/tap/dffy
dffy # in any git repository: everything you haven't committed- You work in a large repository. dffy shows the first files while it diffs the rest in the background, and it doesn't slow down at the scale of the Linux kernel.
- You review what your coding agent wrote. Leave comments on its lines, send them back to the agent with one key, then see only what it changed in response.
- You review pull requests.
dffy pr 123opens a GitHub pull request with its threads inline, and posts your review without leaving the terminal. - You live in the terminal, sometimes over SSH from a phone. dffy is a single native binary, with plain-letter keys and a layout that fits small screens.
dffy is a single binary for Linux and macOS, on x86_64 and arm64.
brew install --cask amalucelli/tap/dffy
# or
curl -fsSL https://raw.githubusercontent.com/amalucelli/dffy/main/install.sh | shinstall.md covers mise, building from source, shell completions and the plugins.
git config --global core.pager dffy
git config --global interactive.diffFilter "dffy --color-only"git diff, git show and git log -p then open in dffy's viewer, and git add -p gets dffy's colors. To try it once without changing your config: git -c core.pager=dffy diff.
dffy # staged, unstaged and untracked changes
dffy main...feature # any revision git understands
dffy show HEAD # a commit with its message
dffy --watch # refresh on every change
dffy a.txt b.txt # two files or folders, no repository neededusage.md has the rest: paths, --staged, --syntax, --stat, --json and more.
| Key | Does |
|---|---|
n / N |
next / previous change |
f / F |
next / previous file |
/ |
search the diff |
o |
find any file in the repository |
l |
show files whole, with their changes marked |
K |
go to a definition, no language server needed |
c |
comment on a line |
space |
list every command |
? / q |
help / quit |
keys.md lists every key and how to rebind it. Settings go in ~/.config/dffy/config as key = value lines, and dffy config --default lists them all.
dffy agents setup # a skill for Claude Code, Codex, Pi and AmpThe skill teaches your agent to read changes with dffy a file at a time, and to answer the review threads you leave it under its own name. It never resolves or posts them. Agents without a shell use dffy mcp instead.
With Claude Code, install dffy's plugin so a session you already have open takes the threads you send:
claude plugin marketplace add amalucelli/dffy
claude plugin install dffy@dffyThen, with claude and dffy open in the same working tree:
con a line leaves a comment for the agent.hsends all your open threads to the session, after a confirm, and takes a checkpoint of the working tree first.fsends only the thread in focus.- The session makes each change and replies in its thread.
'shows only what changed since the checkpoint, the agent's turn.xon a thread resolves it once you're happy.
The dffy-agent plugin (experimental) runs Claude Code, Codex, Pi or Amp for you, with no session open:
brew install --cask amalucelli/tap/dffy-agentaon a thread asks an agent about it. The answer comes as a reply in the thread, read-only, with a suggestion when it proposes a change, andsapplies the suggestion to the working tree.fandhwith no session listening start your agent in a new tab, pointed at the threads.
It needs claude, codex or pi logged in. agents.md and viewer.md have the details.
The dffy-review-github plugin (experimental) brings GitHub pull requests into the viewer. It needs gh, logged in.
brew install --cask amalucelli/tap/dffy-review-github
dffy pr 123- The pull request opens with its threads under their lines. You reply, resolve and suggest changes as on your own comments.
Pposts your drafts, replies and resolves as one review, andpfetches new pushes and threads in place.Rshows only what changed since your last review, andOlists the reviews waiting on you.- Plain
dffyon a branch with an open pull request brings in its comments too.review = nonein the config turns that off.
viewer.md and review-github.md have the details.
Opening Linux v6.0..v6.1 (13,168 changed files, a 48MB patch) in a viewer, time until the first changed line is on screen:
dffy |
lumen 2.32.0 |
hunk 0.25.0 |
|
|---|---|---|---|
| The v6.0..v6.1 range | 8.1ms | 12.5s | 18.1s |
| The working tree (5 files changed) | 77ms | 1.11s | 733ms |
As a pager, git diff v6.0 v6.1 | … |
210ms | n/a | 15.2s |
| Memory, opening the range | 99MB | 676MB | 4.39GB |
As git's pager, dffy streams the whole 48MB patch in 3.1MB of its own memory, about as fast as plain git diff. benchmarks.md has the method.
dffy |
hunk |
lumen |
difftastic |
delta |
diff-so-fancy |
diff |
|
|---|---|---|---|---|---|---|---|
| Interactive viewer with a file tree | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |
| Watch mode | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |
| git's pager (reads a diff on stdin) | ✅ | ✅ | ❌ | ❌ | ✅ | ✅ | ❌ |
git add -p filter |
✅ | ❌ | ❌ | ❌ | ✅ | ✅ | ❌ |
| Syntax highlighting | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ |
| Changed-word emphasis | ✅ | ✅ | ✅ | ✅ | ✅ | 🟡 | ❌ |
| Syntax-aware diff | ✅ | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ |
| Split and unified, picked by width | ✅ | ✅ | ❌ | 🟡 | 🟡 | ❌ | 🟡 |
| Mouse | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |
| Compares files outside a repository | ✅ | 🟡 | ❌ | ✅ | ✅ | 🟡 | ✅ |
| Plugins or extensions | 🟡 | 🟡 | ❌ | ❌ | ❌ | ❌ | ❌ |
| Single native binary | ✅ | 🟡 | ✅ | ✅ | ✅ | ❌ | ✅ |
| Your own line comments | ✅ | 🟡 | ✅ | ❌ | ❌ | ❌ | ❌ |
| GitHub pull request review | 🟡 | 🟡 | 🟡 | ❌ | ❌ | ❌ | ❌ |
| AI or agent annotations | ✅ | ✅ | 🟡 | ❌ | ❌ | ❌ | ❌ |
| Other VCSs (Jujutsu, Mercurial, Sapling) | ❌ | ✅ | ✅ | ✅ | ✅ | 🟡 | — |
🟡 means partial support. All seven are open source. GNU diff is GPL-3.0-or-later and the rest are MIT. Checked against hunk 0.25.0, lumen 2.32.0, difftastic 0.72.0, delta 0.20.1, diff-so-fancy 1.4.14 and GNU diffutils 3.10, with a source for every cell.
Fast
- ⚡ Opens a Linux kernel release diff in milliseconds and loads the rest in the background.
- 👀
--watchrepaints as you edit, stage and commit.
Reading diffs
- 🪟 Split or unified, picked by terminal width.
- 🌈 Syntax highlighting for 30 languages, with changed words emphasized.
- 🌳 A syntax-aware diff (
d) that marks reformatted (~) and moved (») code. - 🔁 Renames detected the way git detects them.
Reading code
- 📖 File view (
l) shows each file whole at either version, with its changes marked and opened in place. - 🔎 Go to definition (
K) at either version, with the lines using a name, in 18 languages and without a language server. - 🗃️ Any file of the repository, from the picker or a tree of all files, at either version.
Navigation
- 🗂️ A file tree, a fuzzy file picker and search across the diff.
- ↩️ Back and forward (
backspace,\) between the places you jumped from. - 🎯 Each file opens at its first change, and
n/Njump between changes.
Reviewing
- 💬 Review comments on lines and files, drawn under their code, with replies, resolve and suggestions. They're kept in a plain file in the repository's git directory.
- 🗒️ A Comments panel beside the file tree. Picking a thread takes the diff to it.
- 📍 Checkpoints save the working tree, so the next diff shows only what changed since, such as your agent's last turn.
- 🤝 Coding agents and GitHub pull requests, above.
Git
- 🧾 Staged, unstaged and untracked changes in one view, or any revision.
- ✂️ Stage, unstage and discard lines or hunks from the viewer.
- ⚔️ Conflicted files from a merge, rebase or cherry-pick, with their conflict markers highlighted and resolved in place.
- 📟 Works as git's pager,
git add -pfilter and difftool. - 📁 Compares files and folders outside a repository too.
Anywhere
- 📱 Works on phones over SSH, with plain-letter keys and a frameless layout.
- 🖱️ Mouse selection that copies over SSH.
- 🎨 16 themes and a config file for your dotfiles.
Scripts and agents
- 🧱
--json: the diff as JSON Lines, with each line's kind and whether it moved or was only reformatted. - 🤖
dffy mcp: an MCP server. Coding agents list a change's files, read its diffs a page at a time, find where a name is defined and used, read your review comments, and reply in a thread or apply its suggestion. - ✍️
dffy comments: review comments as JSON. Scripts and agents add their own withdffy comments apply, shown inline with their author.
Plugins are separate programs that dffy runs. All are experimental.
| Plugin | What it adds |
|---|---|
dffy-render-markdown |
Markdown files diffed as rendered text, with Mermaid fences drawn |
dffy-render-mermaid |
.mmd and .mermaid flowcharts and sequence diagrams drawn in the terminal |
dffy-review-github |
GitHub pull request reviews |
dffy-agent |
Asking and starting coding agents |
All four at once:
brew install --cask \
amalucelli/tap/dffy-render-markdown \
amalucelli/tap/dffy-render-mermaid \
amalucelli/tap/dffy-review-github \
amalucelli/tap/dffy-agent
# or
curl -fsSL https://raw.githubusercontent.com/amalucelli/dffy/main/install.sh | sh -s -- \
--plugin markdown \
--plugin mermaid \
--plugin review-github \
--plugin agentThe renderers need one line in ~/.config/dffy/config, then r switches a file between its lines and its rendered form:
render = md:markdown mmd:mermaid mermaid:mermaid
dffy-review-github and dffy-agent work once they're on PATH. dffy doctor checks that each plugin is found, and that gh and the agents are logged in. plugins.md has the details.
The documentation covers every key, flag and setting: installation, usage, the viewer, keys, configuration, themes, git integration, watch mode, review comments, plugins, JSON output, coding agents, the MCP server and troubleshooting. CHANGELOG.md lists what each release changed.
To contribute, start with design.md and architecture.md: dffy is a library, dffy-core, with its own diff engine and terminal renderer, and the viewer, printed output, JSON and MCP server are thin frontends over it.
dffy builds on ideas from tools I like: the terminal review flow of lumen, the review UX of hunk, and the rendering of diffs.com (Pierre's @pierre/diffs).
MIT


