Claude Code model router

cc-account-switcher

Script for switching between multiple Claude Code accounts.

452 stars 77 forksModel routers & proxiesArchived Source

Install

Install
brew install jq
From source
git clone https://github.com/ming86/cc-account-switcher.git

From the README

Multi-Account Switcher for Claude Code

A simple tool to manage and switch between multiple Claude Code accounts on macOS, Linux, and WSL.

Features

- Multi-account management: Add, remove, and list Claude Code accounts
- Quick switching: Switch between accounts with simple commands
- Cross-platform: Works on macOS, Linux, and WSL
- Secure storage: Uses system keychain (macOS) or protected files (Linux/WSL)
- Settings preservation: Only switches authentication - your themes, settings, and preferences remain unchanged

Installation

Download the script directly:

Usage

Basic Commands

First Time Setup

1. Log into Claude Code with your first account (make sure you're actively logged in)
2. Run ./ccswitch.sh --add-account to add it to managed accounts
3. Log out and log into Claude Code with your second account
4. Run ./ccswitch.sh --add-account again
5. Now you can switch between accounts with ./ccswitch.sh --switch
6. Important: After each switch, restart Claude Code to use the new authentication
What gets switched: Only your authentication credentials change. Your themes, settings, preferences, and chat history remain exactly the same.

Requirements

- Bash 4.4+
- jq (JSON processor)

Installing Dependencies

macOS:

Ubuntu/Debian:

How It Works

The switcher stores account authentication data separately:

- macOS: Credentials in Keychain, OAuth info in ~/.claude-switch-backup/
- Linux/WSL: Both credentials and OAuth info in ~/.claude-switch-backup/ with restricted permissions

When switching accounts, it:

1. Backs up the current account's authentication data
2. Restores the target account's authentication data
3. Updates Claude Code's authentication files

Troubleshooting

If a switch fails

- Check that you have accounts added: ./ccswitch.sh --list
- Verify…
Read the full README on GitHub

Details

Language
Shell
License
MIT
Last updated
1 July 2025

FAQ

What is cc-account-switcher?

Script for switching between multiple Claude Code accounts. It is a model router for Claude Code, from ming86/cc-account-switcher on GitHub.

How do I install cc-account-switcher?

Run brew install jq, then follow the setup in the README.

Is cc-account-switcher popular?

ming86/cc-account-switcher has 452 GitHub stars and 77 forks. It was last updated on 1 July 2025.

More model routers & proxies

Browse the most popular Claude Code mods, all model routers & proxies, or the skills and MCP server directories.