CCAS, short for Claude Code Account Switcher, is a native macOS menu bar app for switching between multiple Claude Code accounts.
It keeps a small icon in the menu bar. Click the icon, add the Claude Code account that is currently signed in, then select any saved account to switch Claude Code to that identity.
CCAS is not affiliated with Anthropic or Claude.
- Native macOS menu bar app.
- Add the currently signed-in Claude Code account.
- List saved Claude Code accounts with email, organization name, and plan type.
- Show account usage so you can choose the right account before switching:
- Pro and Max accounts show 5-hour and weekly usage bars with reset times.
- Team and Enterprise accounts show credit usage, total limit, usage ratio, and reset time.
- Reuse the last fetched usage data immediately when opening the menu, then refresh it in the background.
- Switch accounts from the menu bar.
- Bilingual UI: English by default, Simplified Chinese when the system language starts with
zh. - Stores account metadata under
~/.ccas. - Stores credentials locally with macOS Keychain.
- Includes an Xcode project, Swift Package manifest, and a standalone build script.
- macOS 14 or later.
- Xcode with Swift 6 support.
- Claude Code installed and signed in at least once.
Open the project:
open CCAS.xcodeprojSelect the CCAS scheme and run it on My Mac.
For stable Keychain permissions while developing, set a Team in Signing & Capabilities. macOS may treat ad-hoc signed debug builds as different apps after rebuilds, which can make Keychain permission prompts appear again.
Build a standalone app bundle:
./scripts/build_app.shRun it:
open dist/CCAS.appThe script reads MARKETING_VERSION, CURRENT_PROJECT_VERSION, and PRODUCT_BUNDLE_IDENTIFIER from the Xcode project, then writes the expanded values into the generated app bundle.
- Sign in to Claude Code with the first account.
- Open CCAS from the menu bar.
- Click
Add Account. - Sign in to Claude Code with another account.
- Click
Add Accountagain.
If the same email and organization are detected again, CCAS updates the existing backup instead of creating a duplicate account.
Open the CCAS menu bar panel and click the account you want to use.
After switching, restart Claude Code so it reloads the updated credentials and config.
Open the CCAS menu bar panel to see saved account usage at a glance. CCAS shows cached usage first to keep the menu height stable, then fetches fresh usage data in the background and updates the panel when it arrives.
The refresh button shows a loading indicator while usage is being fetched. The text between Add Account and the refresh button shows when usage data was last updated, such as 12 s or 4 m.
Claude Code stores its signed-in state in two places:
- A config file, usually
~/.claude.jsonor~/.claude/.claude.json. - A macOS Keychain item whose service is
Claude Code-credentials.
CCAS saves one backup per account:
- Account index:
~/.ccas/sequence.json - Config snapshots:
~/.ccas/configs/ - Last fetched usage snapshot:
~/.ccas/quota-cache.json - Managed account credentials: macOS Keychain service
li.luy.ccas.accounts
When switching accounts, CCAS:
- Backs up the current account config.
- Reads the target account credentials from CCAS's Keychain service.
- Writes those credentials into Claude Code's
Claude Code-credentialsKeychain item. - Replaces the
oauthAccountsection in the Claude Code config file. - Updates
~/.ccas/sequence.json.
The files in ~/.ccas/configs/ are config snapshots. They are not enough to restore an account by themselves because OAuth credentials live in Keychain.
When the menu opens, CCAS reads ~/.ccas/quota-cache.json first so usage rows can be displayed immediately. It then uses the saved Claude OAuth credentials for each account to request current usage data and updates the cache after a successful refresh.
CCAS is designed as a local-first utility.
- It does not upload credentials.
- It does not include telemetry.
- It stores account metadata and config snapshots under
~/.ccas. - It stores cached usage data under
~/.ccas/quota-cache.json. - It stores account credentials in macOS Keychain under
li.luy.ccas.accounts. - It updates Claude Code's active Keychain item,
Claude Code-credentials, when switching accounts. - It makes direct authenticated requests to Anthropic's usage endpoint only to refresh account usage information.
Because CCAS reads and writes Keychain items, macOS may ask for permission. If you trust the build and want to avoid repeated prompts, choose Always Allow.
Use a stable code signing identity in Xcode:
- Open
CCAS.xcodeproj. - Select the
CCAStarget. - Open
Signing & Capabilities. - Select your Team.
- Rebuild and run.
- Choose
Always Allowwhen macOS asks for Keychain access.
If CCAS says an account is missing saved credentials, the config snapshot exists but the Keychain backup for that account does not.
To repair it:
- Sign in to that account in Claude Code.
- Open CCAS.
- Click
Add Account.
CCAS will update the existing account backup.
Restart Claude Code after switching accounts. Claude Code may keep credentials in memory while it is running.
CCAS.xcodeproj/ Xcode project
Package.swift Swift Package manifest
Sources/CCASApp/ App source code
Sources/CCASApp/Info.plist App Info.plist template
Sources/CCASApp/Resources/ App and menu bar icons
scripts/build_app.sh Standalone app build script
- Use Xcode
General > VersionforMARKETING_VERSION. - Use Xcode
General > BuildforCURRENT_PROJECT_VERSION. Info.plistreferences those build settings, so Xcode archives expand them automatically.- The build script also reads those values from the Xcode project before packaging
dist/CCAS.app.
MIT
