pi-command-history

extensionmaintained

Folder-based persistent command history for pi. Recall previous commands with ctrl+up/down across sessions.

by · v0.1.2 · published 4mo ago

$ pi install npm:pi-command-history
downloads/mo
0
stars
3
last push
8h ago
open issues
1

Signals

license: MITtestspi manifest: missinginstall size: —deps: 0peer deps: 0

Download trend

407 downloads · last 12 weeks (weekly)

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

ShortcutAction
ctrl+upPrevious command (older)
ctrl+downNext 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