Skip to content

ZingerLittleBee/cc-subscription-switch

Repository files navigation

CCSS - Claude Code Subscription Switch

Language: 🇺🇸 English | 🇨🇳 简体中文

A TUI tool for managing and switching between multiple Claude Code subscriptions on a single machine.

Install

# npm
npm install -g cc-subscription-switch

# bun
bun install -g cc-subscription-switch

Or run directly without installing:

npx cc-subscription-switch
# or
bunx cc-subscription-switch

Quick start

ccss

That's it — an interactive TUI guides you through account selection and launches Claude.

Interactive account selector

Advanced usage

Pass arguments to Claude

ccss -p "help me"
ccss --model sonnet
ccss --dangerously-skip-permissions

Account management

ccss add <name>       # Add a new account
ccss remove <name>    # Remove an account
ccss list             # List all accounts (with usage bars)
ccss whoami           # Show current account (with usage bars)
ccss config           # Show config directory path
ccss sync <name>      # Sync settings for an account

Usage metrics

Usage metrics

ccss usage            # Show usage for current account
ccss usage --all      # Show usage for all accounts

Displays 5-hour and 7-day utilization as color-coded progress bars (green → yellow → red), plus extra credits if enabled. Data is cached for 5 minutes. Requires macOS (reads OAuth credentials from Keychain or .credentials.json).

How it works

Each account's Claude configuration is stored in an isolated directory under ~/.cc-subscription-switch/accounts/<name>/. When you select an account, CCSS launches Claude with CLAUDE_CONFIG_DIR pointing to that account's directory.

Adding an account

  1. Run ccss add <name>
  2. Enter an optional description
  3. Configure settings (optional):
    • Apply common settings from ~/.cc-subscription-switch/settings.json
    • Sync from global settings ~/.claude/settings.json (excludes account-specific fields and env)
    • Edit settings manually
  4. Sync skills directory (optional, if ~/.claude/skills/ exists):
    • Symlink (recommended) — shares the same directory, changes are reflected in all accounts
    • Copy — creates an independent copy
    • Skip
  5. Claude opens for first-time login (onboarding)
  6. Complete the login, then type /exit in Claude to return
  7. Account is added after successful login

Settings sync

CCSS supports syncing settings between accounts:

  • Common settings: Shared settings stored at ~/.cc-subscription-switch/settings.json
  • Global settings: Your main Claude settings at ~/.claude/settings.json

When syncing from global settings, account-specific fields are excluded:

  • accountId, userId, email, oauthAccount, primaryOrganization, env

Use ccss sync <name> to configure settings for an existing account, or save current account settings as common.

Skills sync

When adding an account or running ccss sync <name>, if ~/.claude/skills/ exists and is non-empty, you'll be prompted to sync the skills directory:

  • Symlink: Creates a symbolic link to ~/.claude/skills/ — all accounts share the same skills, any changes are reflected everywhere.
  • Copy: Creates an independent copy of the skills directory for this account.
  • Skip: Don't sync skills.

Development

bun run dev

About

Claude Code Subscription Switch

Resources

Stars

31 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors