← all repositories
modem-dev/hunk

A diff viewer for when your coworker is an agent

It exists because agent-generated patches deserve more than a scroll-through in a plain pager.

7.6k stars TypeScript Coding Assistants
hunk
Velocity · 7d
+89
★ / day
Trend
cooling
star history

What it does

Hunk is a terminal diff viewer built on OpenTUI and Pierre diffs that turns Git or Jujutsu changesets into a multi-file review stream. It renders split or stacked layouts with syntax highlighting, sidebar navigation, and inline annotations from AI agents. It also works as a standalone file comparator or a pipe-friendly patch viewer.

The interesting bit

The project treats agentic coding as a first-class workflow, not an afterthought. It exposes a skill file that agents can load to annotate a live Hunk session in real time, effectively turning the viewer into a shared review surface between human and model. That is a genuinely unusual take on a diff tool.

Key highlights

  • Native Git and Jujutsu integration with auto-detection and watch mode for live reloads.
  • Inline AI and agent annotations rendered directly beside the relevant hunks.
  • Responsive layouts that automatically switch between split and stacked views.
  • Mouse, keyboard, and pager support, plus an embeddable HunkDiffView component for other OpenTUI apps.
  • Custom TOML-based theming with inheritance from built-in palettes.

Caveats

  • No structural diffing; it is purely text-based, unlike tools such as difftastic.
  • When used as a Git core pager, untracked files are excluded because Git still controls the patch contents.

Verdict

Grab this if you are already using agents to generate code and want a terminal-native way to review their output without context-switching to a browser. Skip it if you need structural, syntax-tree-aware diffs or purely non-interactive batch processing.

Frequently asked

What is modem-dev/hunk?
It exists because agent-generated patches deserve more than a scroll-through in a plain pager.
Is hunk open source?
Yes — modem-dev/hunk is open source, released under the MIT license.
What language is hunk written in?
modem-dev/hunk is primarily written in TypeScript.
How popular is hunk?
modem-dev/hunk has 7.6k stars on GitHub and is currently cooling off.
Where can I find hunk?
modem-dev/hunk is on GitHub at https://github.com/modem-dev/hunk.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.