[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-81499":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":11,"openIssues":12,"contributorsCount":12,"subscribersCount":12,"size":12,"stars1d":12,"stars7d":12,"stars30d":12,"stars90d":12,"forks30d":12,"starsTrendScore":12,"compositeScore":12,"rankGlobal":9,"rankLanguage":9,"license":13,"archived":14,"fork":14,"defaultBranch":15,"hasWiki":16,"hasPages":14,"topics":17,"createdAt":9,"pushedAt":9,"updatedAt":18,"readmeContent":19,"aiSummary":20,"trendingCount":12,"starSnapshotCount":12,"syncStatus":21,"lastSyncTime":22,"discoverSource":23},81499,"dunk","amix\u002Fdunk","amix","Review diffs in a terminal UI, leave inline comments, and let coding agents fix them",null,"TypeScript",28,0,"MIT License",false,"main",true,[],"2026-06-12 02:04:16","# dunk\n\nReview diffs in a terminal UI, leave inline comments, and let a coding agent fix them.\n\n`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\u002Fcomments.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.\n\n`dunk` is a hard fork of [hunk](https:\u002F\u002Fgithub.com\u002Fmodem-dev\u002Fhunk). It keeps the OpenTUI \u002F [Pierre](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@pierre\u002Fdiffs) diff-viewer foundation and removes the daemon, MCP, and session-broker layers.\n\n- Press `a` on a hunk to save a comment scoped to that hunk. Comments are hunk-level — you don't pick a specific line.\n- Comments live in `.dunk\u002Fcomments.json`. Don't commit it; treat it as a local review scratchpad. Add `.dunk\u002F` to your `.gitignore`.\n- `--watch` reloads code changes and comment edits automatically.\n- Resolved comments disappear as the agent removes them.\n- Drifted anchors surface at the top of the diff instead of getting lost.\n- Built on hunk’s terminal diff viewer, with sidebar navigation, split\u002Fstack layouts, pager support, and `git difftool` adapters.\n\n## Install\n\n`dunk` ships through npm with prebuilt binaries for macOS and Linux:\n\n```bash\nnpm i -g dunkdiff\n```\n\nRequirements: Node.js 18+ and Git for most workflows.\n\n## Quick start\n\n```bash\ndunk             # show help\ndunk --version   # print the installed version\n\ndunk diff                    # review the working tree, including untracked files\ndunk diff --branch           # review the whole current branch vs its base (auto-detects origin\u002FHEAD)\ndunk diff --branch=main      # …or pick the base explicitly\ndunk diff --watch            # auto-reload as files and comments change\ndunk show                    # review the latest commit\ndunk show HEAD~1             # review an earlier commit\ndunk diff before.ts after.ts # compare two concrete files\ngit diff --no-color | dunk patch - # review a patch from stdin\n```\n\n## Tips\n\n- **Review commits that haven't been pushed yet.** Diff against your upstream tracking ref to see everything committed locally but not on the remote:\n\n  ```bash\n  dunk diff @{u}        # unpushed commits plus working-tree changes\n  dunk diff @{u}..HEAD  # unpushed commits only, no working-tree noise\n  ```\n\n- **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?\":\n\n  ```bash\n  dunk diff --staged\n  ```\n\n- **Narrow a noisy branch review to the files you care about.** Pathspecs after `--` work with `dunk diff` (including `--branch`) and `dunk show`:\n\n  ```bash\n  dunk diff --branch=main -- src\u002Fcore README.md\n  ```\n\n- **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](#config) to make it permanent):\n\n  ```bash\n  dunk diff --exclude-untracked\n  ```\n\n## Screenshots & Demo\n\n\u003Cimg height=\"1000\" alt=\"dunk alongside Claude Code\" src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Ff28fe57a-e833-49ea-846a-91310e403e77\" \u002F>\n\n\u003Cimg height=\"1000\" alt=\"dunk standalone\" src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Fc390752f-046d-4f97-ae55-a68649726997\" \u002F>\n\nDemo: https:\u002F\u002Fx.com\u002Famix3k\u002Fstatus\u002F2053773348719444360\n\n## Agent review workflow\n\n`dunk` is designed for a human reviewer in one terminal and a coding agent in another.\n\n1. Start a watched review:\n\n   ```bash\n   dunk diff --watch\n   ```\n\n   You can also review a commit or revision:\n\n   ```bash\n   dunk show \u003Cref> --watch\n   ```\n\n2. Move to a hunk and press `a` to add a comment.\n\n   Comments are hunk-scoped, not line-scoped — pick a hunk with `J`\u002F`K`, then drop a comment on it. `dunk` saves it to `.dunk\u002Fcomments.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.\n\n   `.dunk\u002Fcomments.json` is intentionally a local file — keep `.dunk\u002F` in your `.gitignore` so review chatter doesn't leak into commits.\n\n3. Point your agent at `dunk comments`.\n\n   Each comment tells the agent what to fix and where. The agent runs `dunk comments list` to see what's pending, `dunk comments show \u003Cid>` to read the hunk in context, fixes the issue, then `dunk comments resolve \u003Cid>` to drop the entry. Hand-editing `.dunk\u002Fcomments.json` is the fallback when the binary isn't available.\n\n4. Keep reviewing while the agent works.\n\n   Watch mode reloads code and comment changes automatically. Resolved comments disappear from the diff. Remaining comments stay pinned to their hunks.\n\n5. Handle drifted comments.\n\n   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).\n\nA sample agent skill lives at `skills\u002Fdunk-review\u002FSKILL.md`. You can also find it with:\n\n```bash\ndunk skill path\n```\n\nLoad that skill into Claude Code or any skill-aware agent to teach it how to use `dunk comments` for review.\n\nTip: keep `dunk diff --watch` and your agent side by side. Add comments with `a`; as the agent updates `.dunk\u002Fcomments.json`, the review updates in place.\n\n## Git integration\n\nUse `dunk` as your Git pager so `git diff` and `git show` open in `dunk` automatically:\n\n```bash\ngit config --global core.pager \"dunk pager\"\n```\n\nOr add it to `~\u002F.gitconfig`:\n\n```ini\n[core]\n    pager = dunk pager\n```\n\nTo keep Git’s default pager and add opt-in aliases:\n\n```bash\ngit config --global alias.ddiff \"-c core.pager=\\\"dunk pager\\\" diff\"\ngit config --global alias.dshow \"-c core.pager=\\\"dunk pager\\\" show\"\n```\n\n> [!NOTE]\n> 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.\n\n## Whole-branch review\n\n`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=\u003Cref>`, or let `dunk` resolve it: explicit flag → `[branch_review] base` in `.dunk\u002Fconfig.toml` → `origin\u002FHEAD` → `origin\u002Fmain` \u002F `main` \u002F `origin\u002Fmaster` \u002F `master` \u002F `origin\u002Ftrunk` \u002F `trunk`. The resolved base is shown in the status bar so auto-detection is never silent.\n\n```toml\n# .dunk\u002Fconfig.toml\n[branch_review]\nbase = \"origin\u002Fmain\"\n```\n\n## Config\n\n`dunk` reads config from either location:\n\n- `~\u002F.config\u002Fdunk\u002Fconfig.toml`\n- `.dunk\u002Fconfig.toml`\n\nExample:\n\n```toml\ntheme = \"graphite\"   # graphite, midnight, paper, ember\nmode = \"auto\"        # auto, split, stack\nwatch = false        # reload as code and comments change (same as --watch)\nexclude_untracked = false\nline_numbers = false\nwrap_lines = true\nselection_auto_copy = true\n```\n\n`exclude_untracked` only affects `dunk diff` working-tree sessions. `--watch` on the command line overrides `watch` in config.\n\n## OpenTUI component\n\n`dunk` exports `DunkDiffView` from `dunkdiff\u002Fopentui` for embedding the diff renderer in your own OpenTUI app.\n\nSee [docs\u002Fopentui-component.md](docs\u002Fopentui-component.md).\n\n## Examples\n\nRunnable demo diffs live in [`examples\u002F`](examples\u002FREADME.md). Each example prints the exact command to run from the repo root.\n\n## License\n\n[MIT](LICENSE) — same as upstream hunk, of which this is a hard fork.\n","dunk 是一个用于在终端界面审查代码差异、添加行内注释，并让编码代理修复问题的工具。其核心功能包括通过键盘快捷键对特定代码块添加注释，这些注释会保存到本地文件中供编码代理读取并据此修改代码；支持自动重新加载以反映最新的代码和评论变化。该项目采用 TypeScript 编写，基于 hunk 的终端差异查看器构建，保留了基础的 OpenTUI \u002F Pierre 差异查看器，同时移除了后台进程和服务层，从而简化架构。适用于需要频繁进行代码审查与快速迭代开发的场景，特别是当团队希望引入自动化工具辅助提高审查效率时。",2,"2026-06-11 04:05:17","CREATED_QUERY"]