# modem-dev/hunk

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/modem-dev-hunk).**

_How this analysis was created: the description and tags below were written by an AI model that read this project's README and public documentation pages; stars, license and language come straight from the GitHub API. The model does not read the source code._

9,791 stars · 327 forks · TypeScript · MIT

## Links

- GitHub: https://github.com/modem-dev/hunk
- Homepage: https://hunk.dev
- awesome-repositories: https://awesome-repositories.com/repository/modem-dev-hunk.md

## Topics

`agents` `cli` `code-review` `diff` `git` `jj` `jujutsu` `sapling` `terminal` `tui`

## Description

Hunk is an interactive terminal diff viewer for reviewing code changes across many files. It presents a changeset as one scrollable stream with sidebar navigation, split, unified, or responsive layouts, and syntax highlighting, controlled by keyboard or mouse. It natively understands Git, Jujutsu, and Sapling checkouts, can act as the Git pager, opens GitHub pull requests, and also compares raw files, piped diffs, and patches from standard input.

A defining focus is review alongside coding agents. Agents can supply rationale from a file or add inline notes beside the changed lines, and scripts or agents can inspect and drive a running review from the command line, adding and replying to comments, jumping to lines, and reloading or exporting. Live sessions register with a shared local background daemon, and Hunk prints or publishes agent skills that match the installed version. Hunk is also extensible and embeddable: TypeScript extensions installed from Git or npm can add commands, themes, sidebars, file views, keyboard modes, and version control backends, and the diff rendering is published as a component for other OpenTUI terminal applications.

Beyond viewing diffs, Hunk covers hunk triage (approved, investigate, or blocked), threaded inline notes, and export of saved review state to JSON. It also offers worktree status views, a commit history browser, full file and directory browsing with Markdown preview, Vim-style and search navigation, and configurable keybindings and themes. Large reviews are kept responsive through background highlighting and row virtualization, and a benchmarking suite measures load, layout, memory, and latency.

Hunk can be installed and run through Nix flakes, including a Home Manager module, a pinned development shell, and a single-command way to try it without installing. Bash and Zsh completion scripts are available.

## Tags

### Development Tools & Productivity

