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

pi-show-diffs

v0.2.8

Published

Pi package that adds a diff approval viewer before edit and write tools change files.

Readme

pi-show-diffs

warp.dev inspired pi extension that stops and shows an editable diff before file changes are applied.

https://github.com/user-attachments/assets/8bda7619-fcd2-4615-a93a-d15b2fee408b

It currently reviews:

  • edit
  • hashline_edit
  • write

This gives pi an interactive pre-apply diff review step, so you can inspect the proposed change first and then decide whether to allow it.

Diff review UX

For normal file changes, the modal uses a split diff viewer with:

  • side-by-side Original / Updated columns
  • syntax-aware ANSI highlighting for common code file types
  • collapsed unchanged regions with clear labels
  • hunk-aware navigation
  • unified diff fallback for narrow terminals or preview errors
  • live toggle between split and unified views
  • inline editing for edit, write, and valid hashline_edit previews directly inside the diff modal
  • adjustable context expansion around hunks
  • wrapped inline rendering for long lines

Install

Install from npm:

pi install npm:pi-show-diffs

Or install directly from GitHub:

pi install git:github.com/xRyul/pi-show-diffs

Commands

  • /diff-approval — open or toggle approval settings
  • /show-diffs — alias for /diff-approval

Command args:

  • /diff-approval on
  • /diff-approval off
  • /diff-approval toggle
  • /diff-approval status

Shortcuts in the diff modal

Approval actions

  • Enter, a, or y - approve
  • r or Esc - reject
  • E or e - enter inline edit mode for the updated side
  • Esc in inline edit mode — leave editing and return to review mode
  • s - steer and add feedback
  • Shift+A - approve and turn on auto-approve

Navigation

  • / - scroll
  • PgUp / PgDn - jump by page
  • Home / End — jump to top/bottom
  • n / p - next / previous hunk
  • inline edit mode: Ctrl+N / Ctrl+P jump hunks; Alt/Option + / also works if your terminal is configured to send Alt

View controls

  • Tab - toggle split / unified view
  • / — decrease / increase shown context around hunks
  • [ / ] - alternate context controls
  • w - toggle wrapping

Config

Persistent config is stored at:

~/.pi/agent/extensions/pi-show-diffs.json

Current config shape:

{
  "autoApprove": false
}

Notes

  • no edit/write tool overrides are registered, so it stays compatible with other tool-wrapping extensions like collapse-tools.ts
  • non-interactive mode falls back to a text-based diff review flow
  • steering rejects the current proposal and sends your feedback back to the model
  • editing final file content applies immediately for edit, write, and hashline_edit after the original tool call succeeds
  • auto-approve restores normal behavior until you turn it off again
  • invalid hashline_edit previews (for example tag mismatches) skip the review modal and fall through to the tool's normal error handling