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

@nicknisi/pi-stash

v0.1.2

Published

Stash and restore the current prompt draft

Readme

@nicknisi/pi-stash

Replicates Claude Code's ctrl+s message stash. Press ctrl+s to stash whatever you've typed in the input editor, go do something else (run a command, answer another prompt), then press ctrl+s again with an empty editor to pop the most recent stash back. Stashes live on a stack, so multiple drafts can be parked and restored LIFO.

What it adds

  • Keybinding: ctrl+s — stash/restore toggle (see behavior table below)
  • Widget: a single-line widget above the editor, visible whenever the stash stack is non-empty, showing a 60-char preview of the most recent stash, the count of additional stashes ((+N more)), and a ctrl+s to restore hint
  • Events hooked: before_agent_start — after a message is submitted and the agent starts, the most recent stash is auto-restored into the now-empty editor (mirrors Claude Code)
  • No slash commands, no tools, no custom entry types.

Keybinding behavior

| Editor state on ctrl+s | Action | | ----------------------------------------- | ------------------------------------------ | | Contains text | Push text onto the stack, clear the editor | | Empty (or whitespace) and stack non-empty | Pop the most recent stash into the editor | | Empty and stack empty | No-op |

Usage

(type a long prompt, then need to ask something else first)
ctrl+s            "⧉ stashed: Refactor the auth module to..." · editor cleared
(ask the other question; on submit, the stashed draft is restored automatically)
ctrl+s            (with empty editor) pops the stash back manually

The stash is in-memory only (per session, per process). It is not persisted across restarts.

Configuration

None. No config files, no options, no environment variables.

Dependencies

  • Peer: @earendil-works/pi-coding-agent (*). Uses only the public extension API: pi.registerShortcut, pi.on("before_agent_start"), ctx.ui.getEditorText / setEditorText / setWidget / theme, and ctx.hasUI.
  • No runtime npm dependencies, no workspace deps.

Caveats

  • UI-gated: every handler checks ctx.hasUI; the extension is a no-op in headless/non-TUI mode.
  • Depends on the editor text APIs (ctx.ui.getEditorText / setEditorText) and the widget system (ctx.ui.setWidget) — these are stable pi extension APIs, but a pi version that changes editor or widget semantics could affect it.
  • The before_agent_start auto-restore pops a stash whenever a message is sent with an empty editor. If you intentionally sent a quick command and wanted the stash to stay parked, it will still be restored into the editor (you can ctrl+s it back). This matches Claude Code's behavior.
  • Stash stack is module-local state; it does not survive session reload or extension reload.
  • No platform-specific behavior (works on any OS/terminal pi runs in). The widget preview uses the Unicode glyphs and .

Install

pi install /Users/nicknisi/Developer/pi-extensions/packages/stash