@fitchmultz/pi-stash

A pi extension for stashing draft messages and restoring them later.

Packages

Package details

extension

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

$ pi install npm:@fitchmultz/pi-stash
Package
@fitchmultz/pi-stash
Version
0.4.4
Published
Nov 1, 2026
Downloads
514/mo · 78/wk
Author
fitchmultz
License
MIT
Types
extension
Size
37.2 KB
Dependencies
0 dependencies · 2 peers
Pi manifest JSON
{
  "extensions": [
    "./extensions/stash.ts"
  ]
}

Security note

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

README

pi-stash

Pi Stash is a Pi extension that saves editor drafts. Use it to save a draft before you send another message.

Pi Stash saves a draft before you send another message, then restores the draft to the editor.

Install

Use Pi and Node.js. The development guide lists version requirements and GitHub and local installation options.

pi install npm:@fitchmultz/pi-stash

Restart Pi after you install or update the extension.

Usage

  1. Write a draft in the editor.
  2. Press Ctrl+Shift+S to save the draft and clear the editor.
  3. Send another message.
  4. Press Ctrl+Shift+R to restore a draft.
  5. Continue to edit the draft.

These steps use the default shortcuts.

Pi Stash opens a picker when more than one draft exists. In the picker, press Enter to restore the selected draft.

Pi Stash removes a draft from storage after you restore it. If the editor contains text, Pi Stash pastes the draft into that text.

The footer shows the saved draft count.

Commands and shortcuts

Shortcut or command Action
/stash Saves the editor draft and clears the editor
/stash some text Saves the supplied text and leaves the editor unchanged
/stash-list Opens the picker to restore or delete drafts

The picker uses Pi's navigation and confirmation keys. Press Ctrl+D to delete the selected draft. Press Ctrl+X to clear all drafts after confirmation.

If a shortcut does not work in your terminal, use /stash or /stash-list.

Configure or disable shortcuts in pi-stash.json in your Pi agent directory. See shortcut configuration for the format and an example.

Saved drafts

Pi Stash stores up to 10 drafts per working directory, newest first. A new draft replaces the oldest draft when the list is full. Save important drafts elsewhere before you reach this limit.

Pi Stash saves drafts as unencrypted JSON in your Pi agent directory. Saved drafts remain available after a restart or crash.

Pi windows and sessions in the same working directory share saved drafts. Changes from separate windows are serialized. All windows must use a version with cross-window locking for that protection.

Pi Stash ignores blank drafts. The /stash some text command preserves leading and trailing whitespace.

See the storage and client reference for file locations, client behavior, and imports from older versions.

Development

See the development guide for tests, compatibility checks, and releases.

Changelog · Report a problem

MIT license · Created by Mitch Fultz