modem-dev/hunkPublic

Review-first terminal diff viewer for agentic coders

AI summary: A terminal-based, review-first diff viewer optimized for agent-authored changesets with interactive AI annotations.

Stars
9.5K
+34 today
Forks
310
Watchers
16
Open issues
82
Open PRs
90
Contributors
~83
Commits
884
Branches
626

TypeScriptMITCreated Mar 17, 2026Last push 2d agoLatest release v0.22.0+91 stars this week+453 this month

Quick answers

What is hunk?
A terminal-based, review-first diff viewer optimized for agent-authored changesets with interactive AI annotations.
What does hunk do?
Hunk provides an interactive terminal UI specifically built for reviewing codebase changes, natively integrating with version control systems like Git, Jujutsu, and Sapling. It moves beyond standard diff outputs by enabling a multi-file review stream with sidebar navigation and responsive auto layouts like split or stacked views. Uniquely, it is designed for the era of AI coding, supporting inline AI and agent annotations directly alongside the code so developers can review agent-generated patches in context. It operates in real-time, utilizing watch mode to automatically reload as the working tree changes during automated refactors.
Who is hunk for?
Software engineers and AI tool builders who work extensively in the terminal and need a richer way to review complex changesets, especially those generated by autonomous AI agents.
How do I get started with hunk?
Install globally via npm (npm i -g hunkdiff) and run it against your repository.
How popular is hunk on GitHub?
modem-dev/hunk has 9,468 stars and 310 forks on GitHub, and gained 91 stars in the last 7 days.
What license does hunk use?
modem-dev/hunk is released under the MIT license.

Star history

since Jul 29, 2026
02.5K5K7.5KJul 2026Aug 2026Sep 2026Oct 2026
9.5K stars as of Oct 2, 2026. Measured daily since Jul 29, 2026; GitHub no longer exposes earlier star timestamps.

Contribution activity

