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

diffprism

v1.25.0

Published

Local-first code review tool for agent-generated code changes

Readme

DiffPrism™

Review GitHub PRs with AI superpowers. Paste a PR URL, see the diff in your browser, and use Claude Code or Cursor to interrogate every line, file, and change. Your AI gets the full codebase at the PR's head — not just the diff hunks — without you checking the branch out.

How It Works

  1. Open a PR — diffprism review https://github.com/owner/repo/pull/123
  2. See the diff — Browser opens with syntax-highlighted diffs, file browser, and analysis briefing
  3. Ask about any line — Comment on a line and Claude Code answers in the thread. diffprism review starts it for you, reading the PR's own code. You can also ask from your own Claude Code or Cursor session, where your AI calls MCP tools to get context and posts findings inline on the diff.
$ cd ~/dev/my-project
$ diffprism review https://github.com/owner/repo/pull/123
  Fetching PR #123 from owner/repo...
  Add retry logic to API client
  4 files changed
  Local repo: /Users/you/dev/my-project

  Review open in browser. Claude Code is answering — comment on any line and it replies there.
  Once it has answered, continue the conversation in your terminal: claude --resume 3f2a…

Then in Claude Code:

> What does this PR change?
  → calls get_pr_context → high-level overview

> Is the retry logic in client.ts correct?
  → calls get_file_diff + get_file_context → full file at the PR's head

> Flag line 47 as a concern
  → calls annotate → annotation appears on the diff in your browser

Setup

Let your agent do it. Give Claude Code, Cursor or any coding agent this repo's link and ask it to set up DiffPrism.

Agents: follow the Agent Setup Guide. It says what to check, what to ask the user, and which commands to run.

Or do it yourself:

npm install -g diffprism
diffprism setup --global       # Once per machine: DiffPrism's tools, /review and permissions, in every repo and worktree
diffprism hook install         # Optional, once per repo: gate large commits on a review (its worktrees share it)

Nothing else is needed per repository, so a worktree an agent creates has DiffPrism straight away.

The server starts on its own the first time you review something. Using Cursor? See Cursor.

PR Review

diffprism review https://github.com/owner/repo/pull/123   # Full GitHub URL
diffprism review owner/repo#123                            # Shorthand format

An agent then answers your comments — Claude Code unless you choose otherwise (see Choosing the agent): comment on any line and the answer appears in the thread. You don't need to open a Claude Code session or paste anything, and the command gives your terminal back straight away. A PR you open from the dashboard's Review PR form gets the same agent. The DiffPrism server runs it, for as long as the review is open.

  • The agent is read-only. It can read the PR, its code and the review, and reply, but it can't edit files or run commands.
  • One conversation lasts the whole review, so a follow-up question can build on an earlier answer.
  • The command prints the command that continues that conversation in your terminal (claude --resume … or cursor-agent --resume …) once the agent has answered something.
  • It waits without using the agent: DiffPrism watches for comments and runs the agent only when there's something to answer.
  • It needs the agent's command installed and logged in. Without it, the command says so, and tells you what to ask in a Claude Code session instead.
  • Pass --no-agent to open the review without starting one.
  • What the agent does, and why it stopped if it did, goes to the server's log, ~/.diffprism/server.log.

Choosing the agent

Claude Code answers by default. Choose Cursor, or a model for either, in three places:

  • The dashboard: Review agent at the bottom of the sessions list. The model is picked from what the agent itself offers: Cursor lists every model your account can use (cursor-agent models), grouped by family, and Claude Code offers the models its --model help names. Other… takes any other name.

  • The CLI: diffprism config, which changes the same saved setting:

    diffprism config get                    # What's set
    diffprism config set agent cursor       # Cursor answers from now on
    diffprism config set cursor.model gpt-5 # ...with this model
    diffprism config set claude.model opus  # Claude Code's model, for when you switch back
    diffprism config unset cursor.model     # Back to Cursor's own default
  • One review: diffprism review <PR URL> --agent cursor --model gpt-5.

Each agent keeps its own model, so switching agents and back doesn't lose either. Settings live in ~/.diffprism/config.json. Cursor works from a folder of its own that holds its DiffPrism tool settings and a permissions file. The permissions let it read, and use DiffPrism's tools, replying included; they refuse every file write and shell command, in that folder and in the PR's checkout. It can read the checkout, but nothing is written into it. Run cursor-agent login once before choosing it.

