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-snippets

v1.0.3

Published

Zero-keystroke snippet auto-expander for pi — type a trigger word and it expands

Readme

Pi Snippets

Zero-keystroke snippet auto-expander for pi.

Type a trigger word and it instantly expands on the last keystroke — no delimiter, no confirmation needed. Just natural typing flow.

Quick Start

pi install npm:pi-snippets

Getting Started

No snippets are bundled. You start with a blank slate and add exactly what you need.

Adding Snippets

Using /add (recommended)

Add snippets directly from inside pi — no file editing, no /reload:

/add eml : [email protected]
/add lgtm : Looks good to me! 👍
/add sum : Summarize the following:

Remove snippets with the interactive /remove command — a TUI picker lets you check off which ones to delete.

The snippet takes effect instantly — start typing the trigger immediately. Saved to ~/.pi/agent/snippets.json so it persists across sessions.

Editing the file directly

You can also edit ~/.pi/agent/snippets.json directly:

{
  "sig": "Best regards,\nJane Doe",
  "sum": "Summarize the following:\n\n",
  "lgtm": "Looks good to me! 👍"
}

Then /reload inside pi (or restart).

Project-level (shared with your team)

Create .pi/snippets.json in your project root and commit it to git. Project snippets only load when the project is trusted.

Priority (later sources override earlier ones)

  1. Project (.pi/snippets.json, trusted projects only) — highest priority
  2. User global (~/.pi/agent/snippets.json)
  3. Bundled defaults (shipped with this package) — lowest priority (fallback)

How It Works

The extension replaces pi's input editor with a custom editor that intercepts every keystroke. As soon as you finish typing a trigger word, it expands instantly — the last character of the trigger itself fires the expansion.

  • Instant expansion: No delimiter required — the moment you type the final character of a trigger word, it expands to your defined text.
  • Word-boundary safe: The trigger must be a complete whitespace-delimited token (or at the very start of input). Typing sig inside design won't trigger expansion because sig is not at a word boundary.
  • Compatible: Works alongside other extensions. Wraps any existing custom editor via getEditorComponent() to preserve composability.

Trigger Guidelines

Choose triggers that are not common English words or prefixes of other triggers to avoid accidental or premature expansion:

  • sig, tpl, dbg — abbreviation-like, unlikely to be typed by accident
  • ⚠️ fix, todo, bug — common words that might trigger mid-sentence
  • ⚠️ db / dbg — overlapping prefixes can cause the shorter trigger to fire early
  • a, i, q — single-letter triggers are very prone to false positives

Multi-character, abbreviation-style triggers work best. Avoid triggers that are prefixes of each other.

License

MIT