commits per day, last 52 weeks
SepOctNovDecJanFebMarAprMayJunJulAugSepMonWedFri2025-09-28: 0 commits2025-09-29: 0 commits2025-09-30: 0 commits2025-10-01: 0 commits2025-10-02: 0 commits2025-10-03: 0 commits2025-10-04: 0 commits2025-10-05: 0 commits2025-10-06: 0 commits2025-10-07: 0 commits2025-10-08: 0 commits2025-10-09: 0 commits2025-10-10: 0 commits2025-10-11: 0 commits2025-10-12: 0 commits2025-10-13: 0 commits2025-10-14: 0 commits2025-10-15: 0 commits2025-10-16: 0 commits2025-10-17: 0 commits2025-10-18: 0 commits2025-10-19: 0 commits2025-10-20: 0 commits2025-10-21: 0 commits2025-10-22: 0 commits2025-10-23: 0 commits2025-10-24: 0 commits2025-10-25: 0 commits2025-10-26: 0 commits2025-10-27: 0 commits2025-10-28: 0 commits2025-10-29: 0 commits2025-10-30: 0 commits2025-10-31: 0 commits2025-11-01: 0 commits2025-11-02: 0 commits2025-11-03: 0 commits2025-11-04: 0 commits2025-11-05: 0 commits2025-11-06: 0 commits2025-11-07: 0 commits2025-11-08: 0 commits2025-11-09: 0 commits2025-11-10: 0 commits2025-11-11: 0 commits2025-11-12: 0 commits2025-11-13: 0 commits2025-11-14: 0 commits2025-11-15: 0 commits2025-11-16: 0 commits2025-11-17: 0 commits2025-11-18: 0 commits2025-11-19: 0 commits2025-11-20: 0 commits2025-11-21: 0 commits2025-11-22: 0 commits2025-11-23: 0 commits2025-11-24: 0 commits2025-11-25: 0 commits2025-11-26: 0 commits2025-11-27: 0 commits2025-11-28: 0 commits2025-11-29: 0 commits2025-11-30: 0 commits2025-12-01: 0 commits2025-12-02: 0 commits2025-12-03: 0 commits2025-12-04: 0 commits2025-12-05: 0 commits2025-12-06: 0 commits2025-12-07: 0 commits2025-12-08: 0 commits2025-12-09: 0 commits2025-12-10: 0 commits2025-12-11: 0 commits2025-12-12: 0 commits2025-12-13: 0 commits2025-12-14: 0 commits2025-12-15: 0 commits2025-12-16: 0 commits2025-12-17: 0 commits2025-12-18: 0 commits2025-12-19: 0 commits2025-12-20: 0 commits2025-12-21: 0 commits2025-12-22: 0 commits2025-12-23: 0 commits2025-12-24: 0 commits2025-12-25: 0 commits2025-12-26: 0 commits2025-12-27: 0 commits2025-12-28: 0 commits2025-12-29: 0 commits2025-12-30: 0 commits2025-12-31: 0 commits2026-01-01: 0 commits2026-01-02: 0 commits2026-01-03: 0 commits2026-01-04: 0 commits2026-01-05: 0 commits2026-01-06: 0 commits2026-01-07: 0 commits2026-01-08: 0 commits2026-01-09: 0 commits2026-01-10: 0 commits2026-01-11: 0 commits2026-01-12: 0 commits2026-01-13: 0 commits2026-01-14: 0 commits2026-01-15: 0 commits2026-01-16: 0 commits2026-01-17: 0 commits2026-01-18: 0 commits2026-01-19: 0 commits2026-01-20: 0 commits2026-01-21: 0 commits2026-01-22: 0 commits2026-01-23: 0 commits2026-01-24: 0 commits2026-01-25: 0 commits2026-01-26: 0 commits2026-01-27: 0 commits2026-01-28: 0 commits2026-01-29: 0 commits2026-01-30: 0 commits2026-01-31: 0 commits2026-02-01: 0 commits2026-02-02: 0 commits2026-02-03: 0 commits2026-02-04: 0 commits2026-02-05: 0 commits2026-02-06: 0 commits2026-02-07: 0 commits2026-02-08: 0 commits2026-02-09: 0 commits2026-02-10: 0 commits2026-02-11: 0 commits2026-02-12: 0 commits2026-02-13: 0 commits2026-02-14: 0 commits2026-02-15: 0 commits2026-02-16: 0 commits2026-02-17: 0 commits2026-02-18: 0 commits2026-02-19: 0 commits2026-02-20: 0 commits2026-02-21: 0 commits2026-02-22: 0 commits2026-02-23: 0 commits2026-02-24: 0 commits2026-02-25: 0 commits2026-02-26: 0 commits2026-02-27: 0 commits2026-02-28: 0 commits2026-03-01: 0 commits2026-03-02: 0 commits2026-03-03: 0 commits2026-03-04: 0 commits2026-03-05: 0 commits2026-03-06: 0 commits2026-03-07: 0 commits2026-03-08: 0 commits2026-03-09: 0 commits2026-03-10: 0 commits2026-03-11: 0 commits2026-03-12: 0 commits2026-03-13: 0 commits2026-03-14: 0 commits2026-03-15: 0 commits2026-03-16: 0 commits2026-03-17: 36 commits2026-03-18: 65 commits2026-03-19: 7 commits2026-03-20: 5 commits2026-03-21: 8 commits2026-03-22: 64 commits2026-03-23: 24 commits2026-03-24: 10 commits2026-03-25: 4 commits2026-03-26: 3 commits2026-03-27: 1 commit2026-03-28: 2 commits2026-03-29: 10 commits2026-03-30: 8 commits2026-03-31: 7 commits2026-04-01: 4 commits2026-04-02: 1 commit2026-04-03: 2 commits2026-04-04: 2 commits2026-04-05: 1 commit2026-04-06: 12 commits2026-04-07: 5 commits2026-04-08: 6 commits2026-04-09: 1 commit2026-04-10: 6 commits2026-04-11: 1 commit2026-04-12: 1 commit2026-04-13: 3 commits2026-04-14: 2 commits2026-04-15: 0 commits2026-04-16: 1 commit2026-04-17: 1 commit2026-04-18: 4 commits2026-04-19: 2 commits2026-04-20: 0 commits2026-04-21: 0 commits2026-04-22: 0 commits2026-04-23: 0 commits2026-04-24: 0 commits2026-04-25: 0 commits2026-04-26: 1 commit2026-04-27: 0 commits2026-04-28: 0 commits2026-04-29: 1 commit2026-04-30: 0 commits2026-05-01: 0 commits2026-05-02: 0 commits2026-05-03: 0 commits2026-05-04: 0 commits2026-05-05: 0 commits2026-05-06: 0 commits2026-05-07: 0 commits2026-05-08: 8 commits2026-05-09: 12 commits2026-05-10: 13 commits2026-05-11: 6 commits2026-05-12: 4 commits2026-05-13: 1 commit2026-05-14: 7 commits2026-05-15: 0 commits2026-05-16: 5 commits2026-05-17: 1 commit2026-05-18: 3 commits2026-05-19: 8 commits2026-05-20: 1 commit2026-05-21: 3 commits2026-05-22: 1 commit2026-05-23: 15 commits2026-05-24: 9 commits2026-05-25: 6 commits2026-05-26: 1 commit2026-05-27: 0 commits2026-05-28: 0 commits2026-05-29: 3 commits2026-05-30: 1 commit2026-05-31: 0 commits2026-06-01: 2 commits2026-06-02: 1 commit2026-06-03: 0 commits2026-06-04: 0 commits2026-06-05: 8 commits2026-06-06: 0 commits2026-06-07: 0 commits2026-06-08: 2 commits2026-06-09: 7 commits2026-06-10: 1 commit2026-06-11: 1 commit2026-06-12: 0 commits2026-06-13: 17 commits2026-06-14: 0 commits2026-06-15: 3 commits2026-06-16: 5 commits2026-06-17: 0 commits2026-06-18: 3 commits2026-06-19: 4 commits2026-06-20: 1 commit2026-06-21: 1 commit2026-06-22: 0 commits2026-06-23: 0 commits2026-06-24: 0 commits2026-06-25: 0 commits2026-06-26: 0 commits2026-06-27: 0 commits2026-06-28: 1 commit2026-06-29: 1 commit2026-06-30: 0 commits2026-07-01: 0 commits2026-07-02: 6 commits2026-07-03: 9 commits2026-07-04: 1 commit2026-07-05: 0 commits2026-07-06: 0 commits2026-07-07: 3 commits2026-07-08: 0 commits2026-07-09: 0 commits2026-07-10: 0 commits2026-07-11: 0 commits2026-07-12: 0 commits2026-07-13: 1 commit2026-07-14: 2 commits2026-07-15: 2 commits2026-07-16: 1 commit2026-07-17: 1 commit2026-07-18: 6 commits2026-07-19: 2 commits2026-07-20: 0 commits2026-07-21: 1 commit2026-07-22: 0 commits2026-07-23: 2 commits2026-07-24: 3 commits2026-07-25: 2 commits2026-07-26: 13 commits2026-07-27: 4 commits2026-07-28: 18 commits2026-07-29: 6 commits2026-07-30: 1 commit2026-07-31: 9 commits2026-08-01: 2 commits2026-08-02: 1 commit2026-08-03: 0 commits2026-08-04: 0 commits2026-08-05: 7 commits2026-08-06: 2 commits2026-08-07: 0 commits2026-08-08: 8 commits2026-08-09: 3 commits2026-08-10: 7 commits2026-08-11: 5 commits2026-08-12: 2 commits2026-08-13: 7 commits2026-08-14: 12 commits2026-08-15: 7 commits2026-08-16: 16 commits2026-08-17: 6 commits2026-08-18: 10 commits2026-08-19: 2 commits2026-08-20: 1 commit2026-08-21: 0 commits2026-08-22: 0 commits2026-08-23: 1 commit2026-08-24: 11 commits2026-08-25: 6 commits2026-08-26: 14 commits2026-08-27: 8 commits2026-08-28: 7 commits2026-08-29: 18 commits2026-08-30: 21 commits2026-08-31: 8 commits2026-09-01: 7 commits2026-09-02: 4 commits2026-09-03: 0 commits2026-09-04: 5 commits2026-09-05: 7 commits2026-09-06: 14 commits2026-09-07: 33 commits2026-09-08: 14 commits2026-09-09: 9 commits2026-09-10: 4 commits2026-09-11: 3 commits2026-09-12: 0 commits2026-09-13: 2 commits2026-09-14: 0 commits2026-09-15: 0 commits2026-09-16: 0 commits2026-09-17: 0 commits2026-09-18: 1 commit2026-09-19: 0 commits2026-09-20: 1 commit2026-09-21: 1 commit2026-09-22: 0 commits2026-09-23: 6 commits2026-09-24: 1 commit2026-09-25: 0 commits2026-09-26: 0 commits
874 commits in the last yearLessMore

