Releases: mryll/codexbar
Releases · mryll/codexbar
v0.3.2
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; andmake_barcan 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
Fixes
- The widget no longer exits non-zero (which makes Waybar hide the module) when the local Codex credentials contain a malformed JWT.
jwt_decodenow 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 underset -euo pipefail. Reinforces the "always exit 0 with valid Waybar JSON" guarantee.
v0.3.0
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_pctand{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
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 JWTexpclaim and theapprox_*_messagescredit counts were read raw fromjq. 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 viacountdown,calc_pacingor the token-refresh check. They are now floored injq, exactly asused_percentalready was. Not currently triggered (the API returns integers today).
v0.2.0
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_forcalls inside the tooltip block
Example
codexbar --format '{session_bar} {session_pct}% · {session_reset}'
# => ████████░░░░░░░░░░░░ 21% · 4h 33mFull changelog: v0.1.19...v0.2.0