The best terminal diff viewers for reviewing AI agent code
Terminal diff tools were built for a world where you wrote the change and the diff was a confirmation step. Coding agents inverted that. The diff is now often your first read of code you did not write, it spans more files than fits in your head, and it keeps changing while you look at it. The tools respond to that differently, and the differences matter more than they used to.
This guide compares five: delta, difftastic, diff-so-fancy, Hunk, and plain git diff. Disclosure up front: Hunk is built by our team at Modem. It is MIT-licensed and free, and this comparison keeps the rows it loses.
Why agent-era review breaks pager-style diffs
Three tools on this list, delta, diff-so-fancy, and git diff itself, are pagers or pager filters. Git prints a unified diff, the tool restyles the text on the way through, and less shows it. That model is fine when a diff is something you glance at, because you already know what changed.
An agent changeset breaks the model in specific ways. It is multi-file, so your only navigation, the pager's search, stops working as navigation. It routinely includes brand-new files, which git diff omits as untracked, so the part of the change most in need of review is the part you never see. It keeps moving while the agent works, so every look means re-running the command. And there is no way to see the agent's stated reasoning next to the code it produced; the reasoning lives in a chat scrollback you correlate by hand.
None of that makes pagers bad tools. It makes them tools for a different reading posture.
The contenders
delta is the best-regarded pager of the group: a Rust filter that sits in core.pager and restyles everything Git prints. Syntax highlighting, word-level emphasis, an opt-in side-by-side view, and, uniquely here, styled git blame and git grep output. Two lines of .gitconfig and every diff looks better with zero change to how you work.
difftastic is not a display tool at all; it changes what the diff says. It parses both versions with tree-sitter and diffs the syntax trees, so a reindent or a wrapped block stops reading as a rewrite. Its own docs are honest about the limits: no applicable patch output, and it scales poorly on files with a very large number of changes.
diff-so-fancy is a Perl script that has been tidying Git's output since 2015: cleaner file headers, markers out of the gutter so copied code stays copyable, rulers between files. No syntax highlighting and no side-by-side, deliberately. It is also the only one here that filters git add -p via interactive.diffFilter.
Hunk is a review UI rather than a filter. It parses the changeset into a document and draws an interface over it: one scrollable stream of every file, a sidebar that indexes it, split and stack layouts, mouse support, expandable context, and a watch mode that reloads as the working tree changes. It is the one built for the agent case specifically: an agent can attach its reasoning to individual hunks, and the notes render inline beside the code. TypeScript, MIT, standalone binaries for macOS, Linux, and Windows.
Plain git diff remains the floor and the interchange format. Everything above is ultimately rendering its output, and it is the only entry that is scriptable, pipeable into git apply, and installed everywhere already.
Feature comparison
Compiled from each project's docs and from hunk.dev/compare, which cites per-claim sources. Rows where Hunk loses are here on purpose.
| Capability | Hunk | delta | difftastic | diff-so-fancy | git diff |
|---|---|---|---|---|---|
| Review-first interactive UI | Yes | No | No | No | No |
| Multi-file stream with a file sidebar | Yes | No | No | No | No |
| Syntax highlighting | Yes | Yes | Yes | No | No |
| Structural (AST-aware) diffing | No | No | Yes | No | No |
| Inline agent annotations on hunks | Yes | No | No | No | No |
| Watch mode that reloads the review | Yes | No | No | No | No |
| Shows untracked files in a working-tree review | Yes | No | No | No | No |
| Mouse support | Yes | No | No | No | No |
| Change layout, wrapping, theme mid-read | Yes | No | No | No | No |
Works as a Git pager (core.pager) | Yes | Yes | No | Yes | Yes |
Works in git add -p | No | Yes | No | Yes | Yes |
Styles git blame and git grep | No | Yes | No | No | No |
| Output usable as a patch | No | No | No | No | Yes |
| No install required | No | No | No | No | Yes |
Two of those losses deserve emphasis. difftastic's structural diffing is something Hunk does not do at all; when one file's line diff is lying after a reformat, difftastic tells the truth faster than anything else here. And delta's startup edge is structural, not incidental: a Rust stream filter doing one pass will always beat a tool that builds a review model and mounts a UI.
When a pager is still right
- The change is two lines and you already know what they are.
- You are scripting, piping, or producing a patch to apply elsewhere. That is
git diff's job and nothing here replaces it. - You stage interactively with
git add -p. Keep delta or diff-so-fancy ininteractive.diffFilter; Hunk does not cover that flow. - You want
blameandgrepstyled too. That is delta, alone in this field. - You cannot install anything on the box.
The practical answer for most people is not either-or. Keep a pager as the default for glance-diffs and open a review tool when you sit down to actually review. The hunk.dev comparisons recommend exactly that pairing, including for delta.
Setting up Hunk as your Git or jj pager
Install, from the README:
npm i -g hunkdiff # macOS, Linux, or Windows; needs Node.js 22+
brew install hunk # macOS or Linux; standalone binary, no Node neededRun it directly where you would have typed git diff:
hunk diff # working tree, including untracked files
hunk diff --watch # reload as the tree changes
hunk show HEAD~1 # review an earlier commitTo have Git open it automatically, point core.pager at it, or add an opt-in alias if you want to keep your current pager:
git config --global core.pager "hunk pager"
# or:
git config --global alias.hdiff "-c core.pager=\"hunk pager\" diff"One documented caveat: when git diff runs through hunk pager, Git decides the patch contents, so untracked files will not appear there. Only Hunk's own hunk diff pulls them in. Hunk also works as a git difftool; the pager and difftool doc covers that setup.
For Jujutsu, Hunk auto-detects jj workspaces and takes native revsets. To make it jj's pager, run jj config edit --user and set:
[ui]
pager = ["hunk", "pager"]
diff-formatter = ":git"Sapling works the same way: sl config -u, then pager = hunk pager under [pager].
For the workflow side, reviewing while an agent is still working, see how to review Claude Code's changes before you commit. We build Modem for a living; Hunk is what we built when our own agents' diffs outgrew the pager, and it stays MIT and free.
