npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dunkdiff

v0.15.1

Published

Review diffs in a TUI, leave inline comments, and let a coding agent resolve them.

Readme

dunk

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 diff --exclude-untracked

Screenshots & Demo

Demo: https://x.com/amix3k/status/2053773348719444360

Agent review workflow

dunk is designed for a human reviewer in one terminal and a coding agent in another.

  1. Start a watched review:

    dunk diff --watch

    You can also review a commit or revision:

    dunk show <ref> --watch
  2. 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.

  3. 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.

  4. 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.

  5. 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:

git config --global alias.ddiff "-c core.pager=\"dunk pager\" diff"
git config --global alias.dshow "-c core.pager=\"dunk pager\" show"

[!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.tomlorigin/HEADorigin/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.