Signals and awards

derived from tracked data
  • Very active

    874 commits in 52 weeks

  • Permissive license

    MIT

  • Continuous integration

    Automated checks passing

What hunk does

Hunk provides an interactive terminal UI specifically built for reviewing codebase changes, natively integrating with version control systems like Git, Jujutsu, and Sapling. It moves beyond standard diff outputs by enabling a multi-file review stream with sidebar navigation and responsive auto layouts like split or stacked views. Uniquely, it is designed for the era of AI coding, supporting inline AI and agent annotations directly alongside the code so developers can review agent-generated patches in context. It operates in real-time, utilizing watch mode to automatically reload as the working tree changes during automated refactors.

Software engineers and AI tool builders who work extensively in the terminal and need a richer way to review complex changesets, especially those generated by autonomous AI agents.

  • Review-first interactive UI: Navigate smoothly through complex changesets with a persistent sidebar and a continuous multi-file review stream.
  • Inline agent annotations: View AI-generated context, explanations, and notes directly inline with code diffs for better auditing.
  • Responsive auto layouts: Dynamically switches between split and stacked views based on the available terminal dimensions.
  • Watch mode: Auto-reloads file and Git-backed reviews instantly when the working tree changes in the background.
  • Cross-VCS native support: Operates natively across different version control tools, including Git, Jujutsu (jj), and Sapling.
  • Rich input handling: Fully interactable via mouse clicks and scrolling, while also supporting a fallback pager-compatible mode.

Where teams use it

Reviewing Agent-Generated Code

Developers use Hunk to review massive patches authored by autonomous coding agents, leveraging inline annotations to understand the agent's context and decisions.

Interactive Local Code Review

Engineers reviewing their own unstaged or staged changes across multiple files using a rich terminal interface rather than scrolling through standard Git diff output.

Live Refactoring Validation

Using watch mode to continuously observe structural or wide-ranging file changes in real-time as a Python script or AST refactoring tool runs.

Jujutsu workflow enhancement

Developers utilizing Jujutsu (jj) use Hunk as their default diff viewer to better visualize parallel branch changes.

Getting started: Install globally via npm (npm i -g hunkdiff) and run it against your repository.

README

main branch

hunk

Hunk is a review-first terminal diff viewer for agent-authored changesets, built on OpenTUI and Pierre diffs.

hunk.dev · Documentation

CI status Latest release MIT License Join the Discord community

  • multi-file review stream with sidebar navigation
  • inline AI and agent annotations beside the code
  • split, unified, and responsive auto layouts
  • watch mode for auto-reloading file and Git-backed reviews
  • keyboard, mouse, pager, and Git difftool support
image
Split view with sidebar and inline AI notes
image
Unified view and mouse-selectable menus

Install

The default installation method on macOS and Linux downloads a standalone binary and installs it into ~/.hunk. It checks the archive against the release checksum when both SHA256SUMS and a supported checksum tool are available, and warns otherwise. Release discovery uses Hunk's anonymous aggregate endpoint with direct GitHub fallback:

curl -fsSL https://hunk.dev/install.sh | sh

Windows users can install with npm or mise. Other installation methods are also available:

npm i -g hunkdiff                    # macOS, Linux, or Windows; requires Node.js 22+
brew install hunk                    # macOS or Linux
mise use -g hunk                     # macOS, Linux, or Windows

Note

If you previously installed hunk via modem-dev/tap, be sure to uninstall it first with brew uninstall modem-dev/tap/hunk.

Windows requires mise 2026.8.6 or newer. Nix users can use the default package exported in flake.nix; see the Nix guide for details. Hunk also ships as a default tool in Omarchy, installed through mise.

