Hunk
$ hunk Official Low RiskHunk (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.
brew install hunk 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
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
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
--helpand--versionexit non-interactively
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
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
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--watchreload
Official CLI from Modem under MIT license; newer tool with evolving CLI surface.
- Maintained at hunk.dev under MIT license
Concise docs on hunk.dev covering installation, --watch, --web, and --mode options.
- Documented subcommands and flags at hunk.dev
Security, Auth & Guardrails
None required; inspects local git repositories read-only.
Free and open-source (MIT).
# 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
hunk --version
Prints version information and exits immediately without opening an interactive terminal UI.
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
--watchTUI and--webUI 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
--jsonmode; hangs if invoked inside agent tool loops. - ! Does not support native Windows outside WSL.