Reviews opened by the commit gate don't start an agent: the agent that made the commit is the one that answers.

Review dojo

Have several agents review a change and argue it out. Open the Review dojo panel on the right of any review, a PR or a local one like the commit gate's, tick the agents you want (the ones installed on your machine — Claude Code and Cursor today), and start it:

  1. Each agent reviews the change on its own, read-only, and lists what it would raise.
  2. Each one then votes on the others' findings: agree or disagree, how much it matters, and why.
  3. You get one list, grouped into agreed, disputed, not every agent voted and one reviewer, with every agent's vote under each finding. Each finding is also a thread on its line, so you can reply there.

Who agrees with what is counted from the votes, not summarised by a model. An agent that can't start, review or vote drops out with the reason shown, and the rest carry on. So does one that goes five minutes without doing anything: no tool call, no thinking, no output. An agent whose review is in says who it's waiting for before voting starts. Stop ends a running dojo at once, and the dojo also stops on its own when you decide or close the review. Each agent uses the model chosen for it under Choosing the agent.

On a local review, the findings can go back to the agent that made the change: the one blocked on git commit, or on open_review. Tick the ones worth acting on (agreed findings start ticked), then Send to the agent to fix. Each goes to its finding's thread, and the agent's next wait hands them over. The agent fixes each one without committing and marks it fixed, or replies with why not. Each card follows its finding: sent, picked up, Fixed by the agent (with what it changed) or answered. Dismiss a finding you're done with. Request Changes at the bottom is for your own summary and comments; findings don't go into it, because a request for changes ends the round and can't be followed finding by finding. On a commit-gate review the agents judge the staged version of each file, which is what the commit will contain.

A PR review runs from any folder. DiffPrism fetches the PR's head commit, and its base, into a copy of the repo of its own under ~/.diffprism/repos/, and checks the head out in a folder for that PR, using the same GitHub token it reads the PR with. The review, the agent and get_file_context all read from there, so they see exactly the PR's code, whatever branch your own clone is on. Your clone isn't touched. Opening the PR again moves its checkout to the PR's latest commit. If the PR can't be fetched, the review doesn't open, and says why.

MCP Tools

DiffPrism exposes 16 MCP tools to your AI.

Reviews are one per repo: opening a review for a repo that already has one updates it instead of starting another, and keeps its annotations. Tools that work on an open review act on the one for the repo your AI is running in, or take session_id / repo_path — and if that's ambiguous they say so rather than guess.

Opening and deciding

| Tool | Purpose | |------|---------| | open_review | Open a review of local changes and wait for the decision (wait: false to return at once) | | get_review_result | Check the decision on a review already open | | run_dojo | Run a review dojo on local changes with no dashboard, and get its findings back | | get_dojo_result | Check a dojo that was still running when run_dojo returned | | update_review_context | Push updated reasoning/description to an open review |

Analysis

| Tool | Purpose | |------|---------| | analyze_diff | Returns analysis JSON (patterns, complexity, test gaps) | | get_diff | Returns structured diff JSON (file-level and hunk-level changes) |

Working in an open review

