hunk — What is it?

Hunk is a terminal-based diff viewer designed for interactive code review, providing a review-first approach with AI and agent annotations for agent-authored changesets.

⭐ 3,870 Stars 🍴 80 Forks TypeScript MIT Author: modem-dev
Source: per README View on GitHub →

Why it matters

Hunk is gaining attention due to its unique approach to code review, integrating AI and agent annotations into a terminal interface, which is a gap not addressed by many existing diff tools. Its use of OpenTUI and Pierre diffs for a terminal experience stands out in a market dominated by GUI-based diff viewers.

Source: Synthesis of README and project traits

Core Features

Review-first terminal diff viewer

Hunk provides a terminal-based interface for reviewing code changes, with features like multi-file review streams, inline AI and agent annotations, and responsive layouts.

Source: per README
Integration with Git and raw files

Users can review Git changesets and compare raw files directly within Hunk, with support for Git's diff-style commands and patch review capabilities.

Source: per README
Agent and AI support

Hunk allows for the integration of AI and agent skills for live code review sessions, enhancing the review process with real-time annotations and insights.

Source: per README

Architecture

The architecture of Hunk is modular, with a clear separation of concerns. It leverages OpenTUI for the terminal UI and Pierre diffs for diffing capabilities. The project is structured into multiple packages, with a focus on reusability and maintainability. Key technical decisions include the use of TypeScript for development and the integration of various terminal utilities for functionality.

Source: Code tree + dependency files

Tech Stack

infra: Not enough information.  |  key_deps: opentui, @pierre/diffs, bun, tsc, oxfmt, oxlint  |  language: TypeScript  |  framework: OpenTUI, Pierre diffs

Source: Dependency files + code tree

Quick Start

npm i -g hunkdiff hunk hunk --version
Source: README Installation/Quick Start

Use Cases

Hunk is suitable for developers and technical teams engaged in code review processes, particularly those working in terminal environments or with a preference for interactive review tools. It is useful for reviewing Git changesets, comparing raw files, and integrating AI and agent insights into the review process.

Source: README

Strengths & Limitations

Strengths

  • Strength 1: Unique terminal-based review-first approach
  • Strength 2: Integration of AI and agent annotations
  • Strength 3: Extensive Git and file comparison capabilities

Limitations

  • Limitation 1: Limited documentation on agent and AI integration
  • Limitation 2: May have a steeper learning curve for users not familiar with terminal-based tools
Source: Synthesis of README, code structure and dependencies

Latest Release

v0.10.0 (2026-04-26): Refactor of session broker into reusable runtime-neutral packages.

Source: GitHub Releases

Verdict

Hunk is a promising project for teams that require an interactive and terminal-based approach to code review, especially those looking to integrate AI and agent insights. Its unique features and terminal focus make it a standout tool for developers who prefer a non-GUI environment for code review tasks.

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-07 18:31. Quality score: 85/100.

Data sources: README, GitHub API, dependency files