hunk — What is it?

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

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

Why it matters

Hunk is gaining attention due to its unique approach to code review, combining terminal efficiency with interactive UI elements and AI annotations. It addresses the pain points of traditional diff tools by providing a more intuitive and efficient way to review code changes, especially for those working with agent-authored changesets. The project stands out for its integration with OpenTUI and Pierre diffs, offering a responsive and customizable review experience.

Source: Synthesis of README and project traits

Core Features

Multi-file review stream with sidebar navigation

Hunk allows users to review multiple files simultaneously with a sidebar for easy navigation, enhancing the efficiency of code reviews.

Source: README
Inline AI and agent annotations

Users can view AI and agent annotations directly beside the code, providing context and insights during the review process.

Source: README
Responsive auto split/stack layout

Hunk dynamically adjusts its layout to provide a split or stacked view, optimizing the review experience based on the user's preferences and screen size.

Source: README
Watch mode for auto-reloading files and Git-backed reviews

The watch mode feature allows Hunk to automatically reload files and update reviews as changes are made in the working tree, streamlining the review process.

Source: README
Keyboard, mouse, pager, and Git difftool support

Hunk supports various input methods and integrates with Git difftool, making it accessible and convenient for different workflows.

Source: README

Architecture

The architecture of Hunk is inferred to be modular, with a clear separation of concerns. It leverages OpenTUI for the terminal UI and Pierre diffs for diffing capabilities. The project uses TypeScript as the primary language and employs a monorepo structure with multiple packages, indicating a focus on maintainability and scalability. The data flow is likely driven by a command-line interface that interacts with the underlying diffing logic and UI components.

Source: Code tree + dependency files

Project Knowledge Graph

Knowledge graph: project (center) + core features (inner hexagons) + key dependencies (outer chips) opentui @pierre/diffs Multi-file review stream with sidebar navigationMulti-file review s… Inline AI and agent annotationsInline AI and agent… Responsive auto split/stack layoutResponsive auto spl… Watch mode for auto-reloading files and Git-backed reviewsWatch mode for auto… Keyboard, mouse, pager, and Git difftool supportKeyboard, mouse, pa… hunk Project Core feature Key dependency

Center: project; inner ring: core feature modules; outer ring: key dependencies. Auto-generated from core_features and tech_stack.key_deps.

Tech Stack

LanguageTypeScriptFrameworkOpenTUI, Pierre diffs
opentui@pierre/diffs
Node.js, supported on macOS, Linux, and Windows
Source: Dependency files + code tree

Quick Start

npm i -g hunkdiff brew install modem-dev/tap/hunk hunk hunk --version
Source: README Installation/Quick Start

Use Cases

Hunk is suitable for developers and technical teams engaged in code reviews, particularly those working with agent-authored changesets. It is useful in scenarios where a detailed and interactive review process is required, such as in software development, version control, and collaborative coding environments.

Source: README

Strengths & Limitations

Strengths

  • Strength 1: Provides an interactive and efficient code review experience with AI and agent annotations.
  • Strength 2: Supports various input methods and integrates well with Git and other version control systems.

Limitations

  • Limitation 1: May have a steep learning curve for users unfamiliar with terminal-based tools.
  • Limitation 2: The project is still under development, and some features may be limited or not yet fully implemented.
Source: Synthesis of README, code structure and dependencies

Latest Release

v0.12.1 (2026-05-14): Fixed issues with bundled Hunk review skill in standalone prebuilt release archives. v0.12.0 (2026-05-12): Added Homebrew tap release automation and Homebrew-aware startup update notices. v0.12.0-beta.2 (2026-05-11): Published Windows x64 prebuilt npm artifacts for beta installs. v0.12.0-beta.1 (2026-05-10): Added lower-level `hunkdiff/opentui` primitives for embedding Hunk-powered review UIs in custom OpenTUI apps. v0.12.0-beta.0 (2026-05-10): Superseded prerelease.

Verdict

Hunk is a promising project for developers and teams looking to enhance their code review process with a terminal-based tool that offers a blend of interactivity and efficiency. Its focus on AI annotations and integration with existing workflows makes it a valuable addition to the developer's toolkit, especially for those who prefer a terminal interface.

Frequently Asked Questions

What is hunk?

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

What are the main features of hunk?

hunk's core features include: Multi-file review stream with sidebar navigation, Inline AI and agent annotations, Responsive auto split/stack layout, Watch mode for auto-reloading files and Git-backed reviews, Keyboard…

Why is hunk trending?

Hunk is gaining attention due to its unique approach to code review, combining terminal efficiency with interactive UI elements and AI annotations.

What is hunk used for?

Hunk is suitable for developers and technical teams engaged in code reviews, particularly those working with agent-authored changesets.

Transparency Notice
This page is auto-generated by AI (a large language model) from the following public materials: GitHub README, code tree, dependency files and release notes. Analyzed at: 2026-05-22 11:20. Quality score: 85/100.

Data sources: README, GitHub API, dependency files