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

statusline-pi

v1.3.1

Published

Compact project statusline footer for Pi with directory, branch changes, context remaining, response speed, model, and PR number

Readme

statusline-pi

statusline-pi — cost, context, tps

statusline-pi — two-line wrap on narrow terminals

statusline-pi — GPT-5 mini session

Compact project statusline footer for Pi.

Format:

current-dir │ branch [changed files] PR #x │ estimated session cost │ CPU % · MEM % │ remaining context tokens (percentage) context zone │ average response speed │ provider/model

Example:

pi-extensions │ main [2] PR #12 │ $0.18 │ CPU 42% · MEM 68% │ 😄 840,037 (84.0%) Plan │ 42.5 tps │ openai-codex/gpt-5.5

Context zone icons change with usage:

| Zone | Icon | Meaning | |------|------|---------| | Plan | 😄 | Big grin — plenty of context room | | Code | 🙂 | Small smile — good space for coding | | Dump | 😐 | Flat mouth — heavy context building | | ExDump | 😟 | Frown — near the limit | | Dead | 😵 | Dizzy face — exhausted |

Behavior

  • Installs as a Pi extension and enables automatically on session start.
  • Replaces Pi's default footer with a compact responsive statusline.
  • Uses one line when the terminal is wide enough, then wraps into multiple width-safe lines on narrow terminals so long branch names do not hide context, speed, or model details.
  • Refreshes git change count and host CPU/memory usage every 5 seconds.
  • Shows CPU and MEM utilization for the local machine (CPU 42% · MEM 68%). CPU is derived from os.cpus() time deltas (omitted until the second sample). Memory is (total - free) / total. Colors follow the same thresholds as other indicators: default success, warning at ≥85%, error at ≥95%.
  • Shows average model response speed as output tokens per second (tps) across completed assistant responses.
  • Shows a warning when an OpenAI GPT model reaches 272,000 context tokens, the reported pricing breakpoint where the same token costs double. The warning is emitted once per threshold crossing.
  • Shows an estimated accumulated session cost in USD, summed from each assistant response's token usage (input, output, cache-read, cache-write) and the active model's per-million token rates from Pi's model catalog (aligned with pi.dev/models). This is an estimate only—actual billing may differ by provider, discounts, or OAuth subscriptions.
  • Updates the cost after each assistant response and when you switch models; omits the cost segment when the active model has no pricing, and displays cost ? when usage was reported without a computable price.
  • Includes the active assistant response in the average while it is streaming, then keeps the completed average visible while idle.
  • Checks for a GitHub PR associated with the current branch every 60 seconds using gh pr view.
  • Omits the PR segment when gh is unavailable or the branch has no PR.

Commands

  • /statusline-pi — toggle the custom footer on/off.
  • /statusline-refresh — force refresh git and PR data.

Install

Published on npm: statusline-pi. Use Pi's package manager (pi install), not npm install alone.

pi install npm:statusline-pi
pi install npm:[email protected]   # pin version
pi install -l npm:statusline-pi      # project-local (.pi/settings.json)
pi -e npm:statusline-pi              # one session, no install

Then run /reload in Pi (or restart).

pi list
pi update npm:statusline-pi
pi remove npm:statusline-pi

From pi-extensions (git):

cp -r extensions/statusline-pi ~/.pi/agent/extensions/