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

pi-hooks

v1.0.3

Published

Collection of pi extensions (checkpoint, lsp, permission, ralph-loop, repeat)

Readme

pi-extensions

Minimal reference extensions for pi-coding-agent.

Quick Setup

Install the package:

pi install npm:pi-hooks
pi config  # enable/disable extensions

Dependencies are installed automatically during pi install.

To pull updates later:

pi update git:github.com/prateekmedia/pi-hooks

Included Extensions

checkpoint/

Git-based checkpoint system for restoring code state when forking conversations.

  • Captures repo state at the start of every turn (tracked, staged, and untracked files)
  • Stores checkpoints as Git refs for persistence across sessions
  • Offers restore options: files + conversation, conversation only, or files only
  • Automatically saves current state before restoring past snapshots

lsp/

Language Server Protocol integration (hook + tool).

The package exports two extensions via package.json:

  • lsp-hook.ts - Auto-diagnostics (default at agent end)
  • lsp-tool.ts - On-demand LSP queries

Hook (auto-diagnostics):

  • Default: runs diagnostics once at agent end for touched files
  • Optional: run after each write/edit
  • Configure via /lsp to switch to per-edit or disabled
  • Supports web, Flutter, and common backend stacks
  • Manages LSP server lifecycles per project root

Tool (on-demand queries):

  • Definitions, references, hover, symbols, diagnostics, signatures
  • Query by symbol name or line/column position

permission/

Layered permission control with four permission levels:

| Level | Description | What's allowed | |---------|-----------------------|-----------------------------------------------------| | Minimal | Read-only mode | Only read commands (ls, cat, git status, etc.) | | Low | File edits | + write/edit files | | Medium | Dev commands | + npm, git, make, cargo, etc. | | High | Full access | Everything (dangerous commands still prompt) |

On first run you pick a level; it's saved globally. Use /permission to change levels and /permission-mode to switch between ask/block prompts.

ralph-loop/

Looped subagent execution via the ralph_loop tool.

  • Runs single or chain subagent tasks until a condition returns false
  • Takes a prompt and exit condition (exit condition optional)
  • Can supply max iterations and minimum delay between each
  • Optionally supply model and thinking
  • Supports conditionCommand, maxIterations, and sleepMs controls
  • Interactive steering/follow-up + pause/resume/stop commands in UI mode
  • Defaults to the worker agent and the last user prompt when omitted
  • No npm install required

Example prompt: "Use ralph loop to check the current time five times, sleeping 1s between iterations."

repeat/

Repeat past tool calls (bash/edit/write) from the current branch.

  • /repeat shows a picker of recent bash/edit/write tool calls with type-to-search filtering
  • Bash entries load as !command in the editor for tweak + run
  • Write entries open a temp editor (if $EDITOR is set) and apply only when you save
  • Edit entries can repeat the edit (may fail) or open $EDITOR at the first changed line; repeat uses a temp editor and applies on save

token-rate/

Shows the average output tokens per second (TPS) in the footer status line.

Usage

  1. Install the package and enable extensions:

    pi install npm:pi-hooks
    pi config
  2. See inline comments in each extension for configuration options.

Testing

cd lsp && npm install
cd ../permission && npm install
cd ../checkpoint && npm test
cd ../lsp && npm run test:all
cd ../permission && npm test

License

MIT