Skip to content

v1.0.0 β€” First release

Choose a tag to compare

@dennykim123 dennykim123 released this 08 Jul 13:54

πŸ”‹ Claude & Codex Usage Battery β€” v1.0.0

First public release. A macOS menu bar widget that shows your remaining Claude Code and Codex usage limits as battery icons β€” so you never have to open /usage again.

Menu bar battery widget

C = Claude Β· X = Codex. Each battery shows the remaining % of a limit window β€” full & green means plenty left, red means almost out. Click it for a detailed breakdown with reset times.

✨ Features

  • Claude β€” 5-hour session Β· weekly Β· Fable (top-model weekly cap), read live from `usage-cache.json`
  • Codex β€” 5-hour Β· weekly (or credit balance on the premium plan)
  • Remaining-% with traffic-light colors (green β‰₯ 50%, amber < 50%, red < 20%)
  • Click-through dropdown: per-limit gauges, reset times, today's cost/tokens by model
  • Battery PNGs hand-encoded in pure JavaScript (`node:zlib` only) β€” no image library
  • Zero dependencies, no network calls, no secrets β€” reads only local usage files
  • Refreshes every 2 minutes at zero token cost (local reads only)
  • Optional throttled background refresh for Codex when exhausted

πŸ“¦ Requirements

macOS Β· SwiftBar Β· bun Β· Claude Code (Codex optional). `ccusage` is auto-installed.

πŸš€ Install

```bash
git clone https://github.com/dennykim123/claude-codex-battery.git
cd claude-codex-battery && ./install.sh
```

Full details in the README. MIT licensed β€” feedback and PRs welcome.