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-tab-spinner

v0.1.0

Published

pi extension: spin an icon in the terminal tab title while the agent works, so every tab shows busy or idle at a glance

Readme

pi-tab-spinner

pi extension that spins an icon at the start of the terminal tab title while the agent works, and removes the icon when the run settles.

🌒 π - Fix login race - customer-web   ← busy, animating
π - Fix login race - customer-web      ← idle

Run several pi sessions in several tabs and the tab bar tells you which ones are still working without switching to them.

Why the title and not a progress bar

pi can report progress with OSC 9;4 (terminal.showTerminalProgress in /settings). Ghostty draws that as a thin bar under the tab bar, visible only while the tab is focused, so it does not help when you are looking at another tab. The tab title, by contrast, is rendered for every tab at once, which is what this extension writes.

Install

pi install npm:pi-tab-spinner

Then restart pi (or /reload). Update later with pi update npm:pi-tab-spinner.

Or try it without touching your settings:

pi -e npm:pi-tab-spinner

Configure

| Environment variable | Default | Meaning | |---|---|---| | PI_TAB_SPINNER_FRAMES | 🌑,🌒,🌓,🌔,🌕,🌖,🌗,🌘 | Comma-separated frames, cycled in order | | PI_TAB_SPINNER_INTERVAL_MS | 120 | Milliseconds per frame, clamped to 20-5000 |

Examples:

# hourglass, flipping slowly
export PI_TAB_SPINNER_FRAMES="⏳,⌛"
export PI_TAB_SPINNER_INTERVAL_MS=600

# braille dots, the quietest option
export PI_TAB_SPINNER_FRAMES="⠋,⠙,⠹,⠸,⠼,⠴,⠦,⠧,⠇,⠏"
export PI_TAB_SPINNER_INTERVAL_MS=80

The frames are read at the start of every run, so nothing needs a restart after you change them.

How it works

  • agent_start starts a timer that rewrites the terminal title with ctx.ui.setTitle(), which pi sends as OSC 0. OSC 0 is the escape sequence that sets the terminal window title; Ghostty, iTerm2, Kitty, WezTerm, and Terminal.app all show it on the tab.
  • agent_settled stops the timer and restores the idle title. agent_settled fires when pi has no automatic continuation left, so retries, recovery, compaction, and queued messages all finish first. agent_end is not used, because a retry can follow it.
  • session_shutdown also restores the title, so quitting pi never leaves a frozen spinner behind.
  • The idle title is π - <session name> - <directory>, or π - <directory> when the session has no name, matching what pi itself writes at startup.
  • Print, JSON, and other headless modes report hasUI: false, and the extension writes nothing there.

Develop

git clone https://github.com/ymy88/pi-tab-spinner
cd pi-tab-spinner
npm test    # node --experimental-strip-types, no dependencies to install

License

MIT