Requirements:

  • macOS, Linux, or Windows
  • On x86-64, a CPU with SSE4.2 (Intel Nehalem 2008+, AMD Bulldozer 2011+); arm64 has no CPU feature floor
  • Node.js 22+ for the npm install; the install script, Homebrew, mise, and Nix ship a standalone binary that does not require Node.js
  • Git recommended for most workflows

Update Hunk

Starting with Hunk 0.20, npm, Homebrew, and default install-script installs use Hunk’s canonical update command:

hunk update          # install the newest release
hunk update --check  # check without installing
hunk update 0.20.0   # select an exact npm or default install-script release

On an older release, update once with the installer or package manager that installed Hunk, then use hunk update going forward. Custom HUNK_INSTALL_DIR installs must re-run the installer with the same directory; mise, Nix, and source installs use their owning tools instead.

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 --fast                    # experimentally offload eligible syntax highlighting
hunk diff --watch              # auto-reload as the working tree changes
hunk show                      # review the latest commit
hunk show HEAD~1               # review an earlier commit
hunk log                       # browse history on a terminal; print when redirected
hunk log --static              # force static output, paging when needed

hunk log is one auto-responsive, read-only history surface, not a repository manager. On a terminal it opens the desktop history browser; pipes and redirects receive shell-native static records automatically, and --static forces static output that pages only when needed. The selected VCS adapter owns traversal, filtering, refs, and how a history item opens for review; the bundled Git and Jujutsu adapters both implement that public capability. Static output keeps full commit, author, date, message, branch/bookmark, remote, and tag details; --oneline provides compact records, and --theme uses the same palette as Hunk review. Interactive history groups commits by local-calendar day with account-like author handles and relative times, while keeping commit ids right-aligned and clickable. Enable Graph view from the View menu to replace day groups with commit-topology lanes. Press v and move with Up/Down or k/j to select a contiguous range. Shift+Up/Shift+Down, uppercase K/J, and Shift-click extend directly. Escape collapses the selection; opening the range reviews the inclusive cumulative change from the oldest commit's parent through the newest commit. History also shares review's b/f full-page and u/d half-page movement keys. Range selection is disabled with --all or author, message, date, and path filters because traversal can interleave or hide commits. After opening a commit or range, quit its normal Hunk review to return to the same selection. History controls are configurable through canonical hunk.history.* keybindings.

Working with Jujutsu and Sapling

Hunk auto-detects Jujutsu and Sapling checkouts, so hunk diff [revset] and hunk show [revset] use native revsets inside jj or Sapling workspaces. hunk log --vcs jj also reads JJ history directly, including in a non-colocated workspace. To override VCS detection, set vcs = "git" or vcs = "jj" or vcs = "sl" in config.

Working with raw files and patches

hunk diff --files before.ts after.ts        # compare two files directly
hunk diff --files before.ts after.ts --watch # auto-reload when either file changes
git diff --no-color | hunk patch -          # review a patch from stdin

Watch mode remains continuous. Direct-file and Git-backed reviews normally use filesystem observation to refresh promptly, with periodic polling retained as a fallback for missed events or unavailable watchers. Jujutsu and Sapling reviews currently use polling rather than filesystem observation.

Working with agents

  1. Open Hunk in another terminal with hunk diff or hunk show.
  2. Tell your agent to add the skill file returned by hunk skill path.
  3. 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. Run `hunk skill path` to get the skill path.

For the full live-session and --agent-context workflow guide, see the agent workflow guide. Experimental rich STML note bodies require starting the review with --experimental; plain agent notes remain the default.

Feature comparison

Capability hunk lumen difftastic delta diff-so-fancy diff
Review-first interactive UI ✅ ✅ ❌ ❌ ❌ ❌
Multi-file review stream + sidebar ✅ ✅ ❌ ❌ ❌ ❌
Inline agent / AI annotations ✅ ❌ ❌ ❌ ❌ ❌
Responsive auto split/unified layout ✅ ❌ ❌ ❌ ❌ ❌
Mouse support inside the viewer ✅ ✅ ❌ ❌ ❌ ❌
Runtime view toggles ✅ ✅ ❌ ❌ ❌ ❌
Syntax highlighting ✅ ✅ ✅ ✅ ❌ ❌
Structural diffing ❌ ❌ ✅ ❌ ❌ ❌
Pager-compatible mode ✅ ❌ ✅ ✅ ✅ ✅

Hunk is optimized for reviewing a full changeset interactively.

Advanced

Config

You can persist preferences to a config file:

  • ~/.config/hunk/config.toml
  • .hunk/config.toml

Example:

theme = "github-dark-default" # any built-in theme id, auto, or custom
mode = "auto"        # auto, split, unified
vcs = "git"          # git, jj, sl
watch = false
exclude_untracked = false
line_numbers = true
tab_width = 4        # tab stops, 1-16
file_gap = 1         # rows between files, including the ─ rule; 0 hides it
hunk_gap = 0         # blank rows before later hunks
wheel_scroll_lines = "auto" # auto acceleration, or a fixed 1-10 rows per event
wrap_lines = false
menu_bar = true
animations = true
sidebar = "auto"     # "auto", true, false
agent_notes = false
prompt_save_view_preferences = true
transparent_background = false

Choose a built-in theme, auto, or a custom theme with theme. See the theme guide for automatic selection, custom theme tables, syntax scopes, and legacy syntax-table migration.

