@herbertgao/pi-stash

Stash one pi draft and restore it after the next message.

Packages

Package details

extension

Install @herbertgao/pi-stash from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@herbertgao/pi-stash
Package
@herbertgao/pi-stash
Version
0.1.2
Published
Aug 24, 2026
Downloads
108/mo · 22/wk
Author
herbertgao
License
MIT
Types
extension
Size
6.3 KB
Dependencies
0 dependencies · 0 peers
Pi manifest JSON
{
  "extensions": [
    "./src/index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

@herbertgao/pi-stash

HerbertGao-maintained fork of @tifan/pi-stash, distributed under MIT with the original attribution preserved.

Stash one draft, send another message, and return to the draft while pi works.

Install

pi install npm:@herbertgao/pi-stash

Keybinding

pi-stash uses Alt+S, which does not conflict with Pi's built-in shortcuts.

macOS

On macOS, press Option+S (Option is the Alt key). If that inserts ß instead of triggering pi-stash, configure the terminal to send Option as Meta/Escape:

  • Terminal.app: Settings → Profiles → Keyboard → Use Option as Meta key.
  • iTerm2: Settings → Profiles → Keys → Left Option key (or Right Option key) → Esc+.

Usage

Press Alt+S with text in the editor to stash it. Pi clears the editor so you can send another message, then restores the draft as soon as that message is submitted.

Press Alt+S again while the editor is empty to restore the draft manually. If the editor contains new text, pi-stash keeps both drafts unchanged and refuses to overwrite either one.

The stash belongs to the current session and survives reloads and restarts. Slash commands and ! shell commands do not consume it.

License

MIT