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-dumb-zone

v0.1.0

Published

A pi coding agent footer built around a colored context-usage bar that warns when you drift into the dumb zone (a context window so full the model gets sloppy). Also shows git branch and path, token/cost stats, model and thinking level, and Anthropic subs

Readme

pi-dumb-zone

A pi coding agent footer built around a colored context-usage bar. As the context window fills, the bar goes green → orange → red to warn you that you may be drifting into the dumb zone: a context so full the model starts dropping details and getting sloppy. Around it the footer also shows git branch and path, token/cost stats, the active model and thinking level, and Anthropic subscription usage.

pi-dumb-zone footer screenshot

⎇  master • ~/projects/app                            claude-opus-4-8 • high
↑120k ↓8.4k • R90k W12k • $0.41 • S45% (2h 13m) W73% (5d)   62% ███████░░░░░ (620k/1.0M)

The footer is two rows:

  • Row 1 — left: git branch working directory; right: model name thinking level.
  • Row 2 — left: session token stats (sent received Rcache-read Wcache-write cost subscription usage); right: the colored context-usage bar.

Segments are separated by a bullet; empty segments (no branch, no thinking level, no subscription data) are dropped. Works with any provider; only the subscription-usage segment is Anthropic-specific and simply hides for other providers.

The percentage and the whole bar are colored by absolute token usage:

  • green (colors.green) while at or below thresholds.orangeAbove (default 200k)
  • orange (colors.orange) while above that and at or below thresholds.redAbove (default 500k)
  • red (colors.red) above thresholds.redAbove

The Claude subscription usage percentages use the same three colors, keyed on 70% and 90%.

After compaction, when the exact token count is briefly unknown, the widget renders ?% ░░░░░░░░░░░░ (?/1.0M).

Claude subscription usage

When you use an Anthropic model through an OAuth subscription (Claude Pro/Max via /login), Anthropic returns rate-limit headers that this extension reads via the after_provider_response event. It shows the session window (S, roughly a 5-hour rolling limit) and the weekly window (W), each with the percentage of the allowance consumed and a compact time until reset. With a raw API key or a non-Anthropic model these headers are absent and the segment is hidden. Disable it with showClaudeUsage: false.

Install

From the pi package catalog:

pi install npm:pi-dumb-zone

Or from the git repo:

pi install git:github.com/stylesuxx/pi-dumb-zone

Commands

  • /dumbzone toggles the footer on and off (restores the built-in footer when off).
  • /dumbzone-reload re-reads the config file from disk.

Configuration

Configuration layers, lowest to highest precedence:

  1. Built-in defaults.
  2. Global: ~/.pi/agent/dumbzone.json.
  3. Project: .pi/dumbzone.json (only when the project is trusted).

All fields are optional; missing fields fall back to the defaults. See dumbzone.example.json.

| Field | Type | Default | Meaning | |-------|------|---------|---------| | thresholds.orangeAbove | number | 200000 | Absolute tokens above which the bar turns orange. | | thresholds.redAbove | number | 500000 | Absolute tokens above which the bar turns red. | | colors.green | hex | #3fb950 | Color for the low (green) state. | | colors.orange | hex | #d29922 | Color for the medium (orange) state. | | colors.red | hex | #f85149 | Color for the high (red) state. | | barWidth | number | 12 | Number of cells in the progress bar. | | showModel | boolean | true | Show the active model name on the right. | | showClaudeUsage | boolean | true | Show Anthropic subscription session/weekly usage when available. | | filledChar | string | | Character for filled bar cells. | | emptyChar | string | | Character for empty bar cells. |

The three state colors are 6-digit hex, rendered as 24-bit ANSI. Labels, paths, cost, and other dim text still come from the active pi theme; only the green/orange/red states are fixed hex so they stay legible across themes.

Notes

The footer only renders in interactive TUI mode. In print, JSON, and RPC modes the extension is a no-op.

Development

The pure logic (config, colors, formatting, header parsing, rendering) lives in core.ts with no pi-runtime imports, so it is unit-tested in isolation. index.ts is the thin runtime glue.

npm install
npm test        # node:test suite over core.ts
npm run typecheck