exclude_untracked affects Git/Sapling working-tree hunk diff sessions only. tab_width controls source-code tab stops and can be overridden with -x4 or --tab-width 4. file_gap is separator height between files, including the ─ rule; hunk_gap is blank rows before later hunks. wheel_scroll_lines is a user-only preference and can be overridden with --wheel-scroll-lines 3. Set animations = false to make panes open and close immediately. prompt_save_view_preferences = false disables the quit prompt for saving changed view preferences. transparent_background can also be written as transparentBackground.

Keybindings

Every keyboard shortcut is a named command, and a [keybindings] table in your user config remaps command ids to the keys you want them on — several keys per command, exclusive claims over defaults, and false to unbind. See the keybinding guide for the rules, the chord grammar, and the full table of built-in commands and their default keys.

Git integration

Set Hunk as your Git pager so git diff and git show open in Hunk automatically:

Note

Untracked files are auto-included only for Hunk's own hunk diff working-tree loader. If you open git diff through hunk pager, Git still decides the patch contents, so untracked files will not appear there.

git config --global core.pager "hunk pager"

Or in your Git config:

[core]
    pager = hunk pager

If you want to keep Git's default pager and add opt-in aliases instead:

git config --global alias.hdiff "-c core.pager=\"hunk pager\" diff"
git config --global alias.hshow "-c core.pager=\"hunk pager\" show"

Jujutsu pager integration

To use Hunk as jj's pager, run jj config edit --user and update:

[ui]
pager = ["hunk", "pager"]
diff-formatter = ":git"

Sapling pager integration

To use Hunk as Sapling's pager, run sl config -u and update:

[pager]
pager = hunk pager

Extensions (experimental)

The extension API is experimental and may change in breaking ways between minor releases while it stabilizes; breaking changes are called out in release notes.

Hunk loads plain TypeScript extensions from ~/.config/hunk/extensions/, from a repository's .hunk/extensions/ (after you explicitly trust that repository), and from --extension <path> for development. --no-extensions turns those off for one run; Hunk's own bundled backends (Git, Jujutsu, and Sapling) stay loaded.

An extension can add generic top-level CLI workflows, contribute themes and file-extension → language mappings, add a VCS backend, rewrite the changeset before review (collapse lockfiles, reorder files by review priority), replace the file-navigation sidebar with its own React component, react to lifecycle events, and show transient messages:

// ~/.config/hunk/extensions/collapse-lockfiles.ts
import type { HunkExtensionAPI } from "hunkdiff/extension";

export default function (hunk: HunkExtensionAPI) {
  hunk.transformChangeset((changeset, ctx) => {
    const files = changeset.files.filter((file) => !file.path.endsWith(".lock"));
    ctx.notify(`Collapsed ${changeset.files.length - files.length} lockfiles`);
    return { ...changeset, files };
  });
}

Extensions shared as git repositories install straight from their host, and a hunk-extension GitHub topic marks community ones:

hunk extension install acme/[email protected]   # or git:host/path, a URL, a local path
hunk extension list                                 # then update [name] / remove <name>

Browse community extensions at github.com/topics/hunk-extension; publish yours by pushing the extension to a repository root and adding that topic.

See the extension guide for the full API, the trust model, publishing guidance, and the [extensions] / [extension.<id>] config reference. Installable examples include a dependency-free hunk gh 123 GitHub PR workflow, review triage, authoritative review snapshot export, an optional rendered Markdown file view, and a Vim navigation mode built from public semantic commands.

OpenTUI component

Hunk also publishes HunkDiffView and lower-level primitives from hunkdiff/opentui for embedding the same diff renderer in your own OpenTUI app.

See the OpenTUI component guide for install, API, and runnable examples.

Examples

Ready-to-run demo diffs live in the examples directory.

Each example includes the exact command to run from the repository root.

Contributing

💬 Chat with users/contributors on the Modem Discord server

For source setup, tests, packaging checks, and repo architecture, see the contribution guide.

Sponsor

Sponsored by Modem.

Modem

License

MIT

View on GitHub

Recent activity

commits and pull requests

Releases and announcements

