[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-74811":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":23,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":31,"readmeContent":32,"aiSummary":33,"trendingCount":16,"starSnapshotCount":16,"syncStatus":34,"lastSyncTime":35,"discoverSource":36},74811,"hunk","modem-dev\u002Fhunk","modem-dev","Review-first terminal diff viewer for agentic coders","",null,"TypeScript",4733,114,7,20,0,143,225,417,429,108.18,"MIT License",false,"main",[26,27,28,29,30],"cli","code-review","diff","git","tui","2026-06-12 04:01:15","# hunk\n\nHunk is a review-first terminal diff viewer for agent-authored changesets, built on [OpenTUI](https:\u002F\u002Fgithub.com\u002Fanomalyco\u002Fopentui) and [Pierre diffs](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@pierre\u002Fdiffs).\n\n[![CI status](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Factions\u002Fworkflow\u002Fstatus\u002Fmodem-dev\u002Fhunk\u002Fci.yml?branch=main&style=for-the-badge&label=CI)](https:\u002F\u002Fgithub.com\u002Fmodem-dev\u002Fhunk\u002Factions\u002Fworkflows\u002Fci.yml?branch=main)\n[![Latest release](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fv\u002Frelease\u002Fmodem-dev\u002Fhunk?style=for-the-badge)](https:\u002F\u002Fgithub.com\u002Fmodem-dev\u002Fhunk\u002Freleases)\n[![MIT License](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-blue.svg?style=for-the-badge)](LICENSE)\n\n- multi-file review stream with sidebar navigation\n- inline AI and agent annotations beside the code\n- split, stack, and responsive auto layouts\n- watch mode for auto-reloading file and Git-backed reviews\n- keyboard, mouse, pager, and Git difftool support\n\n\u003Ctable>\n \u003Ctr>\n   \u003Ctd width=\"60%\" align=\"center\">\n     \u003Cimg width=\"794\" alt=\"image\" src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Ff6ffd9c4-67f5-483c-88f1-cbe88c19f52f\" \u002F>\n     \u003Cbr \u002F>\n     \u003Csub>Split view with sidebar and inline AI notes\u003C\u002Fsub>\n   \u003C\u002Ftd>\n   \u003Ctd width=\"40%\" align=\"center\">\n     \u003Cimg width=\"508\" alt=\"image\" src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F44c542a2-0a09-41cd-b264-fbd942e92f06\" \u002F>\n     \u003Cbr \u002F>\n     \u003Csub>Stacked view and mouse-selectable menus\u003C\u002Fsub>\n   \u003C\u002Ftd>\n \u003C\u002Ftr>\n\u003C\u002Ftable>\n\n## Install\n\n```bash\nnpm i -g hunkdiff\n```\n\nOr with Homebrew:\n\n```bash\nbrew install modem-dev\u002Ftap\u002Fhunk\n```\n\nRequirements:\n\n- Node.js 18+\n- macOS, Linux, or Windows\n- Git recommended for most workflows\n\n> Nix users can use the `default` package exported in `flake.nix` instead. See [nix\u002FREADME.md](.\u002Fnix\u002FREADME.md) for details.\n\n## Quick start\n\n```bash\nhunk           # show help\nhunk --version # print the installed version\n```\n\n### Working with Git\n\nHunk mirrors Git's diff-style commands, but opens the changeset in a review UI instead of plain text.\n\n```bash\nhunk diff                      # review current repo changes, including untracked files\nhunk diff --watch              # auto-reload as the working tree changes\nhunk show                      # review the latest commit\nhunk show HEAD~1               # review an earlier commit\n```\n\n### Working with Jujutsu\n\nHunk auto-detects Jujutsu checkouts, so `hunk diff [revset]` and `hunk show [revset]` use jj revsets inside a jj workspace. To override VCS detection, set `vcs = \"git\"` or `vcs = \"jj\"` in [config](#config).\n\n### Working with raw files and patches\n\n```bash\nhunk diff before.ts after.ts                # compare two files directly\nhunk diff before.ts after.ts --watch        # auto-reload when either file changes\ngit diff --no-color | hunk patch -          # review a patch from stdin\n```\n\n### Working with agents\n\n1. Open Hunk in another terminal with `hunk diff` or `hunk show`.\n2. Tell your agent to add the skill file returned by `hunk skill path`.\n3. Ask your agent to use the skill against the live Hunk session.\n\nA good generic prompt is:\n\n```text\nLoad the Hunk skill and use it for this review.\n```\n\nFor the full live-session and `--agent-context` workflow guide, see [docs\u002Fagent-workflows.md](docs\u002Fagent-workflows.md).\n\n## Feature comparison\n\n| Capability                         | [hunk](https:\u002F\u002Fgithub.com\u002Fmodem-dev\u002Fhunk) | [lumen](https:\u002F\u002Fgithub.com\u002Fjnsahaj\u002Flumen) | [difftastic](https:\u002F\u002Fgithub.com\u002FWilfred\u002Fdifftastic) | [delta](https:\u002F\u002Fgithub.com\u002Fdandavison\u002Fdelta) | [diff-so-fancy](https:\u002F\u002Fgithub.com\u002Fso-fancy\u002Fdiff-so-fancy) | [diff](https:\u002F\u002Fwww.gnu.org\u002Fsoftware\u002Fdiffutils\u002F) |\n| ---------------------------------- | ----------------------------------------- | ----------------------------------------- | --------------------------------------------------- | -------------------------------------------- | ---------------------------------------------------------- | ----------------------------------------------- |\n| Review-first interactive UI        | ✅                                        | ✅                                        | ❌                                                  | ❌                                           | ❌                                                         | ❌                                              |\n| Multi-file review stream + sidebar | ✅                                        | ✅                                        | ❌                                                  | ❌                                           | ❌                                                         | ❌                                              |\n| Inline agent \u002F AI annotations      | ✅                                        | ❌                                        | ❌                                                  | ❌                                           | ❌                                                         | ❌                                              |\n| Responsive auto split\u002Fstack layout | ✅                                        | ❌                                        | ❌                                                  | ❌                                           | ❌                                                         | ❌                                              |\n| Mouse support inside the viewer    | ✅                                        | ✅                                        | ❌                                                  | ❌                                           | ❌                                                         | ❌                                              |\n| Runtime view toggles               | ✅                                        | ✅                                        | ❌                                                  | ❌                                           | ❌                                                         | ❌                                              |\n| Syntax highlighting                | ✅                                        | ✅                                        | ✅                                                  | ✅                                           | ❌                                                         | ❌                                              |\n| Structural diffing                 | ❌                                        | ❌                                        | ✅                                                  | ❌                                           | ❌                                                         | ❌                                              |\n| Pager-compatible mode              | ✅                                        | ❌                                        | ✅                                                  | ✅                                           | ✅                                                         | ✅                                              |\n\nHunk is optimized for reviewing a full changeset interactively.\n\n## Advanced\n\n### Config\n\nYou can persist preferences to a config file:\n\n- `~\u002F.config\u002Fhunk\u002Fconfig.toml`\n- `.hunk\u002Fconfig.toml`\n\nExample:\n\n```toml\ntheme = \"graphite\"   # graphite, midnight, paper, ember\nmode = \"auto\"        # auto, split, stack\nvcs = \"git\"          # git, jj\nwatch = false\nexclude_untracked = false\nline_numbers = true\nwrap_lines = false\nagent_notes = false\n```\n\n`exclude_untracked` affects Git working-tree `hunk diff` sessions only.\n\n### Git integration\n\nSet Hunk as your Git pager so `git diff` and `git show` open in Hunk automatically:\n\n> [!NOTE]\n> Untracked files are auto-included only for Hunk's own `hunk diff` working-tree loader. If you open `git diff` through `hunk pager`, Git still decides the patch contents, so untracked files will not appear there.\n\n```bash\ngit config --global core.pager \"hunk pager\"\n```\n\nOr in your Git config:\n\n```ini\n[core]\n    pager = hunk pager\n```\n\nIf you want to keep Git's default pager and add opt-in aliases instead:\n\n```bash\ngit config --global alias.hdiff \"-c core.pager=\\\"hunk pager\\\" diff\"\ngit config --global alias.hshow \"-c core.pager=\\\"hunk pager\\\" show\"\n```\n\n### Jujutsu pager integration\n\nTo use Hunk as jj's pager, run `jj config edit --user` and update:\n\n```toml\n[ui]\npager = [\"hunk\", \"pager\"]\ndiff-formatter = \":git\"\n```\n\n### OpenTUI component\n\nHunk also publishes `HunkDiffView` and lower-level primitives from `hunkdiff\u002Fopentui` for embedding the same diff renderer in your own OpenTUI app.\n\nSee [docs\u002Fopentui-component.md](docs\u002Fopentui-component.md) for install, API, and runnable examples.\n\n## Examples\n\nReady-to-run demo diffs live in [`examples\u002F`](examples\u002FREADME.md).\n\nEach example includes the exact command to run from the repository root.\n\n## Contributing\n\n💬 _Chat with users\u002Fcontributors on the [Modem Discord server](https:\u002F\u002Fdiscord.gg\u002FWZFjaP6Gt8)_\n\nFor source setup, tests, packaging checks, and repo architecture, see [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## Sponsor\n\nSponsored by [Modem](https:\u002F\u002Fmodem.dev?utm_source=github&utm_medium=oss&utm_campaign=hunk).\n\n\u003Ca href=\"https:\u002F\u002Fmodem.dev?utm_source=github&utm_medium=oss&utm_campaign=hunk\">\n  \u003Cpicture>\n    \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Fmodem.dev\u002Fimages\u002Flogo\u002Fsvg\u002Fmodem-combined-white.svg\">\n    \u003Csource media=\"(prefers-color-scheme: light)\" srcset=\"https:\u002F\u002Fmodem.dev\u002Fimages\u002Flogo\u002Fsvg\u002Fmodem-combined-black.svg\">\n    \u003Cimg src=\"https:\u002F\u002Fmodem.dev\u002Fimages\u002Flogo\u002Fsvg\u002Fmodem-combined-black.svg\" alt=\"Modem\" width=\"220\">\n  \u003C\u002Fpicture>\n\u003C\u002Fa>\n\n## License\n\n[MIT](LICENSE)\n","Hunk 是一个面向代码审查的终端差异查看器，专为代理编写的变更集设计。它基于 OpenTUI 和 Pierre diffs 构建，支持多文件审查流、侧边栏导航以及代码旁的内联 AI 和代理注释。Hunk 提供了多种布局模式（如分屏和堆叠视图），并具备自动重新加载功能，能够与 Git 等版本控制系统无缝集成，适用于需要频繁进行代码审查的开发场景。此外，该工具还支持键盘、鼠标及分页器操作，进一步提升了用户体验。",2,"2026-06-11 03:50:56","high_star"]