@furbyhaxx/pi-prompt-history
Slim Pi extension that keeps session-scoped prompt history and loads prior prompts into pi's native editor.
Package details
Install @furbyhaxx/pi-prompt-history from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@furbyhaxx/pi-prompt-history- Package
@furbyhaxx/pi-prompt-history- Version
0.1.0- Published
- May 13, 2026
- Downloads
- 27/mo · 27/wk
- Author
- furbyhaxx
- License
- MIT
- Types
- extension
- Size
- 21.7 KB
- Dependencies
- 0 dependencies · 5 peers
Pi manifest JSON
{
"extensions": [
"extensions/prompt-history/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-prompt-history
A slim pi coding agent extension that keeps session-scoped prompt history and lets you load previous prompts back into pi's native editor.
It provides prompt recall with:
- Session-local storage — prompts are written next to the active pi session as
prompt.history.jsonl. - Native editor integration —
/historyloads a selected prompt via pi's built-in editor API. - No custom theme or editor — pi's active theme and default editor stay in charge, as nature briefly intended.
- Regular pi settings — configuration uses global/project
settings.json; noPi.yaml.
Project repository: https://github.com/furbyhaxx/pi-prompt-history
Install
Install from GitHub:
pi install git:https://github.com/furbyhaxx/pi-prompt-history
Install from npm:
pi install npm:@furbyhaxx/pi-prompt-history
Or clone the repo and install from the local checkout:
git clone https://github.com/furbyhaxx/pi-prompt-history
pi install path/to/cloned/repo
Or load directly without installing:
pi -e path/to/cloned/repo/extensions/prompt-history/index.ts
What it does
Captures raw submitted prompt text via Pi's
inputevent before skill/template expansion.Stores history as JSONL in the current Pi session directory:
${PI_CODING_AGENT_DIR:-~/.pi/agent}/sessions/{session-cwd-sanitized}/prompt.history.jsonlAdds
/historyto browse stored prompts and load one back into the native Pi editor.Skips extension-injected messages so helper extensions do not pollute user prompt history.
Supports global and project config through Pi's normal
settings.jsonfiles.
Configuration
Global settings live at:
${PI_CODING_AGENT_DIR:-~/.pi/agent}/settings.json
Project settings live at:
.pi/settings.json
Example:
{
"promptHistory": {
"enabled": true,
"maxEntries": 200,
"dedupe": "consecutive",
"trim": true,
"ignoreInvalidLines": true,
"command": "history"
}
}
Options:
| Key | Default | Description |
|---|---|---|
enabled |
true |
Enable prompt capture and /history. |
maxEntries |
200 |
Maximum entries retained in prompt.history.jsonl. |
dedupe |
"consecutive" |
"none", "consecutive", or "all". |
trim |
true |
Trim submitted prompts before storing. |
ignoreInvalidLines |
true |
Ignore malformed JSONL lines instead of failing. |
command |
"history" |
Optional extra command alias registered after session start. |
For compatibility with the extracted source layout, this package also reads editor.history from settings.json; promptHistory wins when both are present.
Build and validation
No build artifacts are produced; pi loads the .ts source directly via jiti.
npm install
npm run test
npm run test runs TypeScript typechecking and unit tests for config loading, JSONL storage, and extension registration behavior.
License
MIT