hunk — review-first terminal diff viewer
Terminal diffs<br>for humans & agents<br>Hunk is a review-first diff viewer that plays nice with agents. It's fast, it looks good, and it works everywhere.<br>$npm i -g hunkdiffStar on GitHub8k
hunk diff — split view
GraphiteMidnightEmberZenburnCatppuccin MochaCatppuccin Latte
# from the community<br>Watch a video walkthrough.
JHunk changed the way I write and review code with my agent5:14Jilles · watch on YouTubeDI Was Definitely Using The Wrong Terminal Code Reviewer13:33DevOps Toolbox · watch on YouTube
# what you get<br>Don't just read code, understand it.<br>One stream, every file.<br>The whole changeset reads top to bottom in sidebar order — no flipping between single-file views. File counts at a glance, hunk jumps with [ and ], and the sidebar takes you straight to any file.<br>How reviews work →
Your agent's reasoning, beside the code it explains.<br>Agents leave notes in a sidecar; hunk renders each one inside the diff, right above the hunk it annotates — summary, rationale, and author. Step through hunks with [ and ] and the notes follow.<br>Agent annotations, in depth →
“Hunk is very good. It has replaced any other local diff viewer for me.<br>Mitchell Hashimoto, creator of Ghostty & VagrantKeys when you're fast, mouse when you're browsing.<br>Click a file in the sidebar to jump, wheel-scroll the stream, hover a row to leave a note — or never leave the keyboard. Pipe patches straight in and hunk is your pager, too.<br>Keyboard & mouse reference →
Split or stack — or let auto decide.<br>Side-by-side when your terminal is wide, stacked when it's narrow. Auto picks for you; press 1, 2, or 0 to override at any time, with wrapping and line numbers toggled live.<br>Layout & display options →
“Love hunk.<br>DHH, creator of Omarchy and Ruby on RailsReal syntax highlighting. Dozens of themes.<br>Understand structure, not just added and removed lines. Ships with its own looks plus the classics — Catppuccin, Dracula, Gruvbox, GitHub, and more — or roll your own in config.<br>Theme gallery & config →
# and the rest<br>Watch mode — reloads as the tree changesExtensions — script Hunk in TypeScriptJujutsu & Sapling — first-class, like GitPager & difftool — pipe any patch inCross-platform — macOS, Linux, WindowsYour own themes — roll a palette in config
# install<br>Wherever your terminal lives.
npmnpm i -g hunkdiff<br>Homebrewbrew install hunk<br>Nixnix run github:modem-dev/hunk<br>Then hunk diff to review your working tree, or hunk show to review a commit. npm installs require Node.js 18 or newer.
Try hunk on your next changeset.<br>Install hunkRead the quick start