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

diffback-review

v1.4.0

Published

Review AI-generated code changes and generate structured feedback prompts

Readme

diffback

A local web tool to review AI-generated code changes. Think GitHub PR reviews, but for uncommitted diffs in your terminal workflow.

Instead of manually reading git diff output and typing feedback into a chat, diffback gives you a visual interface to browse changes, mark files as viewed, leave comments on specific lines, and generate a structured feedback prompt you can paste directly into your AI agent.

diffback diff view with syntax highlighting

Why

When working with AI coding agents (Claude Code, Cursor, Copilot, etc.), the review loop is painful:

  1. The AI makes changes across multiple files
  2. You run git diff and scroll through walls of text
  3. You mentally track what you've reviewed and what needs fixing
  4. You type feedback into the chat, forgetting half of what you noticed
  5. The AI applies fixes, and you start over -- re-reviewing files that didn't change

diffback fixes this by giving you a proper review interface with persistent state that survives between rounds.

Features

File browser with diff stats

Browse all changed files with status indicators (Added, Modified, Deleted, Renamed) and line stats (+/-). Filter by review status: All, Pending, Viewed, or Feedback.

File list with filters and stats

Inline comments with line ranges

Click a line number to reference it, drag across multiple lines to select a range, or shift+click to extend. Comments appear as bubbles directly in the diff. Edit or delete comments with the ✏ / × icons — the edit button is available both in the diff bubble and in the file comments panel below. Quick comment presets for common feedback.

Inline comment on a line range

Generate feedback prompt

One click to produce a structured, token-efficient markdown prompt. Auto-copied to clipboard, ready to paste into your AI agent.

Generated feedback modal

Themes

Three built-in themes: Solarized Dark (default), Monokai, and GitHub Light. Syntax highlighting adapts to each theme. Preference persists across sessions.

| Solarized Dark | Monokai | GitHub Light | |:-:|:-:|:-:| | Solarized Dark | Monokai | GitHub Light |

More features

  • Persistent state between rounds -- files you viewed stay viewed if unchanged; modified files get flagged automatically
  • Review round history -- comments from previous rounds are archived and shown as violet markers in the diff
  • Auto-refresh -- detects external file changes every 3 seconds without manual reload
  • Expand hidden lines -- lines before the first hunk, between hunks, and after the last hunk are all expandable; expanded lines are also selectable for line-range comments
  • Copy file path -- ⧉ button next to the filename copies the full path to clipboard, so you can jump straight to the file in your IDE
  • Code suggestions -- attach a suggested replacement snippet to any comment; included verbatim in the generated feedback prompt
  • Resizable sidebar -- drag to adjust the file list width
  • Keyboard shortcuts -- j/k navigate files, a mark viewed, c comment, g generate feedback

Requirements

  • Node.js >= 24
  • Git

Install

npm install -g diffback-review

Or run directly with npx:

npx diffback-review

Usage

From any git repository with uncommitted changes:

npx diffback-review

This starts a local server and opens your browser. Review the changes, add comments, then click Generate Feedback to get a prompt you can paste into your AI agent.

Options

diffback [options]

  --port <number>  Port to use (default: 3847)
  --help, -h       Show help

Keyboard shortcuts

| Key | Action | |-----|--------| | j / k | Next / previous file | | a | Mark current file as viewed (advances to next) | | c | Focus comment input | | g | Generate feedback prompt | | Cmd+Enter | Submit comment |

How state works

Review state is stored in .diffback-local-diffs/<branch_name>/state.json inside the reviewed project. Add .diffback-local-diffs to your .gitignore.

Between review rounds:

  • File unchanged since last review -- stays marked as viewed
  • File modified since last review -- automatically flagged as "changed since review", status reset to pending. Previous comments are archived with their round number.
  • File no longer in diff (reverted or committed) -- removed from state
  • "Finish Review" button -- deletes all state for the current branch, shows goodbye screen, shuts down the server

Generated feedback format

The output is designed to be token-efficient and easy for AI agents to parse:

# Code Review Feedback

1 files need changes. 2 comments total.

## src/users/model.py
- L42: Handle the null case before accessing user.name
- L15-22: Use a dataclass instead

Tech stack

  • TypeScript + Node.js -- server, feedback generator, and state manager as separate modules
  • Vanilla JS client -- HTML + CSS + JS, no frameworks
  • Node built-in http -- no Express or framework dependencies
  • diff2html -- diff rendering with syntax highlighting (loaded via CDN)
  • 3 themes -- Solarized Dark, Monokai, GitHub Light

Development

git clone https://github.com/verabravo/diffback.git
cd diffback
npm install
npm run build
npm test

Test against any repo with uncommitted changes:

cd /path/to/your/project
node /path/to/diffback/dist/cli.js

Watch mode for development:

npm run dev

License

MIT