pi-stash
Pi extension that stashes the current editor draft with Alt+S
Package details
Install pi-stash from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-stash- Package
pi-stash- Version
0.2.0- Published
- Mar 23, 2026
- Downloads
- 49/mo · 16/wk
- Author
- maxpetretta
- License
- MIT
- Types
- extension
- Size
- 7.7 KB
- Dependencies
- 0 dependencies · 1 peer
Pi manifest JSON
{
"extensions": [
"./src/stash.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-stash
A pi extension that temporarily stashes the current editor draft with a keyboard shortcut. Inspired by Claude Code.
Install
pi install npm:pi-stash
Or from GitHub:
pi install git:github.com/maxpetretta/pi-stash
Usage
Press Alt+S while typing a prompt to stash the current editor contents into:
.pi/stash.md
When you do that, pi-stash:
- saves the current draft
- clears the editor
- waits for your next prompt submission
- automatically restores the stashed draft into the editor right after that prompt is sent
If the editor is empty, pressing Alt+S again will immediately restore the pending stashed prompt instead.
This is useful when you want to quickly shelve one prompt, send another one first, and then continue where you left off.
Configuring the shortcut
pi-stash reads its shortcut from ~/.pi/agent/keybindings.json at startup. If pi-stash.shortcut is not set, it defaults to Alt+S.
Note: pi-stash.shortcut is a custom extension-owned key that pi-stash reads itself at startup. It is not a built-in pi action id.
Example:
{
"pi-stash.shortcut": ["ctrl+s"],
"app.session.toggleSort": ["alt+s"]
}
You can also use a single string instead of an array:
{
"pi-stash.shortcut": "ctrl+s"
}
If you remap pi-stash to Ctrl+S, also rebind pi's built-in session sort toggle off of Ctrl+S to avoid the shortcut conflict warning. After editing keybindings.json, run /reload in pi.
Development
This package uses Bun for local development.
bun install
bun run lint
bun run typecheck
bun run test
License
MIT