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

@yorch/pi-statusbar

v0.4.2

Published

Theme-aware status bar (footer) for the pi coding agent — modular segments, presets, rich git status, context progress bar, session clock, Nerd Font icons.

Readme

@yorch/pi-statusbar

npm version CI Release Node Bun Biome License: MIT

Theme-aware status bar (footer) for the pi coding agent.

Renders a live status bar in the pi footer: token usage, cache, cost, a context progress bar, git status, working directory, model + thinking level, session clock, and extension statuses — all colored through pi's theme tokens, so it re-skins automatically with whatever theme you're using (Tokyo Night, light, or any custom theme).

default:  ↑1.2k ↓340 W0.5k CH92.1% $0.004 ██████░░░░ 42%/64k · ● working… · ⎇main · tradr · model:high
full:     ~/code-personal/tradr/ (⎇main ↑2 ↓5 +1) #12 github.com/yorch/tradr        mbp2024.local · ◷ 12m · 14:32
          ↑1.2k ↓340 W0.5k CH92.1% $0.004 ██████░░░░ 42%/64k ≡1     ● working… · model:high · c921a07 Fix thing

Install

pi install npm:@yorch/pi-statusbar
# or directly from git
pi install git:github.com/yorch/pi-statusbar

Restart pi (or /reload) to activate. The bar installs automatically once enabled (see below).

Usage

  • /statusbar (alias /footer) — toggle the bar
  • /statusbar minimal|compact|default|full — switch preset (saved to settings.json)

To have the bar on by default, add to ~/.pi/agent/settings.json:

{
	"statusbar": {
		"enabled": true,
		"preset": "full"
	}
}

All config is optional:

{
	"statusbar": {
		"enabled": true,
		"preset": "full",
		"nerd": true,
		"separator": "dot",
		"contextBar": true,
		"pr": true,
		"contextMode": "percent"
	}
}

| Key | Default | Description | | ------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | enabled | false | Install the footer automatically on session start | | preset | default | minimal · compact · default · full | | nerd | auto | Force Nerd Font glyphs (true/false). Auto-detects iTerm, WezTerm, Kitty, Ghostty, Alacritty (TERM_PROGRAM), Ghostty inside tmux (GHOSTTY_RESOURCES_DIR); force with STATUSBAR_NERD_FONTS=1/0 | | separator | dot | dot (·) · pipe () · space | | contextBar | true | Show the context progress bar (eighth-block gradient, accentwarning >70%→error >90%) | | pr | true | Show the PR segment (clickable #n via OSC 8 hyperlink, looked up with gh). Set false to hide | | contextMode | percent | percent (42%/64k) · remaining (32k left/64k) · used (32k/64k) |

Presets & segments

Segments render through pi theme tokens (dim, muted, accent, success, warning, error, thinkingLowthinkingMax), so they follow your active theme.

| Segment | Shows | | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | tokens | cumulative ↑input ↓output + 12k/min after 1 min (smart 1.2k/45M formatting) | | cache | W… cache write, CH…% hit rate | | cost | cumulative cost (adaptive $0.0043 / $1.235 / $12.35) | | context | context bar + 42%/64k (or 32k left/64k / 32k/64k via contextMode); ?/64k with an estimator fallback after compaction | | statuses | chips from ctx.ui.setStatus() (used by other extensions) | | git | branch (success clean / warning dirty) + worktree + ⚑conflicted + ↑ahead ↓behind vs upstream + +staged *unstaged ?untracked + detached@sha; async, 2s cache | | diff | +added -removed from git diff --numstat, hidden when clean | | pr | clickable #n for the current branch's PR (gh pr view), colored by state — draft warning, open/merged success, closed error. Only in the full preset; hide with pr: false | | stash | stash entry count (≡ n), hidden when empty | | commit | last commit as shortSha subject (git log -1), hidden without commits | | remote | origin as host/owner/repo, e.g. github.com/yorch/pi-statusbar, hidden without a parseable remote | | path | cwd — basename, or ~/full/path/ in full | | model | model id + :thinking badge colored by its own theme token | | hostname / time / session | machine name, wall clock, elapsed session time |

| Preset | Lines | Segments | | --------- | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | minimal | 1 | path · git · context | | compact | 1 | model · git · cost · context | | default | 1 | tokens · cache · cost · context · diff · statuses · git · path · model + right-aligned session | | full | 2 | line 1: path · git · pr · remote + right hostname · session · time; line 2: tokens · cache · cost · context · diff · stash + right statuses · model · commit |

Troubleshooting

  • Bar doesn't appear: enabled defaults to false. Add {"statusbar":{"enabled":true}} to ~/.pi/agent/settings.json and /reload (or run /statusbar). The bar is TUI-only — it won't render in print/rpc/json modes (ctx.hasUI guard).
  • Nerd Font icons show as ? or tofu: your terminal isn't detected. Force via STATUSBAR_NERD_FONTS=1 (or 0 for ASCII fallback) and restart pi.
  • Git info empty: you're outside a git repo or in a bare repo. The git segment hides itself when branch is null.
  • PR #n missing: requires gh installed + authed (gh auth login), a GitHub remote, and a branch with an open PR. Results cache for 5 min.

Development

bun install
bun run typecheck
bun test

See CONTRIBUTING.md for the project layout, the release dev-loop, and the npm publish gotchas. Agents working in this repo should read AGENTS.md.

Credits

Inspired by pi-powerline-footer and oh-my-pi. Built on pi's TUI extension API.

License

MIT