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

@juanibiapina/pi-powerbar

v0.6.0

Published

Pi extension that renders a persistent powerline status bar with left/right segments updated via events

Readme

pi-powerbar

A pi extension that renders a persistent powerline-style status bar with left-aligned and right-aligned segments.

Any other pi extension can update segments by emitting a single powerbar:update event — no imports or dependencies required.

Install

pi install npm:@juanibiapina/pi-powerbar

⚠️ Load Order: pi-powerbar must appear after pi-extension-settings and before any segment-emitting extensions in your packages array in ~/.pi/settings.json. It registers settings at load time (requiring pi-extension-settings to already be loaded), and segment emitters send events that pi-powerbar must be ready to receive.

Usage

The powerbar renders a widget with two sides, like tmux:

powerbar screenshot

Producing segments

Any extension can register and update a segment. First, register the segment so it appears in the settings menu:

pi.events.emit("powerbar:register-segment", {
  id: "git-branch",
  label: "Git Branch",
});

Then update it with data:

pi.events.emit("powerbar:update", {
  id: "git-branch",
  text: "main",
  icon: "⎇",
  color: "accent",
});

To remove a segment:

pi.events.emit("powerbar:update", {
  id: "git-branch",
  text: undefined,
});

Built-in segments

| Segment ID | Description | |------------|-------------| | git-branch | Current git branch (refreshes after bash commands) | | tokens | Cumulative input/output tokens and session cost (e.g. ↑9 ↓270 $0.11) | | context-usage | Context window usage as a progress bar with percentage | | provider | Current LLM provider name (e.g. anthropic, openai) | | model | Current model name and thinking level | | sub-hourly | Hourly subscription usage from pi-sub-core | | sub-weekly | Weekly subscription usage from pi-sub-core |

Configuration

Settings are managed through pi-extension-settings and can be changed via the /extension-settings command in pi.

| Setting | Description | Default | |---------|-------------|---------| | Left segments | Segments shown on the left side (ordered multi-select menu) | git-branch,tokens,context-usage | | Right segments | Segments shown on the right side (ordered multi-select menu) | provider,model,sub-hourly,sub-weekly | | Separator | String drawn between segments on the same side | | | Placement | Where the powerbar appears (belowEditor or aboveEditor) | belowEditor | | Bar width | Width of progress bars in characters (4–24) | 10 |

The left and right segment settings open an interactive menu where you can toggle segments on/off and reorder them with Shift+↑/↓. All segments registered via powerbar:register-segment appear as options. Segments not listed in either side are ignored.

Development

npm install
npm run check    # lint + typecheck
npm run build    # compile to dist/
npm run dev      # watch mode

License

MIT