modem-dev/hunk
modem-dev/hunkReview-first terminal diff viewer for agentic coders
From the README
hunk
Hunk is a review-first terminal diff viewer for agent-authored changesets, built on OpenTUI and Pierre diffs.
-
multi-file review stream with sidebar navigation
-
inline AI and agent annotations beside the code
-
split, stack, and responsive auto layouts
-
watch mode for auto-reloading file and Git-backed reviews
-
keyboard, mouse, pager, and Git difftool support
Split view with sidebar and inline AI notes
Stacked view and mouse-selectable menus
Install
npm i -g hunkdiff
Requirements:
- Node.js 18+
- macOS or Linux
- Git recommended for most workflows
Quick start
hunk # show help
hunk --version # print the installed version
Working with Git
Hunk mirrors Git's diff-style commands, but opens the changeset in a review UI instead of plain text.
hunk diff # review current repo changes, including untracked files
hunk diff --watch # auto-reload as the working tree changes
hunk show # review the latest commit
hunk show HEAD~1 # review an earlier commit
Working with raw files and patches
hunk diff before.ts after.ts # compare two files directly
hunk diff before.ts after.ts --watch # auto-reload when either file changes
git diff --no-color | hunk patch - # review a patch from stdin
Working with agents
- Open Hunk in another terminal with
hunk difforhunk show. - Load the Hunk review skill:
skills/hunk-review/SKILL.md. - Ask your agent to use the skill against the live Hunk session.
A good generic prompt is:
Load the Hunk skill and use it for this review.
[!NOTE]
hunk skill pathlands in Hunk 0.10.0. Until that release is out, load the skill from the repo path above.
For the full live-session and --agent-context workflow guide, see docs/agent-workflows.md.
Feature comparison
| Capability | hunk | lumen | difftastic | delta | diff-so-fancy | diff | | ---------------------------------- | ----------------------------------------- | ----------------------------------------- | --------------------------------------------------- | -------------------------------------------- | ---------------------------------------------------------- | ----------------------------------------------- | | Review-first interactive UI | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | | Multi-file review stream + sidebar