Skip to content

v4.2.0

  • v4.2.0
  • f62310d
  • Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
  • Choose a tag to compare

  • v4.2.0
  • f62310d
  • Choose a tag to compare

  • Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
@thebtf thebtf tagged this 07 Feb 11:48
* feat: add cross-platform Node.js statusline for Claude Code

Node.js rewrite of ContextBricks (originally by Jeremy Dawes).
Supports Windows, Linux, macOS with zero external dependencies.

- CLI with install/uninstall/test commands (bin/cli.js)
- Statusline script with context bricks visualization (scripts/statusline.js)
- Git integration: repo, branch, commit, dirty/ahead/behind
- Session metrics: model, lines changed, duration, cost
- Official percentage fields (CC 2.1.6+) with token fallback (CC 2.0.70+)
- Configurable via CONTEXTBRICKS_SHOW_DIR and CONTEXTBRICKS_BRICKS env vars

* fix: address CodeRabbit review feedback

- Fix git status legend: use ↑/↓ arrows instead of ^/v (bin/cli.js)
- Add source script existence check before copy (bin/cli.js)
- Add try/catch for settings.json write operation (bin/cli.js)
- Unify postinstall message: contextbricks install (package.json)
- Add Math.max(1, ...) guard for CONTEXTBRICKS_BRICKS (statusline.js)

* feat: add rate limit display (Line 4) with OAuth usage API

Add real-time rate limit utilization tracking for Claude Max/Pro
subscribers. Fetches data from api.anthropic.com/api/oauth/usage
with OAuth token and 5-minute file cache.

- 5h rolling, 7d overall, 7d sonnet/opus sub-limits with reset timers
- 256-color gradient (green→yellow→red) based on utilization %
- Labels in uniform dim white, percentages in gradient color
- Configurable exact (~1d23h) or approximate (~1d) reset times
- Graceful degradation: no credentials → Line 4 simply hidden
- Token via env var (not argv), cache with 0o600 permissions
- CONTEXTBRICKS_SHOW_LIMITS=0 to hide, CONTEXTBRICKS_RESET_EXACT=0 for approx
- Version bump 4.1.0 → 4.2.0

* fix: address remaining CodeRabbit review comments

- Add seven_day_sonnet to cache validity check
- Add 10s timeout for test spawnSync
- Remove redundant "originally" in README acknowledgements

* fix: address second round of CodeRabbit review comments

- Add timeout for git version check spawnSync
- Move getPath() utility to top of file for readability
- Add seven_day_sonnet to cache validity check (already done)

* chore: configure PR review agents (coderabbit, gemini, codex)

---------

Co-authored-by: Kirill Turanskiy <kt@novamedia.ru>
Assets 2
Loading