@fitchmultz/pi-stash

中文文档
0.4.11发布于 2026/11/15MITES Module零依赖构建来源已验证近 30 天下载 2357

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

原始使用文档
文档目录5 节
  1. Install
  2. Usage
  3. Commands and shortcuts
  4. Saved drafts
  5. Development

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 commandAction
/stashSaves the editor draft and clears the editor
/stash some textSaves the supplied text and leaves the editor unchanged
/stash-listOpens 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

版本与发布记录

@fitchmultz/pi-stash 共发布 38 个版本,首次发布于 2026/04/07;过去 12 个月发布了 38 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.4.11latest2026/11/151 天前
0.4.102026/11/123 天前
0.4.92026/11/0312 天前
0.4.82026/11/0312 天前
0.4.72026/11/0213 天前
0.4.62026/11/0213 天前

关于 @fitchmultz/pi-stash 的常见问题

@fitchmultz/pi-stash 是什么?

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

如何安装 @fitchmultz/pi-stash?

在项目目录运行 npm install @fitchmultz/pi-stash,或使用 pnpm add / yarn add / bun add。

@fitchmultz/pi-stash 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/fitchmultz__pi-stash 是否存在。

@fitchmultz/pi-stash 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@fitchmultz/pi-stash 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=24.22.3 <25 || >=26.13.1。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@fitchmultz/pi-stash 可以商用吗?

@fitchmultz/pi-stash 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@fitchmultz/pi-stash 的下载量有多少?

根据 npm 官方下载统计,@fitchmultz/pi-stash 在 2026/10/15 – 2026/11/13 这 30 天内被下载 2,357 次,日均约 79 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@fitchmultz/pi-stash 还在维护吗?

最新版本 0.4.11 发布于 2026/11/15(1 天前);至今共发布 38 个版本,其中过去 12 个月发布了 38 个;首次发布于 2026/04/07。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。