Minimal Waybar custom module that shows Codex ChatGPT usage limits using the same credentials as the Codex CLI.
- Run
codex loginwith ChatGPT authentication once. auth.jsonstored in~/.codexor keyring (based on Codex config).
cargo build --releasePut target/release/waybar-codex-usage on your PATH (or use the absolute path in your Waybar config).
waybar-codex-usage --compact
waybar-codex-usage --format "C {pct}% ({win})"
waybar-codex-usage --use-weeklyOutput is Waybar compatible JSON with text, tooltip, class, and percentage.
{pct}active window percent{reset}active window reset ETA{win}active window label (e.g.5h,7d){p_pct}5h percent{p_reset}5h reset ETA{s_pct}7d percent{s_reset}7d reset ETA{credits}credits balance orUnlimited
--compactshort output--formatcustom text format--tooltipcustom tooltip format--use-weeklyprefer weekly window as the active display--no-creditshide credits line in tooltip--cache-ttlcache lifetime in seconds (default 60, set 0 to disable)
Add the module to your Waybar config (typically ~/.config/waybar/config.jsonc).
"custom/codex-usage": {
"exec": "/path/to/waybar-codex-usage",
"interval": 60,
"return-type": "json",
"format": "{}",
"tooltip": true
}- No formal releases are planned; build from
master. - Config is read from
~/.codex/config.toml(orCODEX_HOME). chatgpt_base_urldefaults tohttps://chatgpt.com/backend-apiwhen not set.cli_auth_credentials_storesupportsauto,file, orkeyring.