hunk — What is it?

Hunk is a terminal-based diff viewer designed for interactive code review, offering a multi-file review stream with AI and agent annotations.

⭐ 6,638 Stars 🍴 179 Forks TypeScript MIT Author: modem-dev
Source: Official README and linked documentation View on GitHub →

Why it matters

Hunk is being discussed because its unique approach to code review, integrating AI and agent annotations, and providing a terminal-based interface that is both capable and efficient for developers. Its integration with various version control systems and the ability to handle large codebases make it a tool for developers looking for a more interactive and efficient way to review code changes.

Source: Official README and linked documentation

Core Features

Review-first terminal diff viewer

Hunk provides a terminal-based interface for reviewing code changes, offering a multi-file review stream with sidebar navigation and inline AI and agent annotations.

Source: Official README and linked documentation
Split, stack, and responsive auto layouts

Hunk supports various layout options, allowing users to split the view, stack files, and automatically adjust the layout to fit the terminal window.

Source: Official README and linked documentation
Watch mode for auto-reloading files

Hunk includes a watch mode that automatically reloads files and updates the review UI as changes are made to the codebase.

Source: Official README and linked documentation
Keyboard, mouse, pager, and Git difftool support

Hunk is designed to be accessible through various input methods, including keyboard, mouse, and integration with Git difftools and pagers.

Source: Official README and linked documentation

Architecture

Hunk's architecture is modular, with a clear separation of concerns. It use OpenTUI for the terminal user interface and Pierre diffs for diff rendering. The project uses TypeScript as the primary language and includes a set of scripts for building and testing. The codebase is organized into multiple directories, with a clear structure for different components and functionalities.

Source: Official repository tree and dependency files

Project Knowledge Graph

Knowledge graph: project (center) + core features (inner hexagons) + key dependencies (outer chips) opentui @pierre/diffs bun tsc oxfmt Review-first terminal diff viewerReview-first termin… Split, stack, and responsive auto layoutsSplit, stack, and r… Watch mode for auto-reloading filesWatch mode for auto… Keyboard, mouse, pager, and Git difftool supportKeyboard, mouse, pa… hunk Project Core feature Key dependency

Tech Stack

LanguageTypeScriptFrameworkOpenTUI, Pierre diffs
opentui@pierre/diffsbuntscoxfmtoxlintchangesets
Not enough information.
Source: Official repository tree and dependency files

Quick Start

npm i -g hunkdiff brew install modem-dev/tap/hunk hunk hunk --version
Source: Official README and linked documentation

Use Cases

Hunk is suitable for developers who need a terminal-based tool for code review, especially those working with large codebases or who prefer a non-interactive diff viewer. It is useful in scenarios where developers need to review changes in real-time, such as during pair programming or code reviews.

Source: Official README and linked documentation

Strengths & Limitations

Strengths

  • Provides a terminal-based interface for interactive code review.
  • Integrates AI and agent annotations for enhanced review experience.
  • Supports various version control systems and file comparison scenarios.

Limitations

  • Limited to terminal-based usage, which may not be suitable for all developers.
  • May require some learning curve for users unfamiliar with terminal-based tools.
Source: Official README and linked documentation

Latest Release

The latest stable version is v0.22.0, dated 2026-09-10 in the official changelog. It added interactive history, multi-commit selection, threaded comment replies, persistent multiline selection, and extension review metadata. Later main commits are not released features.

Source: github.com/modem-dev/hunk/releases/tag/v0.22.0;https://hunk.dev/chang…

Verification and evidence

status: docs-only  |  checked_at: 2026-09-23  |  environment: Docs only. Reviewed the official README, v0.22.0 tag and changelog, installation documentation, package metadata, update-check source, session-credential source, agent workflow, and MIT license. Hunk, its TUI, daemon, extensions, and VCS commands were not run.  |  limitations: Release-asset checksums, the install script, terminal compatibility, rendering, VCS adapters, daemon ports and authentication, agent comments, resource use, Windows, and community extensions were not verified.  |  observed_output: Official tags and website release metadata identify v0.22.0 as the current stable version, dated 2026-09-10. npm installation requires Node.js 22 or newer. curl, Homebrew, mise, and Nix provide standalone binaries. The first-party update endpoint can be bypassed with HUNK_DISABLE_ANALYTICS=1 or DO_NOT_TRACK=1.

Source: github.com/modem-dev/hunk/releases/tag/v0.22.0;https://hunk.dev/chang…

Comparison

Hunk provides a multi-file sidebar, interactive history, mouse actions, and agent annotation sessions for active review of a whole changeset. delta is closer to a polished Git pager, with mature configuration and a simpler startup path, and it does not add a local comment daemon. Use delta to improve git diff and git show output. Use Hunk to walk files in a terminal and share locations with an agent.

Source: github.com/modem-dev/hunk;https://github.com/dandavison/delta

Verdict

Hunk is a project for developers who require a terminal-based code review tool with advanced features like AI annotations and integration with various version control systems. It is particularly well-suited for those who prefer a lightweight, efficient, and interactive terminal-based experience for code reviews.

Source: Official repository

Frequently Asked Questions

What did the documentation review verify for hunk on 2026-09-23?

Official tags and website release metadata identify v0.22.0 as the current stable version, dated 2026-09-10. npm installation requires Node.js 22 or newer. curl, Homebrew, mise, and Nix provide standalone binaries. The first-party update endpoint can be bypassed with HUNK_DISABLE_ANALYTICS=1 or DO_NOT_TRACK=1.

What evidence boundary applies to this hunk review?

The review environment was: Docs only. Reviewed the official README, v0.22.0 tag and changelog, installation documentation, package metadata, update-check source, session-credential source, agent workflow, and MIT license. Hunk, its TUI, daemon, extensions, and VCS commands were not run.

Sources and review scope
This review is based on the project's public documentation. Versions, installation commands, and feature boundaries can change upstream; check the cited sources and current release before use. Sources checked on: 2026-09-23 13:55.

Reference materials: README, GitHub API, dependency files