@fgladisch/pi-persistent-history
Per-project persistent prompt input history for Pi
Package details
Install @fgladisch/pi-persistent-history from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@fgladisch/pi-persistent-history- Package
@fgladisch/pi-persistent-history- Version
0.2.0- Published
- May 6, 2026
- Downloads
- not available
- Author
- fgladisch
- License
- MIT
- Types
- package
- Size
- 13.7 KB
- Dependencies
- 0 dependencies ยท 1 peer
Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
@fgladisch/pi-persistent-history
Persist Pi prompt input history per project.
Install
pi install npm:@fgladisch/pi-persistent-history
Behavior
- Stores history in
<project>/.pi/input-history.jsonl - Writes each line with prompt text + Unix timestamp (milliseconds)
- Captures prompts from
inputevents (including slash commands) - Skips consecutive duplicates
- Reads
maxEntriesonly from~/.pi/agent/settings.jsonatpersistentHistory.maxEntries(default250) - Loads and injects history at startup for up/down recall
- In non-interactive mode, performs no action
Slash commands
/history-reloadโ Reload project history file and re-inject entries into editor history/history-statusโ Show file path, entry count, maxEntries, and injection status
Settings
Global settings file path: ~/.pi/agent/settings.json.
This extension reads persistentHistory.maxEntries and persistentHistory.showStartupMessage from that file (on startup and /history-reload).
{
"persistentHistory": {
"maxEntries": 250,
"showStartupMessage": true
}
}
persistentHistory.maxEntries: number of lines kept in project JSONL history (default250)persistentHistory.showStartupMessage: show one-line startup notify like[Persistent History] Loaded N entries (max: M) since YYYY/MM/DD, HH:mm from .pi/input-history.jsonl.(defaulttrue)
File format
{"text":"summarize src/auth/session.ts and suggest 3 refactors","timestamp":1746523456123}
{"text":"/model claude-sonnet-4","timestamp":1746523470091}
{"text":"write failing tests for retry timeout edge cases","timestamp":1746523484550}