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

@spences10/pi-starfield

v0.0.5

Published

Theme-aware input stars with suggested next prompts for Pi

Readme

@spences10/pi-starfield

built with Vite+ tested with Vitest npm version license

my-pi package preview

A shaded input with quiet, twinkling stars and a suggested next prompt for Pi. Press Tab to use the suggestion. Needs Pi 1.4.0 or newer.

Installation

pi install npm:@spences10/pi-starfield

Local development from this monorepo:

pnpm --filter @spences10/pi-starfield run build
pi install ./packages/pi-starfield
# or for one run only
pi -e ./packages/pi-starfield

What it does

  • The input keeps the active theme's userMessageBg background while empty or typing. It starts at three shaded rows and grows with text.
  • Single-dot Braille stars stay in fixed cells with dim, slow 9–14 second pulses. Typing does not stop or restart the animation.
  • While the input has text, only the row below it twinkles, so Pi never redraws your text and a mouse selection in it stays put.
  • Stars remain in the padding above and below typed text. Text rows, cursor cells, scroll indicators, and autocomplete stay clear.
  • After each agent turn, one short call to the session model (no thinking, at most 60 output tokens) predicts your next prompt from your last prompt and the agent's final reply. It shows as dim text in the empty input with ⇥. Tab puts it in the input; typing hides it. It is never sent on its own. A new turn clears it. Suggestions keep working with /starfield off, using Pi's normal borders and background without stars, shading, or an animation timer.
  • Pasted text, history, shortcuts, and autocomplete keep Pi's input and layout behavior. Scroll indicators remain visible for long input.
  • Animation requests a normal Pi render every 500 ms while the editor has focus. It stops when another component takes focus, the editor is replaced, or the session shuts down. No raw terminal writes.
  • Theme changes apply on the next render. Stars blend muted toward userMessageBg in truecolor themes. Other palettes use dim, which is also used for suggestion text.
  • NO_COLOR and TERM=dumb disable the custom editor. Print, JSON, and RPC modes do not install it.
  • Another custom editor is not replaced. Disable the other extension first, or disable this one when using a different editor.

Controls

/starfield on      Animate stars (default)
/starfield static  Keep a still star field, with no animation timer
/starfield off     Normal input appearance; keep suggestions
/starfield suggest on|off   Suggested next prompts (default on)

Stars and suggestions are independent. Use /starfield suggest off to disable predictions. Turning both off restores Pi's default editor entirely; otherwise the extension's editor provides the suggestions.

The choice is saved globally in ~/.pi/agent/my-pi-settings.json (or in the configured Pi agent directory), under:

{
	"packages": {
		"pi-starfield": { "mode": "static", "suggest": true }
	}
}

Using from a custom harness

import starfield from '@spences10/pi-starfield';

// Pass starfield as an ExtensionFactory to your Pi runtime.

Local testing

From the repository root:

pnpm run build
node dist/index.js

Try typing, clearing the input, pasting multiple lines, history keys, slash completion, a theme change, a narrow terminal, and the three /starfield modes. The local terminal and font determine the final dot appearance.

Design reference

The effect was checked against OpenAI Codex's composer sparkle source. This implementation uses its own cell hash and pulse function, with Pi's CustomEditor and render scheduler. Unlike Codex's model-specific, time-limited flourish, it works with any model and continues while typing.

Development

Package scripts build transitive workspace dependencies first, then run local tools through Vite+ with vp exec.

pnpm --filter @spences10/pi-starfield run check
pnpm --filter @spences10/pi-starfield run test
pnpm --filter @spences10/pi-starfield run build

License

MIT