| Tool | Purpose | |------|---------| | annotate | Post findings inline on the diff; warning flags the session for attention | | get_review_comments | Read every thread on the session; awaiting_reply narrows to unanswered ones | | reply | Reply to a thread, then keep listening for what the reviewer does next | | wait_for_comments | Block until the reviewer writes something the agent hasn't answered | | get_review_state | Session status, attention and new-changes flags, and annotations | | get_user_focus | What file/line the user is currently viewing in the browser | | get_pr_context | High-level PR overview: metadata, briefing, file list, local repo status | | get_file_diff | Diff hunks for a specific file with triage category | | get_file_context | Full file content from the local repo, as the review's diff has it (a PR's head, the staged version, or the working tree) |

In a local review, Ask agent now in a line's comment form asks the agent while you're still reviewing: the agent's wait for your decision ends with your question, it answers in the thread, and goes back to waiting.

PR reviews are opened with diffprism review <PR URL> or the dashboard — not by open_review — and your AI then works inside them with the tools above. Click a line to ask the agent about it; an agent listening with wait_for_comments answers in the thread, and stays listening for your next question until you tell it to stop. DiffPrism starts one for every PR review, however it was opened (see PR Review). If no agent has picked a question up — Claude Code isn't installed, or the review was opened with --no-agent — the thread says so and names the session to ask Claude Code about. That one prompt is enough — the agent is handed the checkout, branch, PR and the code you asked about along with the question.

When you're done, Approve, Request changes or Comment from the bar at the bottom: DiffPrism posts it to GitHub as a pull request review. Your threads are a conversation with the agent, so none of them goes to GitHub unless you tick it; a ticked thread posts your opening message as an inline review comment. The token comes from GITHUB_TOKEN, gh auth token, or ~/.diffprism/config.json.

Choosing a scope

Every review — CLI, dashboard, and the MCP tools — defaults to the working copy.

| Scope | Shows | |---|---| | working-copy (default) | Everything uncommitted; staged and unstaged as separate groups | | staged | Only what the next commit contains | | unstaged | Only edits not yet staged | | HEAD~3..HEAD, main..feature | A range of commits |

The one exception is the commit gate, which always reviews staged.

Local Agent Review

DiffPrism also works for reviewing local agent-generated changes:

diffprism review                    # Review all changes (staged + unstaged)
diffprism review --staged           # Staged changes only
diffprism review HEAD~3..HEAD       # Last 3 commits
diffprism review main..feature      # Branch diff

Running multiple Claude Code sessions? All reviews appear in one browser dashboard with status badges, branch info, and desktop notifications.

Commit Gate

Review is only reliable if something other than memory triggers it. diffprism hook wires the review into your pre-commit hook, so a substantial change opens a review before it can land.

diffprism hook install              # Add the gate to this repo's pre-commit hook
diffprism hook uninstall            # Remove it

One install covers every worktree of the repository: git keeps one hooks folder for a repository and all its worktrees. A repository that keeps its hooks in a folder of its own files (Husky's .husky, say) gets the gate there, so commit it for the other worktrees.

The review says when a git commit is waiting on it, what Approve and Request Changes do to that commit, and how long it will wait. If the commit stops waiting, the review says your decision is kept for the next git commit. While findings you sent are with the agent, it says so, and that there's nothing to decide yet. When they come back, it says it's your turn.

If you ask the agent something while the commit waits, the commit stops and prints each question with the command that answers it (diffprism reply --session <id> <annotation-id> "…"). The agent answers, commits again, and the review picks up where it left off — no MCP server needed. If you asked for a fix, the agent makes it and stages it without committing, since the commit is what your review is holding. It then answers with --fixed, and the finding shows as Fixed in the dashboard, with what it changed. The fix is in the staged diff you're reviewing, and goes into the commit once you approve. Dismiss a finding you're done with from its card in the Review dojo.

When the diff changes after you've looked (the agent stages a fix, or commits again), the review says what changed: a banner names the files and counts, and the file list marks them. Each new hunk is labelled "New since you last looked". Show only these changes hides everything else. A Fixed finding's card lists the lines that changed in its file, so you can check the fix in one click. Mark as seen starts the count again from what's there now.

It reviews staged changes only, where every other entry point defaults to the whole working copy: a commit contains exactly the index, so unstaged edits aren't part of what is being approved. By default a staged diff of 120+ changed lines opens a review; anything smaller commits untouched. A gate that stops every commit is one you learn to skip with --no-verify, and a skipped gate is worse than none. Tune it per repo:

git config diffprism.gate-lines 200

Approve and the commit proceeds. Request changes and the commit is blocked — with your comments printed in the output, so the agent that ran git commit can read what you asked for and fix it without another round trip:

140 staged lines (gate at 120) — opening DiffPrism review...

  feature.ts:12  [must_fix]  these should be a single exported record
  feature.ts:88  [question]  is this range meant to be inclusive?

Commit blocked: the review requested changes.

Install adds one line between markers, so uninstall removes exactly that and leaves the rest of your hook alone. Repos using core.hooksPath are handled.

Reviews take as long as they take. An agent's shell command usually times out long before a person finishes reading, so the review outlives the git commit that opened it. A decision stands for as long as the staged diff it answered is unchanged: re-run the same commit after the reviewer decides and it is picked up immediately, with no second review. Agents running git commit should use a long shell timeout — the /review skill tells them so.

Features

  • AI-powered PR review — Your AI gets full codebase context via 16 MCP tools
  • Live annotations — AI findings appear inline on the diff in real-time
  • Full repo context — Full file content at the PR's head, not just diff hunks, with no checkout of your own
  • No vendor lock-in — Works with Claude Code, Cursor, or any MCP client
  • Syntax-highlighted diffs — Unified or split view with refractor
  • Multi-session dashboard — Review multiple agents from one browser tab
  • Review briefing — Complexity scores, test coverage gaps, pattern flags
  • Auto-detect local repo — Matches git remote -v against the PR's repo
  • Keyboard shortcuts — j/k files, n/p hunks, s status, ? help
  • Dark/light mode — Toggle with persistence

CLI Reference

diffprism demo                      # Open a sample review
diffprism review <ref>              # Open a review (PR URL, git ref, or flags)
diffprism dojo [ref]                # Run a review dojo with no dashboard and print its findings (--json, --agents, --fail-on; exit 0/1/2)
diffprism setup                     # Configure Claude Code integration
diffprism setup --global            # Global setup (no git repo needed)
diffprism server                    # Start the background server
diffprism server status             # Check server status
diffprism server stop               # Stop the server
diffprism hook install              # Gate commits on a review
diffprism hook uninstall            # Remove the gate
diffprism hook pre-commit           # Run the gate (what the installed hook calls)
diffprism reply --session <id> <annotation-id> "…"  # Answer a reviewer's question, as the agent (--fixed: you fixed it)
diffprism config get [key]          # Show settings: which agent answers PR reviews, and its model
diffprism config set <key> <value>  # Change one (agent, claude.model, cursor.model)
diffprism config unset <key>        # Put one back to its default
diffprism feedback                  # Share feedback as a prefilled GitHub issue
diffprism feedback --bug            # Report a bug, including the last error
diffprism doctor                    # Check what's installed matches this version, and which build the server runs
diffprism doctor --fix              # Update whatever is out of date, as setup would
diffprism teardown                  # Remove configuration
diffprism serve                     # Run the MCP server over stdio (your MCP client launches this)

Feedback

diffprism feedback                 # Share an idea or what's working
diffprism feedback --bug           # Report a bug
diffprism feedback -m "…" --print  # Start with text; print the URL instead of opening it

Both open a prefilled GitHub issue in your browser — DiffPrism version, OS, Node, and for a bug the last error it hit, with your home directory replaced by ~. Nothing is sent automatically and DiffPrism collects no telemetry: you read and edit the issue, then submit it or don't. The dashboard has a Send feedback link that does the same.

When a command fails, it says how to report it, and keeps the error in ~/.diffprism/last-error.json so --bug can include it.

Development

git clone https://github.com/CodeJonesW/diffprism.git
cd diffprism
pnpm install
pnpm test
pnpm run build
pnpm docs:check                     # Fail if docs disagree with the code (runs in CI)
pnpm cli review --staged            # Run CLI from source

Dogfooding a checkout

To try unreleased changes in another project without publishing, point your global diffprism at a checkout:

git clone https://github.com/CodeJonesW/diffprism.git diffprism-dogfood
cd diffprism-dogfood && pnpm install && pnpm build && npm link
diffprism --version                 # 1.2.0 (dev build — /path/to/diffprism-dogfood)

Then, for each change you want to try:

git fetch && git checkout <branch> && git pull && pnpm build

The next diffprism command — a review, the commit gate — replaces the running server with the new build, unless a review is open in it. The dashboard picks up a rebuilt UI on reload. Go back to the release with npm install -g diffprism@latest.

A server is only ever replaced by a newer build. Claude Code keeps diffprism serve running on the build it started with until you restart it, so restart Claude Code to put its MCP tools on the new build too.

Project Structure

packages/core       — Server, types, server-client utilities
packages/git        — Git diff extraction + parser
packages/analysis   — Deterministic review briefing
packages/ui         — React 19 + Vite 6 + Tailwind + Zustand
packages/mcp-server — MCP tool server (16 tools)
packages/github     — GitHub PR fetching + review submission
cli/                — Commander CLI

Requirements

  • Node.js >= 20
  • Git

Documentation

Contributing

See CONTRIBUTING.md. Contributors sign the CLA before a pull request is merged.

License

Apache License 2.0. Copyright 2026 Will Jones.


DiffPrism™ and the DiffPrism logo are trademarks of Will Jones. See TRADEMARKS.md.