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

bb-plugin-lanes

v0.1.3

Published

A bb plugin showing every model lane's headroom in one place. bb tracks Claude Code and Codex natively; this adds OpenCode Zen Go and OpenRouter, normalised into the same shape.

Downloads

311

Readme

bb-plugin-lanes

Every model lane's headroom in one place.

bb natively tracks Claude Code and Codex subscription windows. It knows nothing about OpenCode Zen Go or OpenRouter, so the lanes you are most likely to exhaust by surprise are the ones with no gauge. This adds them, normalised into the same shape bb already uses.

bb lanes           # human-readable
bb lanes --json    # for agents deciding where to route work

Also renders as a settings section — see Placement below for why it is not on the Usage limits page.

Screenshots

lanes

Lanes settings: headroom across every model lane.

The distinction it encodes

The four lanes are not the same kind of thing, and the display says so:

  • subscription — Claude Code, Codex, and OpenCode Go. A quota window that refills. Exhausting one costs you waiting until resetsAt. Go is a $10/mo plan with rolling/weekly/monthly caps, so it belongs here despite being an API.
  • metered — OpenRouter. A balance that depletes, with no auto-reload. It does not throttle; it runs dry and the lane stops working. Rendered with remaining dollars and deliberately no countdown, because nothing refills it and a timer would be a lie.

LiteLLM is deliberately not a lane

It is the router your Zen and OpenRouter traffic flows through, so listing it beside them would double-count. Its useful axis is attribution — which alias burned the budget — which needs one LiteLLM virtual key per lane, since /global/spend/report groups by team/customer/api_key but not by model. Not implemented.

It displays. It does not alert.

bb has no notification system of any kind: no settings, no push code in the server bundle, no notification tables, nothing in the plugin catalog, and nothing reaches the desktop app or the PWA. This plugin polls every 5 minutes into plugin kv and shows you the result when you look.

Alerting is a separate job. If you need to be told before you look, run a poller of your own against the same endpoints (see Sources) and push through ntfy or similar. If you already have one, do not delete it on the assumption that this plugin covers it.

Gotchas worth knowing

Credentials are read from ~/.bb/env.json before process.env, and the order matters. process.env is a snapshot taken when the bb server started, so after a key rotation it serves a revoked credential until the whole server restarts. The file on disk is what you actually edit. Reading env first produced a live 401 on OpenRouter minutes after a rotation while the file was already correct.

Zen rejects some default user agents outright. Requests send an explicit User-Agent; without one, https://opencode.ai/zen/go/v1/usage returns 403 with a valid key. Identical key, 403 with urllib's default and 200 with any ordinary identifier. It looks exactly like an auth failure and is not.

Context windows are unverified. Zen's /models advertises only id and owned_by, so nothing here reports Go context limits.

Placement

The natural home is bb's built-in Settings → Usage limits, beside Codex and Claude Code. That page is host-owned and no slot targets it — PluginSettingsSectionRegistration has no page selector — so this lands under Extensions → Plugins → Lanes instead. Filed upstream at get-bb/bb asking for a contribution slot; the data already shares bb's {label, usedPercent, resetsAt} shape, so if that lands the component moves with no rework.

Switching to homepageSection (always visible) or navPanel (its own sidebar entry) is a one-line change in app.tsx.

Sources

| Lane | Endpoint | |---|---| | Claude Code, Codex | bb.sdk.system.usageLimits() | | OpenCode Go | GET https://opencode.ai/zen/go/v1/usage | | OpenRouter | GET https://openrouter.ai/api/v1/credits |

OpenRouter is read from credits, not the key's spend cap — the balance is what actually stops the lane.

Developing

Installed from a path, so the backend loads server.ts directly — edit and bb plugin reload lanes. Frontend changes need bb plugin build . first, or run bb plugin dev to watch.