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-reverse-search

v0.1.1

Published

Ctrl+R reverse prompt search for Pi's TUI editor, inspired by shell reverse-i-search.

Readme

pi-reverse-search

Ctrl+R reverse prompt search for Pi's TUI editor, inspired by shell reverse-i-search in bash/readline and zsh.

Features

  • Press Ctrl+R in Pi's input box to enter reverse prompt search.
  • Type to filter previous user prompts from the current session branch.
  • Matching text is highlighted in the selected prompt.
  • Press Ctrl+R again to cycle older matches for the current query.
  • Press Ctrl+S, Down, or Ctrl+N to cycle newer matches.
  • Press Enter to accept and submit the selected prompt.
  • Press Esc or Ctrl+G to cancel and restore your draft.
  • Press Ctrl+C to cancel search and let Pi handle normal clear/interrupt behavior.

Install

From a local checkout

pi install /absolute/path/to/pi-reverse-search

Or test without installing:

pi -e /absolute/path/to/pi-reverse-search/extensions/reverse-search.ts

From GitHub

pi install git:github.com/viggy28/[email protected]

Or install the latest main branch:

pi install git:github.com/viggy28/pi-reverse-search

From npm

pi install npm:pi-reverse-search

To pin a specific release:

pi install npm:[email protected]

Usage

  1. Start Pi after installing the package, or run /reload in an existing session.
  2. Press Ctrl+R in the prompt editor.
  3. Type a search query.
  4. Use Ctrl+R / Ctrl+S to cycle matches.
  5. Press Enter to submit, or Esc / Ctrl+G to cancel.

Development

Run tests:

npm test

Smoke-test extension loading:

npm run smoke

Package layout

extensions/reverse-search.ts              # Pi extension entrypoint
extensions/reverse-search-lib/core.ts     # Pure search state + key decoding logic
test/reverse-search.test.mjs              # Node tests for core behavior

Troubleshooting

Extension shortcut conflict for ctrl+r

This package does not register a global Pi shortcut; it handles Ctrl+R only inside its custom prompt editor. If Pi reports a conflict such as:

Extension shortcut conflict: 'ctrl+r' is built-in shortcut for app.session.rename and /path/to/pi-reverse-search/src/index.ts

then Pi is loading an older local checkout that registered Ctrl+R as a global shortcut. Remove that local install, then reload Pi and install the npm package instead:

pi uninstall /path/to/pi-reverse-search
pi install npm:pi-reverse-search

If the warning path points at an npm cache/package directory rather than a local src/index.ts, update to the latest package:

pi install npm:pi-reverse-search@latest

Notes

This extension searches prompts in the active Pi session branch. It does not search all historical session files.