New

Hunk

An interactive terminal viewer for reviewing complete changesets.

Would you recommend Hunk?

No votes yet. Tried it? Be the first to say.

One vote per person. No account needed.

Overview

Hunk opens a working tree, commit, patch or GitHub pull request as a navigable diff. A file sidebar lets you move through a changeset while keeping the surrounding review in view. It supports Git, Jujutsu and Sapling, and an optional live integration lets coding agents leave notes beside the affected lines.

Instead of
Paging through git diff or opening a draft pull request for local review.
Reach for it when
Reach for it when a change spans enough files that scrolling through a single patch has become tedious.

Key features

  • Multi-file review

    A sidebar lets you jump between changed files in one review.

  • Adaptive diff layout

    The viewer can switch between split and unified layouts based on available space.

  • Native revision selection

    Jujutsu and Sapling checkouts can use their native revision expressions.

  • Pull request browsing

    The bundled GitHub commands open pull requests directly in the terminal.

  • Inline agent notes

    A coding agent connected to a live session can attach notes to changed lines.

In depth

Install

The npm distribution requires Node.js 22 or later. Open a terminal in a checkout with changes and start a review. The third command opens the interactive history browser.

bash
npm i -g hunkdiff
hunk diff
hunk log

How it works

Hunk presents a changeset as a continuous diff with a file sidebar. Start with the file that contains the behavioural change, then jump to its tests and configuration without closing the review. The layout can adapt to the width of the terminal, which helps when you keep an editor open beside it.

  • Open a working tree for a pass before committing.
  • Use history to inspect a commit or select a range of commits.
  • Open two raw files or read a patch from standard input when the change lives outside a checkout.

Good to know

The standalone working-tree command can include untracked files. When Hunk runs as Git's pager, Git determines which files appear in the patch. Agent annotations start hidden and can be revealed when you want to check the reasoning attached to a line. Hunk documentation · v0.25.0 release

Strengths and watch-outs

Strengths

  • File-by-file navigation across a complete changeset
  • Supports three version control systems
  • Useful with or without a coding agent

Watch out for

  • The npm install requires Node.js 22 or later
  • Extension APIs are experimental
  • Diffs are textual, with syntax highlighting

Try it in a few minutes

Terminal
npm i -g hunkdiff
hunk diff
hunk log

Alternatives

delta

It adds syntax highlighting and layout options to the output of Git and other commands.

difftastic On Signal Lab

It compares source syntax trees to identify structural changes.

Related tools

Other tools that share topics with Hunk.

T3 Code

t3.codes
New

One fast app for driving Claude Code, Codex and other coding agents, from your desk or your phone.

Instead of A terminal tab per agent, each vendor's own desktop app, and SSH-ing in from your phone to check on a long run

Plannotator

plannotator.ai
New

Review and annotate your coding agent's plans and diffs in the browser, then send the feedback straight back.

Instead of Typing plan feedback into the chat box, and reviewing agent diffs with plain git diff

difftastic

difftastic.wilfred.me.uk
Gem

A diff tool that compares code by its syntax, not line by line.

Instead of The line-based output of git diff