A terminal diff viewer developed by Modem, a Canadian company. Instead of reading raw git diff output, you review changes across multiple files in a single screen with a sidebar. Its main focus is reviewing code written by AI agents: notes an agent leaves explaining why it made a change render inline, right next to the relevant code. The CLI mirrors Git’s own commands ─ hunk diff, hunk show ─ so working-tree changes, past commits, patches, and direct file-to-file comparisons all use the same workflow. Built on OpenTUI and Pierre diffs, and released as open source under the MIT license.
Key Features
- Review multiple files as one stream: Changed files are listed in a sidebar and read top to bottom, without reopening them one at a time
- Inline agent annotations: Comments left by an AI agent are inserted directly above the hunk they refer to, so you read the intent alongside the diff
- Keyboard and mouse both supported: Shortcut-driven navigation for power users, plus scrolling and clicking with the mouse for anyone less used to terminal tools
- Automatic layout switching and watch mode: Switches between split (side-by-side) and stacked layouts based on terminal width. Add
--watchand the view reloads every time you save a file - Support beyond Git: Alongside Git, it auto-detects and handles Jujutsu (jj) and Sapling (sl). It can also be configured as a Git pager or difftool
- Themes and extensions: Over 60 built-in color schemes including Catppuccin, Dracula, Gruvbox, Nord, and Tokyo Night. Themes, commands, and backends can be added in TypeScript
Installation and Usage
Install via npm, Homebrew, mise, and other package managers.
npm i -g hunkdiff # via npm (requires Node.js 18+)brew install hunk # HomebrewBasic usage closely follows Git’s commands.
hunk diff # Review working-tree changeshunk diff --watch # Watch for changes and auto-reloadhunk show # Review the latest commithunk show HEAD~1 # Review an earlier commithunk diff file1 file2 # Compare two files directlyThere are two ways to connect an AI agent: driving a running hunk window from another terminal with hunk session commands, or loading a JSON file of prewritten notes via --agent-context. With the former, an agent can move the view to a specific file or hunk and add or remove comments.
Pricing
| Plan | Price | Highlights |
|---|---|---|
| Open source | $0 | All features available. MIT license |
Pricing is current as of August 2026. Check the official site for the latest information.
Pros & Cons
✅ Pros
- Free and open source, with no paid tiers or usage limits
- Reading an agent’s explanatory comments beside the diff lightens the work of making sense of large volumes of generated code
- You never leave the terminal ─ no switching to an editor or the GitHub UI to review
- Git, Jujutsu, and Sapling all work with the same interface
- A wide range of color themes makes it easy to match your existing setup
⚠️ Cons
- It is a terminal-first tool, so there is a learning curve for anyone unfamiliar with the CLI
- Installing via npm requires Node.js 18 or later (not needed if you use the distributed binaries)
- It is focused on displaying diffs for review and does not perform Git operations such as committing or merging
- Agent integration takes some configuration, so it is not usable the moment you install it
- Released in March 2026, it is a relatively new tool and its behavior may still change
Comparison with Similar Services
| Criteria | hunk | delta | difftastic | lazygit |
|---|---|---|---|---|
| Main purpose | Diff review (agent-oriented) | Readable colored diff output | Syntax-aware diffs | Full Git operations in a TUI |
| Agent annotations | Supported | Not supported | Not supported | Not supported |
| Multi-file listing | Sidebar | Sequential output | Sequential output | File tree |
| VCS beyond Git | Jujutsu / Sapling | ─ | ─ | ─ |
| Git operations | No (view only) | No | No | Yes |
| Price | Free (MIT) | Free | Free | Free |
Who Is It For
- Developers who use coding agents such as Claude Code or Codex daily and spend a lot of time reading the diffs they produce
- People with a terminal-centered workflow who would rather not switch to a browser to review
- Anyone who finds that raw
git diffoutput makes it hard to follow the whole picture when many files change - Jujutsu or Sapling users who want a single viewer for their diffs
Summary
hunk was built as one answer to the question of how humans should read diffs in an era where AI agents write large amounts of code. At its center are a screen layout that lets you follow multiple files at once and an annotation feature that puts an agent’s intent right beside the code, wrapped in a CLI that mirrors Git so you can start using it immediately. It is free and MIT-licensed, so if git diff has been leaving you wanting more during reviews, running hunk diff once is a good place to start.