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

@pithos-kit/context-bar

v0.1.1

Published

A thin, stacked context-window composition bar for Pi.

Readme

context-bar

A thin, stacked context-window composition bar for pi, rendered directly above the editor.

▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀────────────────────────42%

The real bar uses a harmonious theme-aware color progression and spans the terminal width. Used context renders as upper-half blocks, while free capacity renders as a thin line matching the editor's current border color. Whenever width permits, every visible section is separated by a one-cell terminal-background delimiter; wider sections contribute the space so one-cell sections remain intact. This leaves balanced spacing around the input cursor. While enabled, context-bar removes Pi's separate top-border row; disabling the bar restores it. Its only inline text is the integer percentage at the far right showing total context used.

Install

Context Bar requires Pi 0.84.1 or later. Do not add it to a Pithos environment still pinned to Pi 0.83.0; Atlas will report that combination as incompatible.

pi install npm:@pithos-kit/context-bar

For local development:

pi install -l ./pithos.context-bar

Pithos .pithos config

pi:
  extensions:
    "@pithos-kit/context-bar": "npm:0.1.1"

Commands

| Command | Action | |---|---| | /context-bar | Toggle the bar | | /context-bar on | Enable it | | /context-bar off | Disable it | | /context-bar status | Show the legend, estimated counts, model/window, and estimation basis | | /context-bar --help | Show command usage without changing bar state |

-h is also accepted.

New sessions start enabled. Explicit changes are stored as non-context entries on the active session branch, so they survive reload, resume, and fork without creating project or global configuration.

Segments

Segments always appear in this order:

| Segment | Includes | Color identity | |---|---|---| | Prompt | Pi's base prompt, custom/append prompts, working directory, and extension prompt changes | Violet | | Project context | Loaded AGENTS.md, CLAUDE.md, and related project instruction context | Blue | | Skills | Skill catalogue metadata, explicit /skill:* expansions, and recognized skill-file read results | Teal | | Tools | Active definitions/schemas, prompt guidance, calls, arguments, results, and context-visible shell output | Green | | Conversation | User content, prompt templates, images, assistant text/thinking, summaries, and custom context messages | Amber | | Other | Provider framing, serialization differences, extension rewrites, and estimation residual | Gray | | Free | Remaining context capacity | Thin line matching the current editor border (borderMuted fallback) |

The original violet → blue → teal → green → amber progression remains stable across themes. Context Bar selects darker or brighter variants from the active theme's foreground contrast instead of relying on semantic theme tokens whose hues may vary. Free capacity still follows the editor border as its mode/thinking color changes. The percentage uses the same dim theme color as Pi's footer path; it does not change color at thresholds.

Accuracy

Pi exposes aggregate context usage, but not exact additive token counts by source. The colored composition is therefore an estimate:

  • Text uses Pi-compatible conservative character-based token estimation.
  • Images use Pi's fixed image estimate.
  • A current provider aggregate is preferred only when it belongs to the selected model and matches the effective prompt/tool fingerprint; changed requests fall back to the safer local estimate.
  • Positive unexplained residual is assigned to Other; overestimates are proportionally reconciled.
  • Startup, model-switch, and post-compaction states use a complete local estimate until correlated provider usage is available.

/context-bar status identifies the current basis as provider-backed total or local estimate. The extension persists only the enabled/disabled boolean. While enabled, it reads Pi's in-memory prompt, context, and schema objects to recompute the bar; it clears its references when disabled or shut down and never writes or logs those inputs or provider payloads.

Tiny categories may occupy less than one terminal cell and disappear from the passive bar rather than being visually exaggerated. They remain visible in /context-bar status.

Development

Requires Node.js 22.19 or later and Pi 0.84.1 or later. This minimum includes upstream fixes for the dependency advisories affecting Pi 0.83.0.

npm install
npm test
npm run audit
npm run typecheck
npm pack --dry-run