@arcanemachine/pi-stash
Stash and restore an ephemeral Pi prompt with a keyboard shortcut
Package details
Install @arcanemachine/pi-stash from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@arcanemachine/pi-stash- Package
@arcanemachine/pi-stash- Version
0.1.1- Published
- Sep 4, 2026
- Downloads
- 207/mo · 13/wk
- Author
- arcanemachine
- License
- MIT
- Types
- extension
- Size
- 66.8 KB
- Dependencies
- 0 dependencies · 1 peer
Pi manifest JSON
{
"image": "https://raw.githubusercontent.com/arcanemachine/pi-stash/main/logo.jpg",
"extensions": [
"./src/index.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 for stashing and restoring one ephemeral prompt.
pi-stash adds one ephemeral prompt register to Pi's interactive editor. Use a keyboard shortcut to move a draft out of the editor, restore it later, or have it return automatically after you submit another prompt.
Like this extension? See my other Pi extensions.
Requirements
- Pi 0.84.1 or later
- Node.js 22.19.0 or later for package development
Installation
From GitHub:
pi install git:github.com/arcanemachine/pi-stash
From npm after publication:
pi install npm:@arcanemachine/pi-stash
For local development:
pi -e ./src/index.ts
Usage
The default shortcut is Alt+S (alt+s). It operates only while Pi's prompt editor is focused.
| Editor | Register | Result |
|---|---|---|
| Non-empty | Any | The exact editor text is stashed and the editor is cleared. Pi notifies that it was stashed. |
| Empty | Non-empty | The register is restored into the editor and cleared. Pi notifies that it was restored. |
| Empty | Empty | Pi appends Stash register is empty for this shortcut action. |
Stashing a new prompt replaces the previous register without confirmation. Meaningful whitespace inside a stashed prompt is preserved. Each stash action appends a plain Pi notification: Message contents stashed. Press [configured shortcut] to restore. The active shortcut is shown in readable form.
After you submit another ordinary interactive prompt while a register exists, the register is restored into the editor immediately and cleared. This makes the stashed prompt available as the next draft while Pi processes the prompt you just sent, and appends Stashed message restored as a plain Pi notification. Manual restoration appends the same notification.
The register is in memory only. It survives /reload in the same Pi process and session, but is cleared when Pi starts another session or exits. It is not added to the conversation or written to disk.
Settings
The shortcut can be changed in Pi's normal global settings file, ~/.pi/agent/settings.json:
{
"pi-stash": {
"shortcut": "alt+d"
}
}
Use a shortcut string from Pi's documented modifier+key format. Restart Pi or reload the extension after changing this setting. Invalid values fall back to alt+s.
This extension reads only the global Pi settings namespace shown above. It does not create a package-owned configuration file or modify settings automatically.
Development
npm install --ignore-scripts --workspaces=false
npm run format:check
npm run typecheck
npm run test
npm run build
npm pack --dry-run
Pi loads the TypeScript entrypoint directly from src/index.ts; no compiled runtime artifact is required by Pi.
License
MIT
