A Noctalia v5 plugin that presents CodexBar provider usage as a compact bar widget with native usage and settings panels. Its layout follows CodexBar's macOS menu: a selectable provider strip at the top, one active provider below it, thin branded quota bars, percentage and reset labels, pace, credits, and extra-usage sections.
- Noctalia
5.0.0or newer - A working
codexbarCLI - At least one provider configured in CodexBar
The background service asks CodexBar for JSON and shares only normalized display data with the widget and panel. Last successful provider cards stay in shared plugin state and remain visible during background refreshes. Newly enabled providers appear immediately with their own loading body. For GitHub Copilot, the plugin reuses the active GitHub CLI account without displaying or persisting its token. The settings panel also lets you choose any number of enabled providers for the bar; their compact icon and short quota gauge appear consecutively, while an empty selection produces a logo-only widget.
Add the repository as a Git plugin source, enable the plugin, and then add the
CodexBar Usage widget from Noctalia's widget picker:
noctalia msg plugins source add codexbar git https://github.com/xikhar/codexbar-noctalia
noctalia msg plugins enable xikhar/codexbarUpdate the installed source with:
noctalia msg plugins update codexbarIf Noctalia cannot find codexbar, open the plugin settings and set CodexBar
executable to its absolute path. This is common when the shell is launched
from a graphical session with a smaller PATH.
Open the panel directly during development with:
noctalia msg panel-toggle xikhar/codexbar:detailsOpen its configuration panel with:
noctalia msg panel-toggle xikhar/codexbar:settingsAdd this checkout as a path source. Local .luau edits hot-reload, while
manifest changes are picked up after a Noctalia configuration reload:
noctalia msg plugins source add codexbar-dev path "$HOME/Projects/codexbar-noctalia"
noctalia msg plugins enable xikhar/codexbar
noctalia msg plugins update codexbar-devnoctalia plugins lint .The repository is shaped as a Noctalia plugin source: catalog.toml indexes
the plugin, while all distributable files live under codexbar/.
For editor completion, fetch Noctalia's current API declaration into the repository root. It is intentionally gitignored so the official plugin repo remains its single source of truth:
curl -O https://raw.githubusercontent.com/noctalia-dev/official-plugins/main/noctalia.d.luauIf this plugin is submitted to noctalia-dev/community-plugins, copy only the
codexbar/ directory. That repository generates its own catalog.toml in CI.
- Command (default) runs
codexbar usage --format json --json-onlyat the configured interval with a configurable command timeout and no provider override, so CodexBar follows its enabled-provider configuration. Provider toggles in the plugin settings panel update that configuration through the CLI. Source, status, and executable settings are forwarded as CLI arguments. - HTTP server queries the
/usageendpoint of an already runningcodexbar serveinstance. The plugin does not start or supervise that server.
The service keeps each provider's last successful result in shared plugin state. Refreshes retain those cards and the provider strip while new data is fetched; providers without cached data receive an individual loading body. Failed refreshes preserve the cached display while keeping the relevant errors visible.
codexbar/
plugin.toml Plugin manifest and settings
service.luau CodexBar adapter and shared-state publisher
widget.luau Compact bar presentation
panel.luau CodexBar-style details panel
settings.luau General and provider configuration panel
assets/ Provider icons adapted from CodexBar
translations/en.json English UI strings
The plugin is MIT licensed. The provider-card visual reference and provider
icons are adapted from CodexBar, also
under the MIT License. See
codexbar/THIRD_PARTY_NOTICES.md.