# Hunk **Hunk** is a review-first terminal diff viewer aimed at reviewing changesets produced by coding agents. It's built on [OpenTUI](https://github.com/anomalyco/opentui) and [Pierre diffs](https://www.npmjs.com/package/@pierre/diffs), and ships as a TypeScript CLI under the [modem-dev](https://github.com/modem-dev) organization (primary author: Ben Vinegar / `benvinegar`). Where tools like `delta` and `diff-so-fancy` make diffs pretty, Hunk treats a diff as a *review session* with navigation, layout controls, and inline agent annotations. ## Key features - **Multi-file review stream** with sidebar navigation - **Inline AI / agent annotations** beside the code - **Layouts** — split, stack, and responsive auto modes - **Watch mode** — auto-reloads file- and Git-backed reviews as they change - **Input** — keyboard, mouse, pager, and Git difftool support - **VCS** — works with [[Git]] (`hunk diff`, `hunk show`) and auto-detects Jujutsu workspaces - **Patch input** — pipe `git diff` into `hunk patch -` to review arbitrary patches - **Themes** — graphite, midnight, paper, ember; configurable via `~/.config/hunk/config.toml` ## Install ```bash npm i -g hunkdiff # or brew install modem-dev/tap/hunk ``` Requires Node.js 18+ on macOS, Linux, or Windows. ## Agent workflow The pitch is reviewing *agent-authored* code: 1. Run `hunk diff` or `hunk show` in one terminal. 2. Point your coding agent at the skill file from `hunk skill path`. 3. The agent reads the live Hunk session and annotates the diff inline. ## Use cases - Reviewing diffs from coding agents (Claude Code, Cursor, etc.) before accepting them - Reviewing local working-tree changes interactively instead of in a plain pager - Replacing the default Git pager (`git config --global core.pager "hunk pager"`) - Reviewing arbitrary patches piped in from other tools ## References - GitHub: https://github.com/modem-dev/hunk - npm: https://www.npmjs.com/package/hunkdiff - License: MIT ## Related -