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

@richardgill/pi-up-history

v0.0.2

Published

Seeds Pi's native editor history from previous saved sessions for the current working directory.

Downloads

218

Readme

@richardgill/pi-up-history

Seeds Pi's native editor history from previous saved sessions for the current working directory.

Behavior

  • On interactive Pi startup, reads existing session JSONL for the current cwd.
  • Extracts up to 30 unique non-empty user prompts for the current cwd.
  • Seeds the built-in editor history so the normal Up arrow recalls the most recent saved prompt first.
  • Wraps any existing custom editor factory instead of replacing it blindly.
  • Does not create settings, keybindings, commands, UI, or a separate history file.

Install

pi install npm:@richardgill/pi-up-history

Development:

pi --no-extensions -e ./extensions/pi-up-history/src/index.ts

Manual smoke test

Create an isolated Pi data dir and cwd, seed session JSONL, then start Pi in tmux:

export TEST_PI_DIR=$(mktemp -d)
export TEST_CWD=$(mktemp -d)
SAFE_CWD=$(node -e 'console.log(process.argv[1].replace(/^[/\\\\]/, "").replace(/[/\\\\:]/g, "-"))' "$TEST_CWD")
SESSION_DIR="$TEST_PI_DIR/sessions/--$SAFE_CWD--"
mkdir -p "$SESSION_DIR"
printf '%s\n' \
  '{"type":"session","version":3,"id":"seed","timestamp":"2026-05-26T00:00:00.000Z","cwd":"'"$TEST_CWD"'"}' \
  '{"type":"message","id":"00000001","parentId":null,"timestamp":"2026-05-26T00:00:01.000Z","message":{"role":"user","content":"seeded up-history prompt","timestamp":1790294401000}}' \
  > "$SESSION_DIR/2026-05-26_seed.jsonl"

tmux new-session -d -s pi-up-history-test \
  "cd '$TEST_CWD' && PI_CODING_AGENT_DIR='$TEST_PI_DIR' timeout 12s pi --no-extensions -e /home/rich/code/pi-extensions/pi-up-history/extensions/pi-up-history/src/index.ts"
sleep 2
tmux send-keys -t pi-up-history-test Up
sleep 1
tmux capture-pane -pt pi-up-history-test | grep 'seeded up-history prompt'
tmux kill-session -t pi-up-history-test