steipete/CodexBar

▲ 93 stars today★ 21,462⑂ 1,936

Show usage stats for OpenAI Codex and Claude Code, without having to login.

21,462Star
1,936Fork
55Watch
204Issue
SwiftLanguage
MITLicense
Created 2025-11-16 · last push 2026-09-15 · repository size 190425 KB · default branch main

README

CodexBar 🎚️ — May your tokens never run out.

Every AI coding limit, in your menu bar.

Latest release macOS 14+ Linux desktop Homebrew AUR License: MIT Site

https://github.com/steipete/CodexBar/blob/HEAD/CodexBar — every AI coding limit in your menu bar. 69 providers.

Tiny macOS 14+ menu bar app that keeps AI coding-provider limits visible and shows when each window resets. Codex, OpenAI, Claude, Cursor, Gemini, Copilot, Grok, GroqCloud, ElevenLabs, Deepgram, z.ai, MiniMax, Kiro, Zed, Vertex AI, Augment, OpenRouter, LiteLLM, LLM Proxy, Codebuff, Command Code, ClinePass, AWS Bedrock, and many newer coding providers. One status item per provider, or Merge Icons mode with a provider switcher. No Dock icon, minimal UI, dynamic bar icons.

Also available as a Linux desktop app with usage and spending windows, separate settings, desktop notifications, and an optional tray icon. On Omarchy, a native bar widget shares the desktop app’s data and follows your theme.

https://github.com/steipete/CodexBar/blob/HEAD/CodexBar menu popover with provider tiles, usage bars, and reset countdowns

Why

Install

macOS app

Requires macOS 14+ (Sonoma). Download from GitHub Releases, or install with Homebrew:

brew install --cask codexbar

Linux desktop and Omarchy

The Qt 6 desktop app supports Wayland and X11, with an optional Omarchy widget. Published desktop archives target x86_64 and ARM64 and require glibc 2.39+, Qt 6.4+, and a separately installed CodexBar CLI. Python 3 runs the per-user installer.

Follow the Linux installation guide for Arch/Omarchy, Fedora, and Debian/Ubuntu runtime packages, verified release downloads, and upgrades. It keeps the CLI's resource bundle beside its executable and installs a launcher and optional login startup. Open Settings to choose providers, then authenticate through the provider's CLI or configure its API key. GNOME may need a tray extension; the app's windows work without a tray.

See the macOS feature comparison for supported features and remaining gaps.

CLI Tarballs (macOS/Linux)

Homebrew formula (Linux today):
brew install steipete/tap/codexbar
Arch Linux AUR package:
yay -S codexbar-cli
Or download release tarballs from GitHub Releases:

macOS first run

Set API keys from the CLI

Provider toggles and API keys live in the resolved CodexBar config file. New installs use ~/.config/codexbar/config.json; existing ~/.codexbar/config.json installs still load from the legacy path. You can script the same provider list that Settings → Providers uses:
codexbar config providers
codexbar config enable --provider grok
codexbar config disable --provider cursor

For API-key providers, store a key without opening Settings:

printf '%s' "$ELEVENLABS_API_KEY" | codexbar config set-api-key --provider elevenlabs --stdin

set-api-key trims the piped value, stores it with restrictive config-file permissions, and enables the provider by default. Use --no-enable to only save the key, or --api-key for one-off local scripts where shell history is not a concern. See CLI configuration for the full flow.

Providers

Icon & Screenshot

The menu bar icon is a tiny usage meter. Bar meaning is provider-specific, and errors/stale data can dim the icon or show an incident indicator.

Features

invalid preferences resolve to 5 minutes. Manual and fixed 1m, 2m, 5m, 15m, and 30m alternatives remain available.

Privacy note

Wondering if CodexBar scans your disk? It doesn’t crawl your filesystem; it reads a small set of known locations (browser cookies/local storage, provider config files, local JSONL logs) when the related features are enabled. Plain Adaptive refresh never inspects local agent activity. The separate Adaptive (agent-aware) option asks before inspecting the running-process list (including command lines) to identify Codex/Claude and reading bounded known-session metadata. Declining returns to plain Adaptive. When allowed with Agent Sessions hidden, CodexBar retains only the latest activity time and discards session paths and identities. Provider tokens and token-account settings live in the CodexBar config file with restrictive file permissions. See the discussion and audit notes in issue #12.

macOS permissions (why they’re needed)

Chromium cookie import needs the browser’s Safe Storage item, and an explicitly enabled Claude OAuth repair may read Claude Code’s own Keychain item. Background CodexBar paths fail or skip instead of requesting authorization; a user-initiated import or repair can still show the macOS prompt. Settings → Advanced → Disable Keychain access blocks CodexBar-owned Keychain operations and browser decryption, but cannot constrain provider-owned CLIs that CodexBar launches. Manual cookie headers, API keys, and file-backed sources remain alternatives where supported. See Keychain prompts for Allow Once vs. Always Allow, recurring grants, and safe troubleshooting.

Docs

Getting started (dev)

Build from source

Requires macOS 14+ and Swift 6.2+.
./Scripts/package_app.sh        # builds CodexBar.app in-place with ad-hoc signing
open CodexBar.app

Dev loop:

./Scripts/compile_and_run.sh
./Scripts/compile_and_run.sh --test  # also run the sharded test suite before packaging/relaunching
make check                           # SwiftFormat + SwiftLint
make docs-list                       # list docs with frontmatter summaries

CLI install:

# after installing CodexBar.app in /Applications
./bin/install-codexbar-cli.sh

Related

Looking for a Windows version?

Linux desktop integration?

Desk display

Status bar & terminal integration

Credits

Inspired by ccusage (MIT), specifically the cost usage tracking.

License

MIT • Peter Steinberger (steipete)

More Today's Trending projects

1

alibaba / open-code-review

Go★ 28,122⑂ 2,023▲ 2,751 stars
2

debpalash / VoiceStudio

Python★ 30,697⑂ 3,683▲ 2,081 stars
3

JustVugg / colibri

C★ 33,539⑂ 3,522▲ 2,035 stars
4

tt-a1i / archify

JavaScript★ 63,354⑂ 4,208▲ 1,407 stars
5

cloudflare / security-audit-skill

JavaScript★ 4,982⑂ 310▲ 1,210 stars
6

Panniantong / Agent-Reach

Python★ 81,982⑂ 7,140▲ 1,094 stars