SwiftBar plugin for Claude/Codex usage in the macOS menu bar (top right).
Usage data is collected via ccusage.
git clone https://github.com/crearo/ai-usage-bar.git
cd ai-usage-bar
brew install swiftbar
npm install -g ccusage@latest
open -a SwiftBar
# When SwiftBar asks for a plugin folder, choose:
/path/to/this/repo/swiftbarUpdate ccusage regularly with:
npm install -g ccusage@latestSettings live in swiftbar/.usage-counter.conf (most are also editable from the menu bar dropdown):
MODE—claude,codex, orbothRANGE—today,week,last7,month, orlast30RESET_HOUR— hour (0-23) the "today" range resets atREFRESH_SECONDS—15,30,60, or300CLAUDE_CONFIG_DIR— if you have more than one Claude account (work and personal, say), each one usually has its own~/.claude*folder. The menu shows a "Claude profiles" checklist and adds up usage from all of them by default — untick any you don't want counted.
To start after reboot:
System Settings -> General -> Login Items & Extensions -> Open at Login -> add SwiftBar
If the item is missing after reboot, open SwiftBar (command + space, type SwiftBar) and select the plugin folder again.
Check ccusage:
At least one of these should work:
ccusage codex dailyccusage claude daily

