Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Hunk

$ hunk Official Low Risk
Modem · Files & Search · MIT · macos / linux

Hunk (hunk) provides a multi-file sidebar review UI in the terminal or local browser (--web) with live --watch reloading for inspecting AI agent edits. Because it is strictly an interactive viewer without headless stdout/JSON diff output, agents should not invoke hunk for programmatic diff reading.

FCRS-1.0 Score
68 /100
Usable w/ Caveats
Medium Confidence
Zero-Friction Install
brew install hunk
CLI vs MCP Decision CLI Only

Hunk is a human-facing visual review UI (hunk diff --watch), whereas agents should read diffs directly via git diff or difft --display json.

Agent-Readiness Checklist

— JSON Output
— Field Filtering
— Non-Interactive
— Dry-Run
✓ Read-Only Mode
— NO_COLOR Clean
— Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 8 / 25

Built purely as an interactive human TUI (hunk diff, hunk show) or local web server (--web); lacks headless stdout or --json diff modes.

  • Blocks in interactive TUI or local web server on diff/show
  • Only --help and --version exit non-interactively
Trust & Safety 24 / 25

Read-only git diff inspection with zero file mutations, though --web binds a local HTTP port for browser review.

  • Strictly read-only against repository files
Setup & Portability 12 / 15

Installable via brew install hunk, npm install -g hunkdiff, or install script on macOS and Linux.

  • Official Homebrew formula and npm package for macOS/Linux
Utility & Efficiency 10 / 15

Strong human-in-the-loop companion for reviewing large agent changesets (--watch), though not directly consumable by agents.

  • Multi-file sidebar, --mode split, and live --watch reload
Maintenance & Lineage 7 / 10

Official CLI from Modem under MIT license; newer tool with evolving CLI surface.

  • Maintained at hunk.dev under MIT license
Docs & Verifiability 7 / 10

Concise docs on hunk.dev covering installation, --watch, --web, and --mode options.

  • Documented subcommands and flags at hunk.dev

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

None required; inspects local git repositories read-only.

Side Effects
Read-Only
Cost & Quotas

Free and open-source (MIT).

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Hunk Agent Rules
- NEVER run `hunk diff`, `hunk show`, or `--watch` inside headless agent shells—it launches a blocking interactive TUI or `--web` server.
- Use `git diff` or `difft --display json` when the agent needs to read diffs; suggest `hunk diff --watch` only for the human user.

Agent-Ready Command Recipes

Safe Read-Only Queries

Check installed hunk version without launching TUI
hunk --version

Prints version information and exits immediately without opening an interactive terminal UI.

Launch live-reloading human review UI for working tree changes
hunk diff --watch

Starts an interactive terminal review stream for humans to watch multi-file changesets live (do not run inside non-TTY agent loops).

Strengths for Agents

  • + Purpose-built live --watch TUI and --web UI for humans reviewing multi-file agent diffs.
  • + Read-only inspection that never mutates git working trees.

Caveats & Pitfalls

  • ! Interactive TUI/web viewer with no headless stdout or --json mode; hangs if invoked inside agent tool loops.
  • ! Does not support native Windows outside WSL.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI