Skip to content

crearo/ai-usage-bar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI usage counter in menu bar on macOS

SwiftBar plugin for Claude/Codex usage in the macOS menu bar (top right).

Watch demo

AI Usage Bar in the macOS menu bar

Usage data is collected via ccusage.

Setup

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/swiftbar

Update ccusage regularly with:

npm install -g ccusage@latest

Configuration

Settings live in swiftbar/.usage-counter.conf (most are also editable from the menu bar dropdown):

  • MODEclaude, codex, or both
  • RANGEtoday, week, last7, month, or last30
  • RESET_HOUR — hour (0-23) the "today" range resets at
  • REFRESH_SECONDS15, 30, 60, or 300
  • CLAUDE_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.

After reboot

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.

Troubleshooting

Check ccusage:

At least one of these should work:

  • ccusage codex daily
  • ccusage claude daily

About

A menu bar item on macOS displaying your API spend

Resources

License

Stars

4 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages