npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@furbyhaxx/pi-prompt-history

v0.1.0

Published

Slim Pi extension that keeps session-scoped prompt history and loads prior prompts into pi's native editor.

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/history loads 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; no Pi.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 input event 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.jsonl
  • Adds /history to 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.json files.

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