pi-input-history

Cross-session prompt history and fuzzy Ctrl+R search for pi.

Packages

Package details

extension

Install pi-input-history from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-input-history
Package
pi-input-history
Version
1.0.0
Published
Jun 21, 2026
Downloads
not available
Author
ouzhenkun
License
MIT
Types
extension
Size
60.5 KB
Dependencies
0 dependencies · 3 peers
Pi manifest JSON
{
  "extensions": [
    "./index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-input-history

Cross-session prompt history and fuzzy Ctrl+R search for pi.

npm version License: MIT

Why

Pi's built-in ↑/↓ history only covers the current session and is lost on reload. This extension persists your last 100 prompts across sessions and adds fuzzy Ctrl+R search to find any past prompt instantly.

Ctrl+R reverse search

Install

pi install npm:pi-input-history

Or from git:

pi install git:github.com/ouzhenkun/pi-input-history

Usage

Persistent History

On session start, your last 100 prompts across all sessions are loaded into the editor. Use ↑/↓ arrows to browse them as usual.

Reverse Search (Ctrl+R)

  1. Press Ctrl+R to open the search overlay.
  2. Type to fuzzy-filter history (subsequence matching, space-separated multi-token).
  3. Matched characters are highlighted with your theme's accent color.
  4. Navigate and accept:
Key Action
Ctrl+R / Cycle to older match
Ctrl+S / Cycle to newer match
Enter Accept match into editor
Esc / Ctrl+G Cancel

Features

  • Cross-session persistence — history survives across sessions automatically.
  • Fuzzy subsequence matching — type partial characters in order, multi-token support with spaces.
  • Character-level highlighting — matched positions shown with accent color underline.
  • Deduplication — no duplicate entries across sessions.
  • Current session awareness — merges live branch history with cached cross-session history.

Acknowledgments

The Ctrl+R reverse search component is inspired by pi-readline-search by @mrshu.

License

MIT