AI usage limits (Claude Code, Codex, Copilot, Windsurf): check budget and time until reset.
English · Português
Website & API docs: https://chaconlucas.github.io/tokenbar/
The computer collects the numbers. Phones and watches only show what it sends over Wi-Fi, so always start there.
| Device | How | |
|---|---|---|
| Computer | Mac (macOS 15+) | curl -fsSL https://raw.githubusercontent.com/ChaconLucas/tokenbar/main/scripts/install-mac.sh | sh |
| Mac via Homebrew | brew install --cask chaconlucas/tokenbar/tokenbar | |
| Windows 10/11 | TokenBar-Windows-setup.exe from Releases. SmartScreen warns? More info → Run anyway | |
| Windows via winget | winget install ChaconLucas.TokenBar (pending Microsoft review) | |
| Linux | build from source, see Build from source | |
| Phone & watch | iPhone (iOS 17+) | on a Mac with Xcode, iPhone plugged in: curl -fsSL https://raw.githubusercontent.com/ChaconLucas/tokenbar/main/scripts/install-ios.sh | sh. Add -s -- --auto after sh and the Mac renews and updates it by itself |
| Apple Watch (watchOS 10+) | comes with the iPhone app: iPhone → Watch app → TokenBar → Install | |
| Android 8+ | TokenBar-Android.apk from Releases (allow "install unknown apps") | |
| Wear OS 3+ | TokenBar-WearOS.apk from Releases, installed with adb (steps) | |
| Extras | VS Code | search TokenBar in Extensions (Marketplace, id chaconlucas.tokenbar) |
| Raycast | from source: cd raycast && npm install && npm run dev (details) | |
| Stream Deck | TokenBar-StreamDeck.streamDeckPlugin from Releases, double-click it (details) | |
| Plugins | Claude Code: claude plugin marketplace add ChaconLucas/tokenbar && claude plugin install tokenbar@tokenbar. Codex and Gemini CLI: Plugins (MCP server, /tokenbar, warning at 80%) | |
| CLI + MCP | curl -fsSL https://raw.githubusercontent.com/ChaconLucas/tokenbar/main/scripts/install-cli.sh | sh (Node 18+). Claude Desktop: TokenBar.mcpb from Releases, double-click it. Cursor, VS Code, Windsurf, Zed, Gemini, Goose…: Install in your AI (one click, or --add-to <tool>) |
Updates: Mac, Windows and Android show an update button inside the app. The iPhone (and its watch app) updates by running install-ios.sh again, or automatically with --auto. VS Code updates through the Marketplace.
TokenBar isn't notarized by Apple yet (that needs a paid developer account), so macOS blocks the first launch when the app comes from a browser. Any of these fixes it:
xattr -dr com.apple.quarantine /Applications/TokenBar.app and open it again.The prompt "TokenBar wants to use confidential information stored in Claude Code-credentials" isn't a block: it's the login reading (VS Code panel). Choose Always Allow.
Or ask your AI. Open Claude Code, Codex or any AI with a terminal and say:
Read https://github.com/ChaconLucas/tokenbar/blob/main/INSTALL.md and install TokenBar for me.
INSTALL.md is written for the AI: it asks which devices you have, runs the commands, and only asks for your hands when needed (a permission, the phone, the watch).
Mac
Windows and Linux — the same LED device, the floating Mini, a 12-dot ring in the system tray and the getting-started guide (app in desktop/, built with Tauri).
iPhone
Apple Watch — app (TODOS / CLAUDE / CODEX, 5H / 7D, or turn the Digital Crown), watch-face complications, and a Smart Stack card (the Live Activity on watchOS 11+, plus widgets that rise when a limit is close or about to reset).
Android and Wear OS — phone in landscape with a home-screen widget, alerts and in-app updates. The Wear OS watch works with or without the phone: alone, type the 6-digit code from the computer (Mac: Ajustes → APARELHOS → WEAR OS SEM CELULAR). Complications on the watch face. Huawei without Google services: the QR scan doesn't work, paste the link instead.
AIs
gh auth token).Everything else
http://localhost:41777/v1/usage, localhost only; real port in ~/.tokenbar/api.json.tokenbar: bars in the terminal, tokenbar --prompt for the shell prompt or tmux, tokenbar get claude 5h for scripts. Works without the app too.tokenbar-mcp: Claude Code, Codex or Cursor call check_budget before a long task.~/.tokenbar/snapshot.json to read without the app, and ~/.tokenbar/providers/*.json to add any AI.curl -s http://localhost:41777/v1/usage
Schemas and examples (curl, JavaScript, Python, starship, tmux, zsh): docs/api.md.
Wi-Fi (Bonjour) WatchConnectivity / Wear OS
Computer ─────────────────────────────────────► iPhone / Android ─────────────────────► Apple Watch / Wear OS
(Mac, Windows, Linux) widgets, Lock Screen, complications
│ Claude Code: copy of the statusline (or login) Live Activity
│ Codex: ~/.codex/sessions · Windsurf · Copilot · Cursor · Gemini · Kiro · GLM · MiniMax · Kimi · OpenRouter · Droid · Amp
│ any AI: ~/.tokenbar/providers/*.json
│
└──── PUT ────► server (optional) ◄── GET ──── phones and watches, away from home
~/.tokenbar/claude-tee.sh) that saves a copy and runs the statusline you already had, unchanged (with a backup of settings.json). Codex writes its limits into ~/.codex/sessions._tokenbar._tcp) and only answers devices holding the pairing key.Host headers.sha256 of the key, never the key, and the latest snapshot.install-ios.sh, or --auto).| Symptom | What to do |
|---|---|
| Phone: "Mac não encontrado no Wi-Fi" (Mac not found) | Same Wi-Fi? iPhone: Local Network on (Settings → Privacy & Security → Local Network → TokenBar)? Computer firewall allowing TokenBar? |
| Phone: "O Mac recusou a chave" (key refused) | Scan the QR again. |
| Claude doesn't show up | Ajustes → IAS → CLAUDE CODE → CONECTAR, then send a message in Claude Code in the terminal. |
| Claude in the VS Code panel | The statusline doesn't run there. Turn on PAINEL DO VS CODE in Ajustes → IAS, or click LIGAR on the hint under the device. macOS asks once: Always Allow. |
| Codex doesn't show up | Use Codex once; the limits arrive with the first reply. |
| VS Code extension in Restricted Mode | No longer an issue: the extension runs in untrusted workspaces. |
| Watch: "integrity could not be verified" | Turn on Developer Mode on the watch (Settings → Privacy & Security). |
| Blank icon in the Dock | killall Dock. If it persists, restart the Mac. |
Mac, iPhone and Apple Watch (Xcode 26+ and brew install xcodegen):
git clone https://github.com/ChaconLucas/tokenbar.git && cd tokenbar
printf 'DEVELOPMENT_TEAM = ABCDE12345\nTB_BUNDLE_PREFIX = com.yourname\n' > Config/Signing.local.xcconfig # your Team ID; git ignores this file
xcodegen generate && open TokenBar.xcodeproj
Schemes: TokenBarMac (Mac), TokenBar (iPhone, brings the watch app), TokenBarWatch. iPhone and watch need Developer Mode; on first launch allow Local Network, then pair with the QR in Ajustes → APARELHOS.
Windows and Linux (Rust and Node 18+; Linux also sudo apt install libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev build-essential):
cd desktop && npm install && npx tauri build # installers in src-tauri/target/release/bundle/
Android and Wear OS (JDK 17 and the Android SDK):
cd android
echo "sdk.dir=$HOME/Library/Android/sdk" > local.properties
JAVA_HOME=/opt/homebrew/opt/openjdk@17 ./gradlew :app:assembleDebug :wear:assembleDebug
adb install app/build/outputs/apk/debug/app-debug.apk # phone
adb -s <watch> install wear/build/outputs/apk/debug/wear-debug.apk # watch
Without a server, phones only update on the same Wi-Fi as the computer. Deploy your own, free, on Cloudflare (Worker + D1):
cd server && npm install && cp wrangler.example.toml wrangler.toml
npx wrangler login
npx wrangler d1 create tokenbar # copy the database_id into wrangler.toml
npx wrangler d1 execute tokenbar --remote --file=schema.sql
npx wrangler deploy # prints https://tokenbar.<your-account>.workers.dev
Paste the address in Ajustes → SERVIDOR → ENDEREÇO (Windows/Linux: ⚙) and scan the QR again on the phone. The computer only sends when the number changes, or every 10 minutes.
App/macOS Mac app: collector, Wi-Fi server, notch island, Mini, settings, local API, webhooks
App/iOS iPhone app: full screen, Live Activity, guide and QR scanner
App/watchOS Apple Watch app
Shared/ model, LED display, theme, languages, Wi-Fi client, server API
Widget/ widgets, complications, Control Center and Live Activity (Mac, iPhone, Watch)
android/ Android phone (app), Wear OS (wear) and shared code (core)
desktop/ Windows and Linux app (Tauri)
vscode/ VS Code extension
raycast/ Raycast extension
streamdeck/ Stream Deck plugin
cli/ `tokenbar` CLI and `tokenbar-mcp` server
server/ optional Cloudflare Worker + D1
scripts/ installers (Mac, iPhone, CLI) and release
docs/ images, API and providers docs
MIT. See LICENSE.
TokenBar is an independent project and is not affiliated with Anthropic, OpenAI, GitHub or the makers of Windsurf. "Claude", "Claude Code", "Codex", "Copilot" and "Windsurf" are trademarks of their respective owners.
This listing does not have a supported local package template. Use the maintainer’s documentation for its hosted endpoint, authentication, and client-specific setup. No install command has been inferred.
https://github.com/ChaconLucas/tokenbar/releases/download/v0.5.3/TokenBar.mcpbotherTokenBar works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.