pi-command-history
Folder-based persistent command history for pi. Recall previous commands with ctrl+up/down across sessions.
Package details
Install pi-command-history from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-command-history- Package
pi-command-history- Version
0.1.2- Published
- Mar 29, 2026
- Downloads
- 136/mo · 34/wk
- Author
- rossz
- License
- MIT
- Types
- extension
- Size
- 6 KB
- Dependencies
- 0 dependencies · 1 peer
Pi manifest JSON
{
"extensions": [
"extensions/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-command-history
Folder-based persistent command history for pi. Recall previous commands with ctrl+up/ctrl+down across sessions — as long as you're in the same folder, your full command history is always available.
Install
pi install npm:pi-command-history
Or try without installing:
pi -e npm:pi-command-history
Usage
| Shortcut | Action |
|---|---|
ctrl+up |
Previous command (older) |
ctrl+down |
Next command (newer) |
When you enter a command in pi, it's saved to a per-folder history file. Next time you open pi in the same folder (even in a new session), press ctrl+up to cycle through your previous commands.
What gets saved
- All user input is saved, including
/slash commands - History is deduplicated — repeated commands move to the most recent position
- Up to 500 commands are stored per folder
How it works
- History files are stored in
~/.pi/folder-history/as JSONL, keyed by a hash of the working directory - A status indicator in the footer shows the number of saved commands
- Compatible with other editor extensions (e.g.,
pi-vim) — no editor replacement conflicts
Uninstall
pi remove npm:pi-command-history
To also remove saved history:
rm -rf ~/.pi/folder-history/
License
MIT