Claude Code 계정을 핫스왑하는 macOS 메뉴 표시줄 앱

hackernews | | 📦 오픈소스
#anthropic #claude #claude code #macos #계정전환 #멀티계정 #메뉴표시줄
원문 출처: hackernews · Genesis Park에서 요약 및 분석

요약

다중 Claude Code 계정 사용자가 터미널에서 로그아웃 및 로그인을 반복하는 불편함 없이, macOS 메뉴 바에서 클릭 한 번으로 계정을 즉시 전환할 수 있는 'Claude Account Switcher' 앱이 공개되었습니다. 이 앱은 사용자의 인증 정보를 macOS 키체인에 안전하게 저장하며, 계정 전환 시 OAuth 토큰과 CLI 설정 파일을 자동으로 교체하여 작업 흐름을 유지합니다. 또한 메뉴 바를 통해 각 계정의 실시간 사용량을 직관적으로 확인할 수 있어, 요금 한도에 따른 계정 관리가 훨씬 간편해집니다.

본문

A lightweight macOS menu bar app that lets you switch between multiple Claude Code accounts instantly — and see your usage for each one. If you have multiple Claude Code subscriptions (personal, work, etc.), switching between them means running claude auth logout + claude auth login every time — opening a browser, logging in, waiting. When you hit your rate limit on one account and want to continue working on another, this friction kills your flow. Claude Account Switcher saves your credentials securely in the macOS Keychain and lets you switch accounts with a single click. No logout, no login, no browser. Instant. - One-click account switching — no logout/login, no browser - Live usage display — shows 5-hour and 7-day utilization for each account directly in the menu - Secure credential storage — credentials stored in macOS Keychain, never on disk - Auto-import — detects your current Claude Code account on first launch - Full session switching — swaps both OAuth tokens and Claude CLI state ( ~/.claude.json ), soclaude auth status always reflects the active account Claude Code stores its authentication in two places: - macOS Keychain — OAuth tokens (access + refresh) under the service Claude Code-credentials ~/.claude.json — account metadata (email, org, subscription type) in theoauthAccount field When you add an account, the app: - Backs up the current credentials to a separate Keychain entry ( claude-switcher:{email} ) - Saves the oauthAccount metadata from~/.claude.json into its config - Runs claude auth logout +claude auth login for the new account - Imports the new account's credentials and metadata When you switch accounts, the app: - Saves the current account's Keychain credentials and oauthAccount state - Restores the target account's OAuth token into Claude Code-credentials - Restores the target account's oauthAccount into~/.claude.json - All Claude Code sessions immediately use the new account Usage data (5h/7d rate limits) is fetched via Anthropic's OAuth API using each account's stored token. ┌─────────────────────────────────────────────────────────┐ │ macOS Keychain │ │ │ │ "Claude Code-credentials" ← active account token │ │ "claude-switcher:user1@…" ← backup token account 1 │ │ "claude-switcher:user2@…" ← backup token account 2 │ └─────────────────────────────────────────────────────────┘ ┌─────────────────────────────────────────────────────────┐ │ ~/.claude.json │ │ │ │ oauthAccount: { emailAddress, orgId, ... } │ │ ↑ swapped on each account switch │ └─────────────────────────────────────────────────────────┘ ┌─────────────────────────────────────────────────────────┐ │ ~/.config/claude-switcher/accounts.json (mode 0600) │ │ │ │ Per account: email, subscription_type, org_name, │ │ keychain_account, oauth_account (cached metadata) │ └─────────────────────────────────────────────────────────┘ brew install --cask Symbioose/tap/claude-switcher Then launch it from Spotlight or /Applications/Claude Switcher.app . - Go to Releases - Download Claude-Switcher.zip - Unzip and drag Claude Switcher.app to /Applications - Launch it — the icon appears in your menu bar Note: On first launch, macOS may block the app because it's not signed. Go to System Settings → Privacy & Security and click Open Anyway. A menu bar icon appears. From there: - See your accounts — each account shows email, subscription type, and live usage (5h / 7j) - Switch accounts — click any account to activate it instantly - Refresh usage — click "Rafraîchir usage" to update usage data - Add an account — triggers claude auth login to authenticate a new account - Remove an account — removes saved credentials from the Keychain On first launch, the app automatically imports your currently logged-in Claude Code account. After switching, you can confirm in any terminal: claude auth status # Should show the newly activated account's email - Credentials are stored exclusively in the macOS Keychain — never written to disk files - Config file ( ~/.config/claude-switcher/accounts.json ) stores only account metadata (email, org name, subscription type, cachedoauthAccount state) with0600 permissions - Config directory has 0700 permissions - Email validation prevents Keychain service name injection - No shell=True in any subprocess call — no command injection possible - OAuth tokens pass through security CLI arguments (briefps visibility, inherent to macOSsecurity tool) - macOS 12+ - Claude Code installed and accessible via claude CLI git clone https://github.com/emilejouannet/claude-account-switcher.git cd claude-account-switcher python3 -m venv .venv && source .venv/bin/activate pip install -e . && pip install py2app pytest Run directly: claude-switcher Build the standalone .app : bash build_app.sh # Output: dist/Claude Switcher.app Run tests: pytest tests/ -v MIT

Genesis Park 편집팀이 AI를 활용하여 작성한 분석입니다. 원문은 출처 링크를 통해 확인할 수 있습니다.

공유

관련 저널 읽기

전체 보기 →