71 total
  1. v0.22.0v0.22.0Sep 10, 202611.6K downloads

    ## What's Changed * test(website): cover stable changelog promotion by @benvinegar in https://github.com/modem-dev/hunk/pull/973 * feat(website): add VCS landing pages and sitemap alias by @benvinegar in https://github.com/modem-dev/hunk/pull/970 * Add hunk-gh, hunk-viewed to hunk-extension marketplace by @benvinegar in https://github.com/modem-dev/hunk/pull/981 * fix(pager): stop CPU pegging and truncation on large piped documents by @benvinegar in https://github.com/modem-dev/hunk/pull/978 * feat(extensions): show delegated review metadata by @benvinegar in https://github.com/modem-dev/hunk/pull/986 * feat(extensions): add review reload requests by @benvinegar in https://github.com/modem-dev/hunk/pull/988 * build: upgrade Bun to 1.4.2 by @benvinegar in https://github.com/modem-dev/hunk/pull/990 * feat: add static-first history browsing by @benvinegar in https://github.com/modem-dev/hunk/pull/979 * refactor(ui): share desktop chrome with history by @benvinegar in https://github.com/modem-dev/hunk/pull/983 * feat(ui): make history automatically responsive by @benvinegar in https://github.com/modem-dev/hunk/pull/987 * fix(ui): prepare history reviews before terminal handoff by @benv

  2. v0.22.0-beta.1v0.22.0-beta.1Sep 9, 2026pre-release28 downloads

    ## What's Changed * feat(cli): show metadata for direct revision reviews by @benvinegar in https://github.com/modem-dev/hunk/pull/1064 * perf(test): make suite sharding configurable by @benvinegar in https://github.com/modem-dev/hunk/pull/1057 * perf(ci): parallelize validation lanes by @benvinegar in https://github.com/modem-dev/hunk/pull/1058 * perf(nix): skip unchanged lock generation by @benvinegar in https://github.com/modem-dev/hunk/pull/1059 * fix(update): avoid GitHub release rate limits by @benvinegar in https://github.com/modem-dev/hunk/pull/1069 * fix(ui): swap unified and split layout keys by @benvinegar in https://github.com/modem-dev/hunk/pull/1068 * chore(release): prepare v0.22.0-beta.1 by @benvinegar in https://github.com/modem-dev/hunk/pull/1070 * chore(release): include latest main in v0.22.0-beta.1 by @benvinegar in https://github.com/modem-dev/hunk/pull/1071 **Full Changelog**: https://github.com/modem-dev/hunk/compare/v0.22.0-beta.0...v0.22.0-beta.1

  3. v0.22.0-beta.0v0.22.0-beta.0Sep 8, 2026pre-release15 downloads

    ## Hunk 0.22 beta: history becomes a review workspace Hunk 0.22 turns repository history into a responsive review workspace: browse commits, select contiguous ranges, carry review context into the diff, and leave precise threaded feedback without leaving the terminal. ```sh hunk update 0.22.0-beta.0 npm install -g [email protected] ``` ### Browse commits and review ranges `hunk log` now opens a responsive, themed history browser for Git and Jujutsu. Commits are grouped by day, optional graph lines preserve topology, and visual or Shift-based range selection opens the cumulative diff for a contiguous set of commits. History has configurable command bindings, merge-parent selection, and keeps your theme and diff preferences as you move between history and review. [#979](https://github.com/modem-dev/hunk/pull/979) [#987](https://github.com/modem-dev/hunk/pull/987) [#1011](https://github.com/modem-dev/hunk/pull/1011) [#1031](https://github.com/modem-dev/hunk/pull/1031) [#1038](https://github.com/modem-dev/hunk/pull/1038) [#1039](https://github.com/modem-dev/hunk/pull/1039) ### Select and discuss exact code ranges Persistent mouse and keyboard selections can now span multiple

  4. v0.21.1v0.21.1Sep 5, 20264.7K downloads

    ## Faster, reliable paging in LazyGit Hunk 0.21.1 fixes a pager regression that could peg a CPU core, consume gigabytes of memory, and truncate large color-heavy documents opened through hosts such as LazyGit. ```sh hunk update 0.21.1 npm install -g [email protected] ``` ### Pager reliability ANSI styling is now restored in a single pass instead of repeatedly rescanning and reallocating the complete document. Headless pager output also writes the full document before exiting, avoiding the previous 64 KB truncation limit for piped consumers. [#978](https://github.com/modem-dev/hunk/pull/978) ### Compatibility notes - No configuration, command, or extension API changes. - Runtime requirements are unchanged from Hunk 0.21.0. <details> <summary>All merged pull requests</summary> - Fix pager CPU pegging and truncation on large piped documents by [@benvinegar](https://github.com/benvinegar) in [#978](https://github.com/modem-dev/hunk/pull/978) </details> **Release notes**: https://hunk.dev/changelog/0.21/ **Full changelog**: https://github.com/modem-dev/hunk/compare/v0.21.0...v0.21.1

  5. v0.21.0v0.21.0Sep 2, 20262.5K downloads

    ## Hunk 0.21 — secure sessions, threaded reviews, richer comparisons Upgrade for threaded agent conversations, safer live sessions across restarts and upgrades, and exact revision or file comparisons across Git, Jujutsu, and Sapling. ```sh # Existing managed installs hunk update 0.21.0 # npm installs npm install -g [email protected] ``` ### Threaded reviews and safer live sessions Inline notes are now editable conversations: continue a discussion with nested replies, edit notes, use mouse or keyboard actions, and dismiss agent notes that no longer need attention. Session clients can also navigate straight to a comment by ID. [#925](https://github.com/modem-dev/hunk/pull/925) [#845](https://github.com/modem-dev/hunk/pull/845) The local session broker now authenticates producers and CLI controls, bounds unauthenticated work, and prevents stale connections from regaining authority. When an incompatible older daemon becomes idle, open Hunk windows reconnect automatically instead of trusting or force-killing it. [#932](https://github.com/modem-dev/hunk/pull/932) [#933](https://github.com/modem-dev/hunk/pull/933) [#955](https://github.com/modem-dev/hunk/pull/955) ### Compare the exa

Code frequency

