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

claude-statusblocks

v0.4.1

Published

Opinionated, adaptive block-based status line for Claude Code with bin-packing layout, rate limit tracking, and campaign monitoring

Readme

╭─ context ──────╮ ╭─ model ────────────────────╮
│ ████▒▒▒▒▒▒▒▒▒▒ │ │ Opus 4.6 · ~/my-proj       │
│ 24% · 245K/1.0M│ │ high · 2h15m · v2.1.76     │
╰────────────────╯ ╰────────────────────────────╯
╭─ promo ───────╮ ╭─ git ──────────────╮ ╭─ usage ─────────────────╮
│ 2× off-peak   │ │ main               │ │ ████▒▒▒▒ 42% · ↻3h · 5h │
│ → peak 3h 12m │ │ 2 staged · +47 -12 │ │ ██▒▒▒▒▒▒ 18% · ↻4d · 7d │
╰───────────────╯ ╰────────────────────╯ ╰─────────────────────────╯

claude-statusblocks

npm version license

Adaptive, block-based status line for Claude Code. Cards reflow into a pyramid layout based on available terminal width using an exhaustive bin-packing algorithm.

Zero runtime dependencies. Pure Node.js built-ins only.

Install

npx claude-statusblocks init

This writes statusLine.command into ~/.claude/settings.json. Restart Claude Code to activate.

Cards

| Card | Shows | |------|-------| | context | Context window fill bar, percentage, used/total token count | | model | Model name, tilde-shortened directory, effort level, session duration, version | | promo | 2x off-peak / peak status with countdown to next transition | | git | Branch, staged/modified counts, lines added/removed | | usage | 5-hour and 7-day rate limit utilization with reset countdowns |

Cards appear based on context: git only in repos, promo only during active rate promotions, usage when rate limit data is available (Claude Code ≥2.1.80).

Layout

Cards are bin-packed into rows for optimal fit — blocks can be freely reordered across rows. Rows are sorted narrowest-on-top (pyramid shape). The algorithm tries every possible row assignment and picks the layout with fewest rows and most balanced widths.

Row 1 gets extra right margin to avoid overlapping Claude Code's notification panel. On narrow/split-pane terminals, the layout degrades gracefully to stacked single-block rows.

Configure

~/.claude-statusblocks.json:

{
  "segments": ["context", "model", "usage"]
}

Or via environment:

CLAUDE_STATUSBLOCKS_SEGMENTS=context,model,usage
CLAUDE_STATUSBLOCKS_THEME=minimal

Usage data

The usage card reads rate limit data directly from Claude Code's rate_limits field in the statusline JSON (available since v2.1.80). No external API calls, OAuth tokens, or caching needed.

Width detection

Claude Code doesn't pass terminal width to status line commands (#22115). We walk up the process tree to find the parent's TTY via ps, then query its width with stty. Falls back to tput cols, then 120.

Preview

npx claude-statusblocks preview

Development

npm run build       # compile TypeScript
npm run dev         # watch mode
npm test            # run vitest suite
npm run preview     # render with mock data

Tests are co-located with source files (*.test.ts). The project uses vitest with fake timers for deterministic campaign engine testing.

License

MIT