Skip to content

AndyBoWu/Burnbar

Repository files navigation

Burnbar 🔥

Track token burn across AI coding tools — in your macOS menu bar.

Burnbar is a privacy-first menu bar app that shows how many tokens your AI coding tools are burning, across all your devices, with an optional global leaderboard.

Why Burnbar

Vibe coding with Claude Code or Codex? You're burning tokens — but you can't see where, how much, or what it costs across multiple Macs.

CodexBar solves the per-machine usage problem, but reads browser cookies and Keychain to get there. Burnbar takes a different bet:

  • 🛡️ Never reads browser data. Never touches Keychain. Only local CLI logs (~/.claude, ~/.codex).
  • 🖥️ Cross-device aggregation. Sync via iCloud Drive — see total burn across all your Macs.
  • 🌐 Global leaderboard. Opt-in. Sign in with GitHub. Compare daily burn with the community.

Features

  • 🔥 Real-time token burn meter in the menu bar
  • 📊 Progress bars for 5-hour / weekly / monthly limits
  • 🖥️ Multi-device aggregation via iCloud Drive
  • 🌐 Optional GitHub-authenticated global leaderboard
  • 🛡️ Privacy-first: never touches browser secrets or Keychain

Supported Tools

Tool Status Data source
Claude Code ✅ Phase 1 ~/.claude/stats-cache.json + ~/.claude/projects/
OpenAI Codex ✅ Phase 1 ~/.codex/state_5.sqlite (threads table)

By design, Burnbar sticks to two providers: Claude Code and OpenAI Codex. We will not expand to 40+ providers — that's CodexBar's path; ours is depth + cross-device + leaderboard.

Status

🚧 Early development. Phase 1 (local Swift app) in progress. See ROADMAP.md.

Requirements

  • macOS 14+ (Sonoma)
  • Xcode 15+ (for development)

Build from source

Prerequisites: macOS 14+, Xcode 15+, and XcodeGen (brew install xcodegen) — the .xcodeproj is generated from project.yml, not committed.

git clone https://github.com/AndyBoWu/Burnbar.git
cd Burnbar
./Scripts/compile_and_run.sh   # generates the project, builds Debug, launches the menu-bar app

Look for the 🔥 flame icon in your menu bar (Burnbar runs as an LSUIElement agent — no Dock icon).

To run the tests:

xcodegen generate
xcodebuild -project Burnbar.xcodeproj -scheme Burnbar -destination 'platform=macOS' test

Launch at login

Open Settings → General and turn on "Open at Login". This is the recommended path for everyone — no Terminal required — and uses the modern macOS login-item API (SMAppService).

Power-user alternative (repo clones)

If you've cloned the repo, you can instead install a LaunchAgent from the shell:

./Scripts/install_launchagent.sh /Applications/Burnbar.app   # or omit the path if installed to /Applications

Disable it anytime:

./Scripts/install_launchagent.sh --uninstall

This only ever writes ~/Library/LaunchAgents/xyz.andybowu.Burnbar.plist (our own bundle id) — never a system-wide or third-party agent. The script is not included in the downloaded app zip, so downloaded-app users should use the in-app Open at Login setting above.

Contributing

Contributions are welcome. Install the developer tooling and the pre-commit hook before your first commit:

brew install swiftlint swiftformat gitleaks lefthook
make setup

make setup wires a pre-commit hook that runs make lint (style) and a gitleaks secret scan, blocking any commit with style violations or leaked credentials. See CONTRIBUTING.md for full setup and SECURITY.md for how to report vulnerabilities.

License

MIT © Andy Wu

About

Track token burn across Claude Code, Codex, and Ollama. Privacy-first macOS menu bar app, never reads browser secrets or Keychain.

Resources

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages