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-proto-prompt

v0.1.2

Published

Modal scratch notes appended to the Pi prompt

Readme

pi-proto-prompt

A modal notes editor for Pi. Move text between a scratch draft and the prompt without sending it to the model.

Why?

While the agent is working, you have an idea and start drafting your next prompt. Then the agent finishes and asks a question. You want to answer right away, but your unfinished draft is still in the prompt editor.

You could move it to an external editor, but that adds friction and breaks your flow. The same problem arises when you want to run a slash command halfway through writing a prompt.

Proto Prompt lets you move your draft into a temporary editor, freeing the prompt for a reply or command. Restore your draft whenever you're ready.

Global installation

pi install npm:pi-proto-prompt

Run /reload in existing sessions after installation or updates.

Usage

  • Ctrl+Alt+P: open the centered modal with a continuous box-drawing frame.
  • Opening moves the current prompt to the end of the modal draft and clears the prompt.
  • Enter: close the modal, transfer its contents to the prompt immediately, and clear the draft. This does not send a message to the model.
  • Shift+Enter (or Ctrl+J): insert a new line.
  • Paste protection: in legacy terminals without bracketed paste, Enter within 200 ms of typing is treated as a newline. Pause briefly after typing/pasting before pressing Enter to transfer. This is a timing safeguard, not perfect paste detection; bracketed paste is recommended.
  • Ctrl+C inside the modal: clear all text, including the saved draft, without closing.
  • Alt+V inside the modal: paste copied file paths, an image path, or plain text at the cursor without confirming. Screenshots are saved as temporary image files; existing copied files keep their original paths. Paths are quoted to support spaces. Clipboard reads are discarded if you clear or close the modal before they finish. Requires local clipboard access; errors appear in the modal.

Clipboard image access uses Pi's native backend, with a PowerShell fallback on Windows/WSL. Saved images remain in the OS temporary directory so paths stay valid after transfer; the extension does not delete them automatically. Pasting a path does not itself attach an image or send it to the model.

  • Esc: close and keep the draft for later. Imported prompt text remains in the draft, not in the main prompt.
  • /proto-prompt: open the modal without a keyboard shortcut.

Drafts remain in memory until confirmed, reloaded, or Pi exits. No notes are saved to disk. Whitespace-only additions are ignored. Interactive TUI only; RPC and print modes are not supported.

Global shortcut

Create pi-proto-prompt.json in Pi's user directory (normally ~/.pi/agent, or the directory selected by PI_CODING_AGENT_DIR):

{
  "shortcut": "ctrl+alt+p"
}

For example, use "ctrl+alt+n" to change the shortcut for all projects. Run /reload to apply changes. The default is ctrl+alt+p; invalid configuration produces a warning and falls back to the default. Project overrides are not read.

User configuration takes precedence over the default. If your terminal intercepts the configured combination, choose another shortcut or use /proto-prompt.

Pi rejects reserved shortcuts: Ctrl+K, for example, belongs to tui.editor.deleteToLineEnd and must be remapped in Pi's global keybindings before an extension can use it. The OS, terminal, or other extensions may also intercept a shortcut. Check /hotkeys for active bindings.

Development

npm install
npm run check
npm test
pi -e .

Manual checks: import an existing prompt, edit multiline notes, press Enter, and verify the prompt appears immediately without submitting. Reopen to verify the draft was cleared. Test Escape retention, Unicode, narrow terminals, resizing, focus, and both regular and fullscreen modes.