additions and deletions
+222K-222KWeek of 2026-03-15: +16,586 linesWeek of 2026-03-15: -4,780 linesWeek of 2026-03-22: +24,493 linesWeek of 2026-03-22: -7,478 linesWeek of 2026-03-29: +6,826 linesWeek of 2026-03-29: -3,585 linesWeek of 2026-04-05: +23,721 linesWeek of 2026-04-05: -15,709 linesWeek of 2026-04-12: +16,205 linesWeek of 2026-04-12: -12,431 linesWeek of 2026-04-19: +181 linesWeek of 2026-04-19: -7 linesWeek of 2026-04-26: +38 linesWeek of 2026-04-26: -6 linesWeek of 2026-05-03: +3,195 linesWeek of 2026-05-03: -341 linesWeek of 2026-05-10: +10,897 linesWeek of 2026-05-10: -2,449 linesWeek of 2026-05-17: +15,226 linesWeek of 2026-05-17: -3,862 linesWeek of 2026-05-24: +3,233 linesWeek of 2026-05-24: -304 linesWeek of 2026-05-31: +1,987 linesWeek of 2026-05-31: -137 linesWeek of 2026-06-07: +10,367 linesWeek of 2026-06-07: -503 linesWeek of 2026-06-14: +6,522 linesWeek of 2026-06-14: -2,097 linesWeek of 2026-06-21: +238 linesWeek of 2026-06-21: -5 linesWeek of 2026-06-28: +681 linesWeek of 2026-06-28: -163 linesWeek of 2026-07-05: +1,671 linesWeek of 2026-07-05: -1,009 linesWeek of 2026-07-12: +10,758 linesWeek of 2026-07-12: -850 linesWeek of 2026-07-19: +3,613 linesWeek of 2026-07-19: -878 linesWeek of 2026-07-26: +76,667 linesWeek of 2026-07-26: -23,387 linesWeek of 2026-08-02: +17,145 linesWeek of 2026-08-02: -2,022 linesWeek of 2026-08-09: +65,680 linesWeek of 2026-08-09: -25,970 linesWeek of 2026-08-16: +40,487 linesWeek of 2026-08-16: -20,234 linesWeek of 2026-08-23: +46,685 linesWeek of 2026-08-23: -7,453 linesWeek of 2026-08-30: +221,991 linesWeek of 2026-08-30: -178,816 linesWeek of 2026-09-06: +70,551 linesWeek of 2026-09-06: -28,343 linesWeek of 2026-09-13: +9,111 linesWeek of 2026-09-13: -674 linesWeek of 2026-09-20: +1,301 linesWeek of 2026-09-20: -591 linesMar 15, 2026Sep 20, 2026
+706.1K lines added, -344.1K removed over the last year.

Commits per week

last 52 weeks
1210Week of 2025-09-28: 0 commitsWeek of 2025-10-05: 0 commitsWeek of 2025-10-12: 0 commitsWeek of 2025-10-19: 0 commitsWeek of 2025-10-26: 0 commitsWeek of 2025-11-02: 0 commitsWeek of 2025-11-09: 0 commitsWeek of 2025-11-16: 0 commitsWeek of 2025-11-23: 0 commitsWeek of 2025-11-30: 0 commitsWeek of 2025-12-07: 0 commitsWeek of 2025-12-14: 0 commitsWeek of 2025-12-21: 0 commitsWeek of 2025-12-28: 0 commitsWeek of 2026-01-04: 0 commitsWeek of 2026-01-11: 0 commitsWeek of 2026-01-18: 0 commitsWeek of 2026-01-25: 0 commitsWeek of 2026-02-01: 0 commitsWeek of 2026-02-08: 0 commitsWeek of 2026-02-15: 0 commitsWeek of 2026-02-22: 0 commitsWeek of 2026-03-01: 0 commitsWeek of 2026-03-08: 0 commitsWeek of 2026-03-15: 121 commitsWeek of 2026-03-22: 108 commitsWeek of 2026-03-29: 34 commitsWeek of 2026-04-05: 32 commitsWeek of 2026-04-12: 12 commitsWeek of 2026-04-19: 2 commitsWeek of 2026-04-26: 2 commitsWeek of 2026-05-03: 20 commitsWeek of 2026-05-10: 36 commitsWeek of 2026-05-17: 32 commitsWeek of 2026-05-24: 20 commitsWeek of 2026-05-31: 11 commitsWeek of 2026-06-07: 28 commitsWeek of 2026-06-14: 16 commitsWeek of 2026-06-21: 1 commitsWeek of 2026-06-28: 18 commitsWeek of 2026-07-05: 3 commitsWeek of 2026-07-12: 13 commitsWeek of 2026-07-19: 10 commitsWeek of 2026-07-26: 53 commitsWeek of 2026-08-02: 18 commitsWeek of 2026-08-09: 43 commitsWeek of 2026-08-16: 35 commitsWeek of 2026-08-23: 65 commitsWeek of 2026-08-30: 52 commitsWeek of 2026-09-06: 77 commitsWeek of 2026-09-13: 3 commitsWeek of 2026-09-20: 9 commitsSep 28, 2025Sep 20, 2026
874 commits in the last 52 weeks.

When work happens

