amix/dunk — dự án mã nguồn mở — đang có 30 sao GitHub. Review diffs in a terminal UI, leave inline comments, and let coding agents fix them
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
Review diffs in a terminal UI, leave inline comments, and let a coding agent fix them.
dunk is built for the review loop between a human and a coding agent. You mark issues directly in the diff. dunk writes hunk-anchored comments to .dunk/comments.json. Claude Code, Codex, or another agent reads the comments, fixes the code, and removes resolved entries. With --watch, the diff reloads in place as code and comments change.
dunk is a hard fork of hunk. It keeps the OpenTUI / Pierre diff-viewer foundation and removes the daemon, MCP, and session-broker layers.
Press a on a hunk to save a comment scoped to that hunk. Comments are hunk-level — you don't pick a specific line.
Comments live in .dunk/comments.json. Don't commit it; treat it as a local review scratchpad. Add .dunk/ to your .gitignore.
--watch reloads code changes and comment edits automatically.
Resolved comments disappear as the agent removes them.
Drifted anchors surface at the top of the diff instead of getting lost.
Built on hunk’s terminal diff viewer, with sidebar navigation, split/stack layouts, pager support, and git difftool adapters.
Install
dunk ships through npm with prebuilt binaries for macOS and Linux:
npm i -g dunkdiff
Requirements: Node.js 18+ and Git for most workflows.
Quick start
dunk # show help
dunk --version # print the installed version
dunk diff # review the working tree, including untracked files
dunk diff --branch # review the whole current branch vs its base (auto-detects origin/HEAD)
dunk diff --branch=main # …or pick the base explicitly
dunk diff --watch # auto-reload as files and comments change
dunk show # review the latest commit
dunk show HEAD~1 # review an earlier commit
dunk diff before.ts after.ts # compare two concrete files
git diff --no-color | dunk patch - # review a patch from stdin
Tips
Review commits that haven't been pushed yet. Diff against your upstream tracking ref to see everything committed locally but not on the remote:
dunk diff @{u} # unpushed commits plus working-tree changes
dunk diff @{u}..HEAD # unpushed commits only, no working-tree noise
Review what's about to be committed. The natural companion to the tip above — one answers "what am I about to push?", this one answers "what am I about to commit?":
dunk diff --staged
Narrow a noisy branch review to the files you care about. Pathspecs after -- work with dunk diff (including --branch) and dunk show:
dunk diff --branch=main -- src/core README.md
Drop untracked files when they're just noise.dunk diff includes them by default; this flag turns that off for a single run (use exclude_untracked = true in config to make it permanent):
dunk is designed for a human reviewer in one terminal and a coding agent in another.
Start a watched review:
dunk diff --watch
You can also review a commit or revision:
dunk show <ref> --watch
Move to a hunk and press a to add a comment.
Comments are hunk-scoped, not line-scoped — pick a hunk with J/K, then drop a comment on it. dunk saves it to .dunk/comments.json with the file path, the hunk's anchor line, the comment body, and a context hash so the comment survives small edits to nearby code.
.dunk/comments.json is intentionally a local file — keep .dunk/ in your .gitignore so review chatter doesn't leak into commits.
Point your agent at dunk comments.
Each comment tells the agent what to fix and where. The agent runs dunk comments list to see what's pending, dunk comments show <id> to read the hunk in context, fixes the issue, then dunk comments resolve <id> to drop the entry. Hand-editing .dunk/comments.json is the fallback when the binary isn't available.
Keep reviewing while the agent works.
Watch mode reloads code and comment changes automatically. Resolved comments disappear from the diff. Remaining comments stay pinned to their hunks.
Handle drifted comments.
If a file changes too much for an anchor to be matched, dunk shows the comment as drifted at the top of the diff. Press d to clear the focused drifted comment or D to clear all drifted comments (anchored review comments are never touched).
A sample agent skill lives at skills/dunk-review/SKILL.md. You can also find it with:
dunk skill path
Load that skill into Claude Code or any skill-aware agent to teach it how to use dunk comments for review.
Tip: keep dunk diff --watch and your agent side by side. Add comments with a; as the agent updates .dunk/comments.json, the review updates in place.
Git integration
Use dunk as your Git pager so git diff and git show open in dunk automatically:
git config --global core.pager "dunk pager"
Or add it to ~/.gitconfig:
[core]
pager = dunk pager
To keep Git’s default pager and add opt-in aliases:
[!NOTE]
Untracked files are included automatically only by dunk diff, which uses the working-tree loader. When you use dunk pager, Git decides what goes into the patch, so untracked files won’t appear.
Whole-branch review
dunk diff --branch shows everything that differs between the current branch and its base — committed history, staged work, unstaged edits, and untracked files — in one review. Pick the base explicitly with --branch=<ref>, or let dunk resolve it: explicit flag → [branch_review] base in .dunk/config.toml → origin/HEAD → origin/main / main / origin/master / master / origin/trunk / trunk. The resolved base is shown in the status bar so auto-detection is never silent.
# .dunk/config.toml
[branch_review]
base = "origin/main"
Config
dunk reads config from either location:
~/.config/dunk/config.toml
.dunk/config.toml
Example:
theme = "graphite" # graphite, midnight, paper, ember
mode = "auto" # auto, split, stack
watch = false # reload as code and comments change (same as --watch)
exclude_untracked = false
line_numbers = false
wrap_lines = true
selection_auto_copy = true
exclude_untracked only affects dunk diff working-tree sessions. --watch on the command line overrides watch in config.
OpenTUI component
dunk exports DunkDiffView from dunkdiff/opentui for embedding the diff renderer in your own OpenTUI app.
See docs/opentui-component.md.
Examples
Runnable demo diffs live in examples/. Each example prints the exact command to run from the repo root.
License
MIT — same as upstream hunk, of which this is a hard fork.
amix/dunk có 30 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/amix/dunk. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
amix/dunk có phải mã nguồn mở không?
Có — amix/dunk phát hành theo license MIT, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/amix/dunk.
amix/dunk có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho amix/dunk. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
amix/dunk là gì?
amix/dunk (amix/dunk) là dự án TypeScript trên GitHub. Theo mô tả gốc: Review diffs in a terminal UI, leave inline comments, and let coding agents fix them
Đọc thêm về amix/dunk ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/amix/dunk là nguồn chính thức.
Đọc đầy đủ README ở tab phía trên.
Muốn nghe thêm một ý kiến về dunk?
Hỏi một AI đọc được trang này — một cú bấm là có ngay nhận định về dunk.