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

@ittaigolde/differ

v0.1.0

Published

Terminal diff review bridge for Claude Code

Downloads

74

Readme

differ

Side-by-side diff review for Claude Code, without leaving your terminal. One keypress to accept or reject — no IDE, no context switch, no friction.

Because you trust Claude. Just not unconditionally.

 original                          │ proposed
 @@ -3,7 +3,6 @@
    3   "I told my wife she was    │    3   "I told my wife she was
    4   drawing her eyebrows too   │    4   drawing her eyebrows too
    5   high. She looked           │    5   high. She looked surprised."
    6   "I'm reading a book        │
    7   about anti-gravity.        │    6   "I'm reading a book about
    8   It's impossible to put     │    7   anti-gravity. It's impossible
[y] accept  [n] reject                                   line 1/12 · hunk 1/1

What it does

Sits between you and Claude. Every time Claude tries to write a file, you see a side-by-side diff in your terminal and get to decide. Claude waits patiently. You press y or n. Life continues.

It implements the Claude Code IDE integration protocol over a local WebSocket — the same protocol VS Code and Emacs use — so Claude thinks it's talking to a proper IDE. It is not.

Requirements

  • Node.js ≥ 18
  • claude CLI installed (npm install -g @anthropic-ai/claude-code)
  • A terminal with TTY support

Install

npm install -g @ittaigolde/differ

The install step also applies a small compatibility fix for node-pty on macOS ARM when needed.

For local development:

cd /path/to/this/repo
npm install
npm link          # makes `differ` available globally

Usage

# In your project directory:
differ

# With a specific workspace:
differ --workspace /path/to/project

# Resume a previous session:
differ --resume <session-id>

# Debug WebSocket traffic (useful if something feels off):
differ --debug /tmp/ws.log

# Debug terminal input handling:
differ --input-debug /tmp/input.log

When --workspace is provided, relative paths from Claude are resolved against that workspace. This lets you launch differ from another directory while still reviewing the right files.

Any arguments after -- are passed directly to claude:

differ -- --model claude-opus-4-7

differ starts Claude with --ide automatically so Claude can connect to the bridge without selecting it from /ide every run.

If Claude does not connect to IDE mode a few seconds after startup, differ prints a one-time warning once the terminal has been idle briefly. This warning means diff review may not be active yet; in Claude, run /ide and select differ, or check that Claude was started with IDE support enabled.

You can also constrain port discovery:

differ --port-min 12000 --port-max 12100

Keys

| Key | Action | |-----|--------| | y | Accept — write the file | | n / Esc | Reject — Claude is notified and can try again | | Ctrl+C | Reject and exit | | j / | Scroll down | | k / | Scroll up | | Ctrl+F / Page Down | Page down | | Ctrl+B / Page Up | Page up | | ]c | Next hunk | | [c | Previous hunk |

How it works

  1. On startup, writes ~/.claude/ide/<port>.lock — the file Claude Code scans to discover IDEs.
  2. Starts a WebSocket server on a free port (default range 10000–65535).
  3. Spawns claude in a pseudo-terminal so it gets its own stdin/stdout.
  4. When Claude calls openDiff, the response is deferred — Claude blocks — while you review.
  5. y sends FILE_SAVED + the new contents. n sends DIFF_REJECTED. Claude continues accordingly.
  6. Lock file is removed on exit.

No patches to Claude. No config changes. Nothing persistent except the lock file while running.

Development

Run the test suite with:

npm test

The tests cover protocol response routing, workspace-relative path resolution, and terminal diff row width rendering.

Caveats

  • Diagnostics (getDiagnostics) always return empty. Claude may occasionally wonder why your code has no errors. Let it wonder.
  • If Claude proposes multiple file changes, they queue up. You review them one at a time.
  • Windows, macOS, and Linux should work, subject to node-pty support for your terminal and Node.js version.