weekday and hour
SunMonTueWedThuFriSat036912151821Sun 0:00 — 1 commitsSun 1:00 — 4 commitsSun 2:00 — 1 commitsSun 3:00 — 0 commitsSun 4:00 — 0 commitsSun 5:00 — 2 commitsSun 6:00 — 0 commitsSun 7:00 — 2 commitsSun 8:00 — 7 commitsSun 9:00 — 18 commitsSun 10:00 — 24 commitsSun 11:00 — 14 commitsSun 12:00 — 8 commitsSun 13:00 — 8 commitsSun 14:00 — 10 commitsSun 15:00 — 9 commitsSun 16:00 — 12 commitsSun 17:00 — 5 commitsSun 18:00 — 5 commitsSun 19:00 — 7 commitsSun 20:00 — 8 commitsSun 21:00 — 11 commitsSun 22:00 — 11 commitsSun 23:00 — 11 commitsMon 0:00 — 4 commitsMon 1:00 — 0 commitsMon 2:00 — 0 commitsMon 3:00 — 1 commitsMon 4:00 — 0 commitsMon 5:00 — 2 commitsMon 6:00 — 0 commitsMon 7:00 — 2 commitsMon 8:00 — 12 commitsMon 9:00 — 8 commitsMon 10:00 — 8 commitsMon 11:00 — 8 commitsMon 12:00 — 4 commitsMon 13:00 — 10 commitsMon 14:00 — 16 commitsMon 15:00 — 11 commitsMon 16:00 — 3 commitsMon 17:00 — 5 commitsMon 18:00 — 3 commitsMon 19:00 — 3 commitsMon 20:00 — 11 commitsMon 21:00 — 7 commitsMon 22:00 — 15 commitsMon 23:00 — 9 commitsTue 0:00 — 6 commitsTue 1:00 — 0 commitsTue 2:00 — 0 commitsTue 3:00 — 0 commitsTue 4:00 — 1 commitsTue 5:00 — 0 commitsTue 6:00 — 0 commitsTue 7:00 — 1 commitsTue 8:00 — 11 commitsTue 9:00 — 11 commitsTue 10:00 — 21 commitsTue 11:00 — 12 commitsTue 12:00 — 3 commitsTue 13:00 — 2 commitsTue 14:00 — 12 commitsTue 15:00 — 11 commitsTue 16:00 — 5 commitsTue 17:00 — 7 commitsTue 18:00 — 3 commitsTue 19:00 — 4 commitsTue 20:00 — 5 commitsTue 21:00 — 14 commitsTue 22:00 — 18 commitsTue 23:00 — 5 commitsWed 0:00 — 7 commitsWed 1:00 — 0 commitsWed 2:00 — 0 commitsWed 3:00 — 2 commitsWed 4:00 — 0 commitsWed 5:00 — 0 commitsWed 6:00 — 0 commitsWed 7:00 — 2 commitsWed 8:00 — 2 commitsWed 9:00 — 28 commitsWed 10:00 — 19 commitsWed 11:00 — 13 commitsWed 12:00 — 10 commitsWed 13:00 — 8 commitsWed 14:00 — 2 commitsWed 15:00 — 3 commitsWed 16:00 — 7 commitsWed 17:00 — 0 commitsWed 18:00 — 1 commitsWed 19:00 — 5 commitsWed 20:00 — 5 commitsWed 21:00 — 15 commitsWed 22:00 — 7 commitsWed 23:00 — 0 commitsThu 0:00 — 3 commitsThu 1:00 — 0 commitsThu 2:00 — 1 commitsThu 3:00 — 1 commitsThu 4:00 — 0 commitsThu 5:00 — 0 commitsThu 6:00 — 0 commitsThu 7:00 — 0 commitsThu 8:00 — 4 commitsThu 9:00 — 5 commitsThu 10:00 — 5 commitsThu 11:00 — 1 commitsThu 12:00 — 2 commitsThu 13:00 — 7 commitsThu 14:00 — 6 commitsThu 15:00 — 8 commitsThu 16:00 — 2 commitsThu 17:00 — 1 commitsThu 18:00 — 2 commitsThu 19:00 — 1 commitsThu 20:00 — 5 commitsThu 21:00 — 3 commitsThu 22:00 — 1 commitsThu 23:00 — 2 commitsFri 0:00 — 0 commitsFri 1:00 — 1 commitsFri 2:00 — 1 commitsFri 3:00 — 0 commitsFri 4:00 — 0 commitsFri 5:00 — 0 commitsFri 6:00 — 1 commitsFri 7:00 — 0 commitsFri 8:00 — 1 commitsFri 9:00 — 3 commitsFri 10:00 — 6 commitsFri 11:00 — 11 commitsFri 12:00 — 8 commitsFri 13:00 — 10 commitsFri 14:00 — 7 commitsFri 15:00 — 4 commitsFri 16:00 — 4 commitsFri 17:00 — 4 commitsFri 18:00 — 6 commitsFri 19:00 — 2 commitsFri 20:00 — 4 commitsFri 21:00 — 8 commitsFri 22:00 — 5 commitsFri 23:00 — 4 commitsSat 0:00 — 1 commitsSat 1:00 — 0 commitsSat 2:00 — 0 commitsSat 3:00 — 2 commitsSat 4:00 — 0 commitsSat 5:00 — 0 commitsSat 6:00 — 1 commitsSat 7:00 — 2 commitsSat 8:00 — 6 commitsSat 9:00 — 5 commitsSat 10:00 — 4 commitsSat 11:00 — 17 commitsSat 12:00 — 8 commitsSat 13:00 — 7 commitsSat 14:00 — 6 commitsSat 15:00 — 6 commitsSat 16:00 — 7 commitsSat 17:00 — 8 commitsSat 18:00 — 4 commitsSat 19:00 — 10 commitsSat 20:00 — 5 commitsSat 21:00 — 15 commitsSat 22:00 — 3 commitsSat 23:00 — 3 commits
Commit volume by weekday and hour (UTC). Larger dots mean more commits.
DateListRankStars gained
May 7, 2026daily#7+122
May 6, 2026daily#22+62
  • freeCodeCamp/freeCodeCamp

    freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming, and computer science for free.

    456.7K stars · TypeScript

  • openclaw/openclaw

    The AI that really does things. Any OS. Any Platform. The lobster way. 🦞

    391.3K stars · TypeScript

  • anomalyco/opencode

    The open source coding agent.

    211.7K stars · TypeScript

  • n8n-io/n8n

    Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

    206.7K stars · TypeScript

  • yt-dlp/yt-dlp

    A feature-rich command-line audio/video downloader

    195.5K stars · Python

  • microsoft/vscode

    Visual Studio Code

    193.5K stars · TypeScript