One bar icon and one panel that show the usage, limits, credits, and resets for every AI provider CodexBar tracks — Codex, Claude, OpenCode Go, Gemini, Copilot, Grok, OpenRouter, and more — in the same Omarchy surface as the native Model Usage widget.
The widget is a thin wrapper around CodexBar.
All provider logic — authentication, cookies, workspace lookup, quota parsing,
and refresh — is delegated to the codexbar CLI. The plugin runs
codexbar usage and codexbar cost directly via Process (no codexbar serve
daemon), normalizes the payloads, and renders a panel in the native
Model Usage style. It never reads provider databases or guesses usage itself.
codexbaronPATH(Arch:yay -S codexbar-cli)- Each provider you want to track must be configured in CodexBar itself. How that is done depends on the provider, so follow the CodexBar configuration docs.
Setup › Plugins › Add, paste this repo's URL, then Enable (it lands in
the right section):
omarchy plugin add https://github.com/felixzsh/omarchy-codexbar.git --enableThe panel mirrors the native Model Usage widget's layout:
- Hero per provider — brand mark, plan, source, and a dropdown selector on the right to switch between every provider that reports usable data.
- Limits — the provider's windows (5-Hour, Weekly, Monthly) as meters with the percentage used and a "resets in X" countdown. When CodexBar reports a pace forecast, each row also shows how far the window is expected to be used at the current burn rate and whether it lasts until reset.
- Credits — balance when the provider exposes one. CodexBar 0.53 reports
spend as
usage.providerCost; a positive limit becomes a credit balance. - Tokens by day — only when CodexBar reports a daily token history. That
history comes from
codexbar cost(local Codex/Claude logs); providers without it simply hide the section. There is no per-model token split in CodexBar, so that chart is not shown.
Percentages, reset times, and token counts are CodexBar's, never recomputed. Providers with no usable data are excluded from the panel and the selector.
- Bar icon: left = panel, right = refresh.
- Panel:
j/kscroll,ror Enter refresh, Tab moves to the neighboring bar panel, Esc closes. - IPC:
omarchy shell local.codexbar <open|close|toggle|refresh|status>.statusreturns a JSON snapshot of the server, the widget state, and every valid provider — the first thing to check when the widget does not show up.
Settings live in the widget's entry in ~/.config/omarchy/shell.json:
omarchy bar set local.codexbar codexbarBin /usr/bin/codexbar --json| Key | Default | What it does |
|---|---|---|
codexbarBin |
codexbar |
Command name or path to the codexbar CLI |
refreshIntervalSec |
120 |
Background poll interval for usage (opens the panel to force a fetch) |
devMock |
false |
Dev only. Appends one curated mock provider that exercises every renderable field (limits, pace, credits, daily tokens), so a maintainer can preview the full UI without real provider access. Off by default; end users never see it. |
Note:
omarchy bar setstores keys that are not in the manifest schema as raw strings, sodevMockis read accepting bothtrueand"true".
omarchy shell local.codexbar status # binary, version, widget + providers at a glanceusageStatusTextsaysfailed to run (exit N)— thecodexbarbinary was not found or crashed. Checkcodexbar --versionand thecodexbarBinsetting.usageStatusTextsaysno parseable usage— runcodexbar usage --format jsonmanually to see the error.- No providers — no enabled CodexBar provider returned usable data. Enable one
in CodexBar and check
codexbar usage --format json. - The widget is always visible once placed; opening the panel explains any failure instead of hiding the icon.
- The daily token chart stays empty when
codexbar costcrashes: CodexBar 0.53's cost scan segfaults on some machines (SIGSEGV, exit 139). The widget detects the crash and backs off with a doubling cooldown (10m up to 2h) so panel opens stop spawning the crashing scan;statusreportscostCrashed/costBackoffSec. This is an upstream CLI bug — report it at https://github.com/steipete/CodexBar/issues.
The shell caches compiled plugin QML, so after updating the plugin code the widget can keep running the old version until the shell restarts:
omarchy restart shellThe widget coexists with the native Model Usage widget; they have independent plugin ids and IPC targets.