Skip to content

Releases: mryll/codexbar

v0.3.2

29 May 21:45

Choose a tag to compare

Fixes

  • Hardened against extreme/malformed numeric values in the usage payload and local credentials. Scientific-notation (e.g. 1e100) and negative numbers no longer crash the widget — they clamp to a safe range; a corrupt or multi-document cache is rejected up front; and make_bar can no longer produce a negative-width bar. The additional model-specific meters now use the identical clamped values for both severity and rendering, so a meter can never color the bar without being shown (or vice-versa). The widget always exits 0 with valid Waybar JSON for any input.

v0.3.1

29 May 20:36

Choose a tag to compare

Fixes

  • The widget no longer exits non-zero (which makes Waybar hide the module) when the local Codex credentials contain a malformed JWT. jwt_decode now always yields a valid JSON object, so token-expiry (exp) and plan-type parsing degrade gracefully — a bad token simply triggers a normal refresh and the plan falls back — instead of crashing under set -euo pipefail. Reinforces the "always exit 0 with valid Waybar JSON" guarantee.

v0.3.0

29 May 20:19

Choose a tag to compare

Features

  • --remaining: show usage as "what's left" — the bar text and rich tooltip flip to remaining mode (battery-style draining bars plus a remaining-time marker). Opt-in; severity coloring is unchanged.
  • New format placeholders: {session,weekly,review}_remaining_pct and {session,weekly,review}_remaining_bar.
  • Additional Codex model-specific rate-limit meters (additional_rate_limits) are now shown in the tooltip and counted toward the severity class.
  • Nicer plan labels: "Pro Lite", "Business Usage Based", "Enterprise Usage Based".

Robustness

  • Number-safe jq parsing: malformed or partial usage payloads no longer crash the widget — it always exits 0 with valid Waybar JSON.

Compatibility

  • Fully backward compatible — without --remaining, output is byte-identical to v0.2.1.

v0.2.1

18 May 14:54

Choose a tag to compare

Hardening release — prevents a float-typed value from the API from crashing the widget, the same bug class fixed in claudebar v0.2.2.

Fixed

  • reset_at, the JWT exp claim and the approx_*_messages credit counts were read raw from jq. jq ≥ 1.7 preserves a float literal (e.g. 13.0), and bash (( )) arithmetic rejects a decimal point in every locale — a float-typed value would have aborted the widget via countdown, calc_pacing or the token-refresh check. They are now floored in jq, exactly as used_percent already was. Not currently triggered (the API returns integers today).

v0.2.0

11 May 20:52

Choose a tag to compare

Adds the {*_bar} placeholder family — Pango-colored progress bars usable in
--format and --tooltip-format for session, weekly, and code review usage
windows. Drop-in compatible with existing v0.1.x configurations.

Added

  • {session_bar}, {weekly_bar}, {review_bar} placeholders

Changed

  • Per-window colors and bars computed once at top level; dedicated tip_*_bar
    variants for the marker-decorated tooltip path
  • Removed duplicate color_for calls inside the tooltip block

Example

codexbar --format '{session_bar} {session_pct}% · {session_reset}'
# => ████████░░░░░░░░░░░░ 21% · 4h 33m

Full changelog: v0.1.19...v0.2.0