@ctogg/pi-stash
Git-style prompt stashing for pi — save what you're typing, clear the editor, and come back to it later.
Package details
Install @ctogg/pi-stash from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@ctogg/pi-stash- Package
@ctogg/pi-stash- Version
0.1.1- Published
- Apr 16, 2026
- Downloads
- 259/mo · 14/wk
- Author
- ctogg
- License
- MIT
- Types
- extension
- Size
- 15.7 KB
- Dependencies
- 0 dependencies · 2 peers
Pi manifest JSON
{
"extensions": [
"./prompt-stash.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-stash
Git-style prompt stashing for pi.
Save what you're typing, clear the editor, and come back to it later.
Install
pi install npm:@ctogg/pi-stash
Try it for a single session without adding it to your settings:
pi -e npm:@ctogg/pi-stash
To install into the current project only (writes to .pi/settings.json):
pi install -l npm:@ctogg/pi-stash
Then /reload in pi (or restart).
Developing locally
Clone the repo and symlink the extension into your global extensions directory:
git clone https://github.com/cristeahub/pi-stash
cd pi-stash
ln -s "$(pwd)/prompt-stash.ts" ~/.pi/agent/extensions/prompt-stash.ts
Make sure the npm-installed version is removed first (pi remove npm:@ctogg/pi-stash) so you don't load two copies.
Usage
Shortcuts
| Key | Action |
|---|---|
Ctrl+Q |
Stash current editor text |
Ctrl+Shift+Q |
Stash with a message |
Commands
| Command | Action |
|---|---|
/stash |
Interactive stash picker |
/stash list |
Interactive stash picker |
/stash pop |
Picker locked to pop mode |
/stash apply |
Picker locked to apply mode |
/stash drop |
Picker locked to drop mode |
/stash clear |
Drop all stashes (with confirmation) |
Picker Keys
| Key | Action |
|---|---|
j / ↓ |
Move down |
k / ↑ |
Move up |
Enter |
Apply or pop (configurable, default: apply) |
a |
Apply — paste into editor, keep stash |
p |
Pop — paste into editor, remove stash |
d |
Drop — delete stash without pasting |
Esc |
Close picker |
Configuration
All settings in ~/.pi/stash-config.json:
{
"stash": "ctrl+q",
"stashWithMessage": "ctrl+shift+q",
"enterAction": "apply"
}
| Key | Default | Description |
|---|---|---|
stash |
ctrl+q |
Quick stash shortcut |
stashWithMessage |
ctrl+shift+q |
Stash with message shortcut |
enterAction |
"apply" |
What Enter does in the picker: "apply" or "pop" |
Only include keys you want to override. /reload after editing.
Storage
Stashes persist in ~/.pi/stash.json across all sessions and projects.
License
MIT