Skip to content

Releases: dennykim123/claude-codex-battery

v1.3.1 — Update on demand

Choose a tag to compare

@dennykim123 dennykim123 released this 09 Jul 14:28

Highlights

  • ⬆️ Update now — always-visible dropdown row that replaces the plugin with the latest main on demand (previous copy kept as .bak). No more waiting for the daily check.
  • Footer link now shows the repo URL.

v1.3.0 — Big/small size presets

Choose a tag to compare

@dennykim123 dennykim123 released this 09 Jul 14:21

Highlights

  • Two size presets, one-click toggle — new ↕ battery size row in the dropdown:
    • big (default): the original 4×6 pixel font and geometry, with the '1'-kerning fix so 100% never touches the capsule border
    • small: classic 3×5 pixel font, ~25% narrower (108×9pt) — for crowded or notched menu bars
  • Choice persists in ~/.claude/swiftbar/.batt-size.

Existing installs: click the 🆕 update row in the dropdown, or git pull && ./install.sh.

v1.2.2 — Slimmer bar for notched menu bars

Choose a tag to compare

@dennykim123 dennykim123 released this 09 Jul 14:05

Highlights

  • ~16% narrower: capsule 18→16px, tighter gaps — kinder to crowded/notched menu bars.
  • Kerned the '1' glyph so 100% no longer touches the capsule border.
  • Canvas height 12→10px — flush fit around the capsule.

Existing installs: click the 🆕 update row in the dropdown, or git pull && ./install.sh.

v1.2.1 — Dropdown footer

Choose a tag to compare

@dennykim123 dennykim123 released this 09 Jul 14:04

Highlights

  • Dropdown footer with author/GitHub link and a one-click ✕ disable widget row (re-enable in SwiftBar → Plugins).

v1.2.0 — Live Claude usage, no cache file required

Choose a tag to compare

@dennykim123 dennykim123 released this 09 Jul 14:04

Highlights

  • Claude limits now come straight from Anthropic's usage API, authenticated with your local Claude Code Keychain login — no external cache-writer required. Works out of the box for anyone logged in to Claude Code.
  • Fallback chain when offline/logged out: last good response → legacy cache files, labeled in amber with measurement age.
  • Account-level numbers: usage from every device and surface is included.
  • Opt out of Keychain/network entirely with touch ~/.claude/swiftbar/.no-live.
  • Honest README privacy section: what is read, where it is sent, nothing else.

v1.1.1

Choose a tag to compare

@dennykim123 dennykim123 released this 08 Jul 23:02

🎨 Real macOS battery colors

  • Battery fill now uses the actual macOS battery indicator colors — Apple HIG system green / yellow / red, with light & dark variants.
  • Numbers stay legible on any fill: dark over the bright fill, light over the empty background (per-pixel contrast).

Already installed? Click 🆕 in the dropdown to update.

v1.1.0

Choose a tag to compare

@dennykim123 dennykim123 released this 08 Jul 22:48

v1.1.0

✨ New

  • One-click self-update — the widget checks GitHub for a newer version once a day; when one exists, a green 🆕 update row appears in the dropdown. Click to update in place (your previous copy is kept as .bak). It's the only network call the widget makes, and you can disable it.
  • Use just one of them? No problem — Claude-only and Codex-only setups now show only the service you actually use. No more empty capsule for the side you don't have.

💅 Polish

  • Zero required dependencies — `ccusage` is now optional (no longer auto-installed); the battery works fully without it. Limits come straight from local files.
  • Smaller battery — 4×6 pixel font with deeper fill colors for stronger contrast.
  • Version footer in the dropdown.

🔧 Fixes

  • The update script deploys as a dotfile (`.ccb-update.sh`) so SwiftBar doesn't mistake it for a plugin.

Install / Update

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.