TokenFleet
Tutorials

CC Switch

Use CC Switch to manage multiple Claude Code gateway profiles.

Before you start

CC Switch is useful when you want to switch Claude Code between multiple environments, domains, or tokens.

Your site branding, domain, and model list can all differ by backend configuration.

Setup idea

Different CC Switch builds may expose slightly different package names or commands, so verify the command that exists in your local environment first.

Start with:

ccs --help

If that command is not present, use the command name provided by your installed CC Switch package and continue with the same profile structure below.

Suggested profile fields

Each profile usually needs:

  1. A profile name such as prod or test
  2. A service root URL such as https://api.example.com
  3. A Claude Code token such as sk-your-token
  4. A default model exposed by your backend

Example profile intent

Production

ANTHROPIC_BASE_URL=https://prod.example.com
ANTHROPIC_AUTH_TOKEN=sk-prod-token

Testing

ANTHROPIC_BASE_URL=https://test.example.com
ANTHROPIC_AUTH_TOKEN=sk-test-token

CC Switch helps you move between these profiles quickly. Your backend configuration remains unchanged.

Verify after switching

After switching profiles, reopen the shell or refresh the current session, then run:

claude

Troubleshooting

Still pointing to the old domain

The shell session probably still has older environment variables loaded.

Authentication error after switching

Check whether the selected profile points to a valid token.