claudeers.
// Developer Tools

swapbar

macOS menu bar app for claude-swap: see every Claude account's 5h, 7d and Fable quota at a glance, switch with one click, and track token costs.

Actively maintained
100/100
last commit 26 days ago
last release 26 days ago
releases 6
open issues 0

Install with your AI

Paste into Claude Code, Cursor, or any agent — it reads the repo and wires the tool into your project.

Install and set up swapbar (release-binary project) into my current project.
Found on https://claudeers.com/swapbar
Repo: https://github.com/afatmustafa/swapbar
Homepage/docs: https://swapbar.afat.me
Detected install method: release-binary → inspect the README
Category: devtools. Platforms: api, web.
Read the repo's README for exact setup and env vars, then install it and wire it into my project.

Claudeers Health Verdict:
active; community-verified: false. Confirm the source before running anything.
// or install directly (release-binary)

Grab the latest release asset from GitHub.

# download a build from https://github.com/afatmustafa/swapbar/releases
// or clone
git clone https://github.com/afatmustafa/swapbar

// compatibility

Platformsapi, web
Operating systems—
AI compatibilityclaude
License—
Pricingopen-source
LanguageRust

Get your FREE $2.50 API credits to access TickAtlas financial data ↗

Swapbar: the menu bar popover in light and dark mode, showing four Claude accounts with plan badges, 5h and Fable quotas, and token cost

Every Claude account's quota in view, one click to switch.
A macOS menu bar app for claude-swap (cswap).

Download · Website · English | Türkçe

Swapbar popover in light and dark mode: four accounts with 5h, 7d and Fable quota bars, and a token and cost table

Swapbar shows the 5h, 7d and per-model (Fable) quotas of every cswap account at a glance, switches accounts with one click, and summarizes token usage and cost from Claude Code transcripts.