- [Interactive Diff Viewers](https://awesome-repositories.com/f/development-tools-productivity/git-object-inspection/interactive-diff-viewers.md) — Provides an interactive terminal diff viewer with a multi-file stream, sidebar navigation, split or unified layouts, and keyboard or mouse control. ([source](https://github.com/modem-dev/hunk#readme))
- [Change Review Interfaces](https://awesome-repositories.com/f/development-tools-productivity/code-quality-analysis/static-analysis-engines/static-analysis-tools/code-analysis-tools/local-change-reviewers/change-review-interfaces.md) — Reviews Git, Jujutsu, and Sapling revisions, ranges, history, and working-tree changes in one interface and can replace the default Git pager.
- [Inline Review Comments](https://awesome-repositories.com/f/development-tools-productivity/inline-review-comments.md) — Adds inline notes anchored to lines or selections, with editing, nested threaded replies, deletion, and keyboard navigation between notes. ([source](https://github.com/modem-dev/hunk/blob/main/CHANGELOG.md))
- [Live Review Session Controls](https://awesome-repositories.com/f/development-tools-productivity/live-review-session-controls.md) — Lets agents and scripts add, reply to, list and navigate comments, highlight ranges, jump to lines, and reload or export a running review. ([source](https://github.com/modem-dev/hunk/blob/main/CHANGELOG.md))
- [Multi-VCS Diff Inspection](https://awesome-repositories.com/f/development-tools-productivity/multi-vcs-diff-inspection.md) — Reviews working-tree changes, revision history, and pull requests across Git, Jujutsu, and Sapling from one interface.
- [Terminal-Based Code Review](https://awesome-repositories.com/f/development-tools-productivity/terminal-based-code-review.md) — Reviews code changes, commits, and pull requests in a terminal diff viewer with split or unified layouts, hunk navigation, search, and inline notes.
- [Unified Diff Reviewers](https://awesome-repositories.com/f/development-tools-productivity/code-quality-analysis/static-analysis-engines/static-analysis-tools/code-analysis-tools/local-change-reviewers/change-review-interfaces/live-diff-views/unified-diff-reviewers.md) — Watches files and Git-backed reviews for changes and refreshes the displayed diff without restarting the viewer. ([source](https://github.com/modem-dev/hunk#readme))
- [Extension Installation Commands](https://awesome-repositories.com/f/development-tools-productivity/command-line-interfaces/application-extensions/git-command-line-extensions/extension-installation-commands.md) — Installs, lists, updates, and removes TypeScript extensions from Git or npm that add commands, themes, file views, and backends. ([source](https://github.com/modem-dev/hunk/blob/main/CHANGELOG.md))
- [Git Integrated Interfaces](https://awesome-repositories.com/f/development-tools-productivity/git-integrated-interfaces.md) — Registers as the Git pager or difftool, via aliases or declarative configuration, so diff and show open in the interactive viewer. ([source](https://github.com/modem-dev/hunk#readme))
- [Hunk Navigation](https://awesome-repositories.com/f/development-tools-productivity/hunk-navigation.md) — Moves a visible cursor line by line, by page, and between hunks across files with bracket keys, plus range selection and top or bottom jumps. ([source](https://github.com/modem-dev/hunk/blob/main/CHANGELOG.md))
- [Multi-File Review Streams](https://awesome-repositories.com/f/development-tools-productivity/multi-file-review-streams.md) — Presents a whole changeset as one scrollable stream of files in sidebar order for continuous review. ([source](https://github.com/modem-dev/hunk/blob/main/AGENTS.md))
- [Daemonized Session Persistence](https://awesome-repositories.com/f/development-tools-productivity/persistent-session-managers/session-independent-process-scopes/daemonized-session-persistence.md) — Runs one local background daemon that all live review sessions register with, so other clients can connect over loopback. ([source](https://github.com/modem-dev/hunk/blob/main/AGENTS.md))
- [Unified Extension Registrations](https://awesome-repositories.com/f/development-tools-productivity/plugin-systems/custom-plugin-registrations/unified-extension-registrations.md) — Offers one public registration interface used by extensions, version control providers, core commands and interface components alike.
- [Hosted Pull Request Viewers](https://awesome-repositories.com/f/development-tools-productivity/pull-request-review-tools/hosted-pull-request-viewers.md) — Opens GitHub pull requests, commits, and comparisons directly, anonymously for public repositories or with a token for private ones. ([source](https://github.com/modem-dev/hunk/blob/main/CHANGELOG.md))
- [Review Triage and Annotation](https://awesome-repositories.com/f/development-tools-productivity/review-triage-and-annotation.md) — Marks hunks as approved, investigate, or blocked, adds threaded line comments, and exports saved review notes to JSON.
- [Pluggable Backend Providers](https://awesome-repositories.com/f/development-tools-productivity/version-control-diff-providers/pluggable-backend-providers.md) — Plugs Git, Jujutsu and Sapling backends into one shared catalog through separate provider packages so one review interface works across checkouts.

### Artificial Intelligence & ML

- [Agent Change Reviews](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-systems-frameworks/integration-deployment/ai-agent-tooling/coding-agents/agent-change-reviews.md) — Shows coding-agent notes beside the selected hunk during a live review, with reviewers able to show or hide them. ([source](https://github.com/modem-dev/hunk/blob/main/AGENTS.md))
- [Agent Review Rationale Files](https://awesome-repositories.com/f/artificial-intelligence-ml/agent-review-rationale-files.md) — Loads a JSON file of agent-written context and shows the reasoning inline next to the matching changed lines in a patch. ([source](https://github.com/modem-dev/hunk/tree/main/examples))
- [Agent Skill Installers](https://awesome-repositories.com/f/artificial-intelligence-ml/agent-skill-installers.md) — Prints bundled agent instructions and publishes installable skills so coding agents get guidance matching the exact installed version. ([source](https://github.com/modem-dev/hunk/blob/main/CHANGELOG.md))

### Software Engineering & Architecture

- [Large Input Responsiveness](https://awesome-repositories.com/f/software-engineering-architecture/large-input-responsiveness.md) — Offloads syntax highlighting to a worker, skips generated files, windows rows in huge diffs, and avoids per-file subprocesses. ([source](https://github.com/modem-dev/hunk/blob/main/CHANGELOG.md))

### User Interface & Experience

- [Diff UI Components](https://awesome-repositories.com/f/user-interface-experience/diff-ui-components.md) — Publishes a reusable diff view component plus lower-level diff body and file header pieces for embedding in other OpenTUI terminal applications.
- [Working Tree Diffs](https://awesome-repositories.com/f/user-interface-experience/diff-visualizations/working-tree-diffs.md) — Opens working-tree changes, including untracked files, and commits from Git commands with automatic reload as files change. ([source](https://github.com/modem-dev/hunk/blob/main/README.md))
- [Terminal Editor Extensions](https://awesome-repositories.com/f/user-interface-experience/editor-plugins/terminal-editor-extensions.md) — Exposes a public TypeScript plugin interface for adding commands, themes, sidebars, file views, keyboard modes, and version control backends from Git or npm.
- [Embeddable Terminal Diff Components](https://awesome-repositories.com/f/user-interface-experience/embeddable-terminal-diff-components.md) — Publishes a reusable diff view component and lower-level diff body and file header blocks for OpenTUI terminal applications. ([source](https://github.com/modem-dev/hunk/blob/main/README.md))
- [Terminal UI Components](https://awesome-repositories.com/f/user-interface-experience/terminal-ui-components.md) — Builds diff bodies, file headers and sidebars from reusable low-level terminal components that can be embedded in other terminal applications.