Features

  • Setup assistant. On first run Swapbar checks for Claude Code and claude-swap, installs claude-swap if it's missing (with uv, installing uv too if needed), and adds your accounts one by one: each signs in through claude auth login in the browser, cswap saves the login, and Claude Code switches back to the account it was using.
  • All accounts, one glance. Each account shows its plan (Max 20x, Max 5x, Pro, Team Premium/Standard) and gets 5h, 7d and per-model (Fable) bars with time to reset. A bar turns red at the low-quota level (15% left by default) and yellow 25 points above it.
  • One-click switching. Click an inactive account to run cswap switch. The active account is marked current, and accounts left out of auto-rotation show as paused.
  • Pace warnings. A marker on a bar shows where an even pace would be when an account is using a window too fast, and the row says when the window would run out if that comes before its reset. A notification warns about the current account once per window.
  • Switch suggestion. When the current account's tightest window drops to the low-quota level (15% left by default), a banner names the account with the most room and switches to it in one click. That account is also marked suggested in the list.
  • Notifications. A notification when the current account runs low, with a Switch button for the best other account, another when a depleted account's quota resets, and a warning 3 days before an account's saved login expires (claude-swap 0.27+), with Sign in again on its row.
  • Why usage is missing. When cswap can't fetch an account's usage, the row says why and when it tries again: "couldn't fetch usage: rate limited · retrying at 14:32" (claude-swap 0.27+).
  • Global shortcuts. ⌃⌥S opens Swapbar from any app; ⌃⌥⇧S switches to the account with the most quota left. No Accessibility permission needed.
  • Update check. Swapbar checks GitHub for a new release at launch and every 6 hours and shows a Download banner when one is out. It checks PyPI for a new claude-swap too, and Update runs cswap upgrade.
  • Quota in the menu bar. The Swapbar icon is followed by the active account's quota, as 5h or 5h · 7d, shown as remaining or used.
  • Token and cost summary. Today and 30-day totals for cost, tokens, requests, output and cache reads, cost per account (worked out from cswap's switch log, cswap run sessions and each profile's login) and per model, and a bar splitting input, cache read, cache write and output.
  • English and Turkish. Follows the macOS language, or pick one in Settings › General.
  • Light and dark. Follows the macOS appearance, or set it to Light or Dark in Settings.
  • Small and native. Rust and gpui (Zed's UI framework), a universal binary for Apple Silicon and Intel, about 4 MB.

Settings

Open Settings… from the popover. Preferences are stored in ~/.config/swapbar/settings.json.

General settings in dark modeMenu Bar settings
General: theme (System / Light / Dark), language (System / English / Türkçe), launch at login (LaunchAgent), refresh intervals, show or hide the usage section.Menu Bar: percentage mode (remaining / used), title next to the icon (icon only / 5h / 5h · 7d), 7-day window, per-model limits, reset times.
Accounts settingsAuto-switch settings
Accounts: add an account, rename (cswap alias), reorder (cswap swap), sign a broken login in again, remove; show or hide each account in the menu, include it in auto-rotation (cswap enable/disable).Auto-switch: cswap's autoswitch.* settings (cswap config set), reset to defaults. These only take effect while cswap auto is running.

Installation

Homebrew

brew install --cask afatmustafa/tap/swapbar

The cask installs Swapbar into Applications; brew upgrade --cask swapbar updates it. On first launch the setup assistant installs claude-swap if needed and adds your accounts.

Download

  1. Download Swapbar.dmg from the latest release and drag Swapbar to Applications.
  2. Open Swapbar. Its icon appears in the menu bar, and the setup assistant opens if claude-swap or your accounts are missing. It needs Claude Code to sign in to accounts.

Swapbar looks for cswap at ~/.local/bin/cswap, /opt/homebrew/bin/cswap and /usr/local/bin/cswap. Set CSWAP_BIN to use another path (CLAUDE_BIN and UV_BIN work the same way for claude and uv).

Releases from 0.1.1 on are signed with a Developer ID and notarized by Apple, so Swapbar opens with a double-click. Version 0.1.0 is not: macOS blocks its first launch, and you allow it with Open Anyway under System Settings → Privacy & Security.

To launch at login, turn on Launch at login in Settings.

Build from source

./scripts/bundle.sh                    # release build, produces target/Swapbar.app
./scripts/bundle.sh --universal        # arm64 + x86_64
./scripts/dmg.sh                       # target/Swapbar.dmg from the bundle
cp -R target/Swapbar.app /Applications/

Requirements:

  • Rust toolchain
  • Xcode. gpui is built with the runtime_shaders feature, so the Metal toolchain is not needed.

How it works

DataSource
Accounts, 5h/7d/Fable quotascswap list --json, every 60 seconds. cswap calls the Anthropic usage API itself. That endpoint allows roughly 30 requests per hour per account, so cswap manages the polling cadence.
Account switchingcswap switch <n> --json
Tokens and cost~/.claude/projects/**/*.jsonl, plus CLAUDE_CONFIG_DIR, ~/.claude-* profiles and cswap session directories. Entries are deduplicated by message.id:requestId and rescanned incrementally every 2 minutes.
PricesBuilt-in table with a models.dev overlay (cached for 24 hours). 1h cache write = 2× input, 5m cache write = 1.25× input.

Caches live in ~/.config/swapbar/ (usage-cache.json, model-rates.json).

Cost figures are estimates at API list prices, not your subscription bill.

Swapbar does not talk to Anthropic directly. Quotas come from cswap, and usage is read from transcripts on your Mac.

Development

cargo run                                          # click the Swapbar icon in the menu bar
SWAPBAR_OPEN=1 cargo run                           # open the popover on launch
SWAPBAR_SETTINGS=1 SWAPBAR_PAGE=about cargo run    # open settings on a given page
SWAPBAR_DEBUG=1 cargo run                          # geometry and scan logs
cargo run -- --scan                                # headless: print the token and cost summary
./scripts/icon.sh                                  # rebuild assets/AppIcon.icns from AppIcon.svg

SWAPBAR_PAGE accepts menubar, accounts, auto and about; anything else opens General.

The popover and settings screenshots use demo accounts and generated transcripts. Usage and quota figures in the header image are illustrative.

Files

  • src/main.rs: app state, timers, window open/close, menu bar title
  • src/statusbar.rs: NSStatusItem (cocoa), click callback, screen geometry
  • src/cswap.rs: bridge to cswap (list, switch, add, remove, alias, swap)
  • src/setup.rs: finding claude/cswap/uv/brew, installing claude-swap, claude auth login
  • src/onboarding.rs: setup assistant window
  • src/i18n.rs: English/Turkish strings (l(), lf!) and cswap time strings in Turkish
  • src/dialog.rs: native NSAlert confirmations and text prompts
  • src/advice.rs: switch suggestion, pace, notification events
  • src/usage.rs: JSONL scanner, cache, period summaries
  • src/pricing.rs: model prices
  • src/assets.rs: embedded SVG icons (AssetSource)
  • src/theme.rs: light/dark appearance
  • src/ui.rs: popover UI
  • src/settings.rs: preferences model, LaunchAgent
  • src/settings_ui.rs: settings window and About page

Website

The landing page lives in its own repository, swapbar-website.

Credits

Icons are Hugeicons stroke-rounded (MIT, in assets/icons/). Account data and switching come from claude-swap.

Made by Mustafa Afat.

// faq

What is swapbar?

macOS menu bar app for claude-swap: see every Claude account's 5h, 7d and Fable quota at a glance, switch with one click, and track token costs.. It is open-source on GitHub.

Is swapbar free to use?

swapbar is open-source, so it is free to use.

What category does swapbar belong to?

swapbar is listed under devtools in the Claudeers registry of Claude-compatible tools.

11 views
★ 19 stars
unclaimed
updated about 1 month ago

// embed badge

swapbar on Claudeers
[![Claudeers](https://claudeers.com/api/badge/swapbar.svg)](https://claudeers.com/swapbar)

// retro hit counter

swapbar hit counter
[![Hits](https://claudeers.com/api/counter/swapbar.svg)](https://claudeers.com/swapbar)

// reviews

// guestbook

0/500

// related in Developer Tools

🔓

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Curs…

// devtoolsaffaan-m/⟨JavaScript⟩★ 307,864◷ MIT[ claude ]
🔓

Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.

// devtoolsDietrichGebert/⟨JavaScript⟩★ 187,728◷ MIT[ claude ]
🔓

AI coding assistant skill (Claude Code, Codex, OpenCode, Cursor, Gemini CLI, and more). Turn any folder of code, SQL schemas, R scripts, shell scripts, docs,…

// devtoolssafishamsi/⟨Python⟩★ 147,800◷ MIT[ claude ]
🔓

Use Garry Tan's exact Claude Code setup: 23 opinionated tools that serve as CEO, Designer, Eng Manager, Release Manager, Doc Engineer, and QA

// devtoolsgarrytan/⟨TypeScript⟩★ 140,465◷ MIT[ claude ]
→ see how swapbar connects across the ecosystem