api.foo
api.foo / Docs / CC Switch guide

CC Switch Guide (2026): Install It and Switch Claude Code & Codex Providers in One Click

Updated · By the api.foo docs team (how we test)
On this page

What is CC Switch? CC Switch is a free, open-source desktop app that stores the API providers for your AI coding tools (Claude Code, Codex, Gemini CLI, OpenCode and more) and switches between them with one click, so you stop hand-editing config files. It's published on GitHub by farion1231 (MIT license, © Jason Young). The latest release is v4.0.39, out November 22, 2026.

Three ways to install it:

Official site and GitHub

Address
Source code, releases, issues github.com/farion1231/cc-switch
Official website ccswitch.io, named in the README as the only official site
User manual docs/user-manual in the GitHub repo

Download only from GitHub Releases, Homebrew or ccswitch.io. CC Switch is free, and it stores your API keys. A site that asks you to pay, sign in or install a "helper" to get it isn't the official one. The Homebrew cask downloads the same file from GitHub Releases.

This guide covers v4.0.39. Version 4 replaced the old top tabs with a sidebar and added Routing and Aggregation modes, so v3 screenshots you find elsewhere won't match. Releases come out every day or two, so button names can drift slightly.

Looking for the Git worktree tool at ccswitch.dev? That's a different project with a similar name.

What CC Switch does

Every AI coding CLI keeps its provider settings in a different file: Claude Code in ~/.claude/settings.json, Codex in ~/.codex/config.toml, Gemini CLI in a .env file. Moving between an official account, a cheaper gateway and a local model means editing them by hand. CC Switch gives you a card per provider and a Switch button.

It now manages 16 tools: Claude Code, Claude Desktop, Codex, Gemini CLI, Grok Build, OpenCode, OpenClaw, Hermes Agent, Pi, MiniMax Code, Kimi Code, DeepSeek Harness, Antigravity CLI, Oh My Pi, GitHub Copilot CLI and Tencent WorkBuddy. The last six were added after v4.0.12.

What makes it safe to use on a setup you care about:

  • It only touches the connection fields. Switching replaces the endpoint, key, model and API format. Your plugins, hooks, MCP servers, permissions and comments stay as they are.
  • It backs up first. Before rewriting a tool's config file for the first time, CC Switch saves the original under ~/.cc-switch/backups/live-first-write/.
  • Uninstalling it is harmless. Tools keep running on the last configuration CC Switch wrote.

It also manages MCP servers, Skills, prompts and plugins across tools, shows usage and remaining balance on provider cards, lets you browse past sessions, and has an Apps page that installs and upgrades the CLIs themselves.

Is there a web version? No. CC Switch only ships as a desktop app that needs a graphical interface. For servers and SSH sessions, the README points to the community-maintained CC Switch CLI, a separate project with its own releases.

Direct, Routing and Aggregation

Version 4 has three connection modes, picked with the tabs at the top of each tool's page:

Mode How it works Use it when
Direct (default) Writes the provider's endpoint and key straight into the tool's config The provider supports the tool's API format, which covers most cases
Routing The tool talks to a local server CC Switch runs, and CC Switch forwards each request, converting formats and failing over if needed A preset shows Needs routing, or you want automatic failover between providers
Aggregation Puts models from several providers into one model picker, and each request goes to the provider of the model you choose You want to mix providers inside Claude Code or Codex

Clicking a tab only changes what you're looking at. Nothing switches until you click Start routing or Switch to Aggregation on that page.

Download and install

Requirements: Windows 10 or later, macOS 12 or later (Universal build for Apple silicon and Intel), or Linux on x86_64 or ARM64 with glibc 2.35+ and WebKitGTK 4.1 (Ubuntu 22.04+, Debian 12+, recent Fedora).

  • Windows: download CC-Switch-v<version>-Windows.msi and run it, or use CC-Switch-v<version>-Windows-Portable.zip. On ARM PCs, pick the Windows-arm64 files. If the installer does nothing, right-click it → Properties → check Unblock.
  • macOS: brew install --cask cc-switch (update later with brew upgrade --cask cc-switch), or download CC-Switch-v<version>-macOS.dmg and drag the app to Applications. It's signed and notarized, so it opens without warnings.
  • Linux: .deb for Debian/Ubuntu, .rpm for Fedora, .AppImage for anything else that meets the requirements, each in x86_64 and arm64. On Arch, run paru -S cc-switch-bin. There's no official Flatpak.

CC Switch doesn't need Node.js. It manages tools you've already installed, or you can install them from its Apps page. Setup guides: Claude Code · Codex CLI.

First launch

On first launch, CC Switch:

  1. Imports the current configuration of Claude Code, Codex, Gemini CLI and Grok Build as a provider named default, so whatever works now keeps working.
  2. Adds an official provider for each of them and for Claude Desktop (Claude Official, OpenAI Official, Google Official and so on), which is how you switch back to a normal sign-in later.

Add a provider

Select a tool in the sidebar, then click + in the top-right corner. You have three options.

1. Import from your provider's dashboard

Many API gateways have an Import to CC Switch button that opens a ccswitch:// link. CC Switch then shows a Confirm Import Provider dialog listing the app, endpoint, key, models and any extra settings. Check that the endpoint is the one you expect before importing. To start using the provider right away, turn on Switch to this provider after import at the bottom.

On api.foo, the gateway behind these docs, go to Console → API Keys, click ⋯ next to a key, choose CC Switch, pick the app (Claude, Codex or Gemini) and a primary model, then click Open CC Switch. The endpoint is filled in for you: https://api.foo for Claude and Gemini, https://api.foo/v1 for Codex. Per-model prices are on the pricing page.

2. Use a built-in preset

CC Switch ships with 90+ presets for vendors, gateways and cloud platforms. Search by name or domain (for example "kimi", "openrouter" or "bedrock"), pick one, paste your API key and click Add.

3. Custom configuration

If your provider isn't listed, choose Custom Configuration at the top of the list (or Add with a custom config when a search finds nothing) and enter the endpoint and key yourself. The endpoint format depends on the tool:

Tool Endpoint example Note
Claude Code https://api.foo No /v1, because Claude Code adds the path itself
Codex https://api.foo/v1 Include /v1. The provider must support the OpenAI Responses API
Gemini CLI https://api.foo

The download icon (Fetch Models) next to the model field reads the provider's model list from its /v1/models endpoint. A 401 or 403 means the key is wrong. A 404 means the provider doesn't publish a model list, so type the model ID by hand.

Switch providers

Click Switch on a provider card (it then shows In use), or pick the provider from the CC Switch tray icon. Since v4.0.16 the tray opens a quick panel; you can go back to a plain menu under Settings → General → Tray style. When the change applies depends on the tool:

Tool Applies
Claude Code Immediately, no restart
Codex, Gemini CLI, Grok Build After you restart the CLI (Codex desktop: quit it fully and reopen)
Claude Desktop After you fully quit and reopen it
OpenCode, OpenClaw, Hermes, Pi, MiniMax Code, Kimi Code, Oh My Pi, DeepSeek Harness, GitHub Copilot CLI, WorkBuddy These keep several providers side by side. Click Add (Enable for Pi and Oh My Pi), then choose the model inside the tool
Antigravity CLI Only in a terminal opened with Open Terminal with This Provider on the card

Back to your official account: switch to the built-in official provider (Claude Official, OpenAI Official, …), restart the tool and sign in its usual way: /login in Claude Code, codex login for Codex.

Codex specifics

  • Codex only speaks the OpenAI Responses API. Providers that only offer Chat Completions are marked Needs routing.
  • On a third-party provider, CC Switch writes the key into experimental_bearer_token under [model_providers.custom] in ~/.codex/config.toml. It never writes that key into ~/.codex/auth.json.
  • Your ChatGPT sign-in lives in auth.json. By default, a Direct switch to a third-party provider sets that login aside in ~/.cc-switch/codex-login-stash.json and removes auth.json. Switching back to OpenAI Official puts it back, so you don't sign in again. To keep the login in place, turn on Keep official login for direct switches under Settings → App config → Codex.
  • Since Codex CLI 0.167 and desktop 26.1103, official and third-party sessions are kept apart. After a Direct switch, the other side's sessions become read-only and continuing one reports "model provider mismatch". Use Routing or Aggregation mode, or turn on Unified Codex session history in the same settings group, if you need to keep continuing old sessions.
  • Restart Codex after every switch.

"Needs routing", explained

A Needs routing badge means the provider's API format doesn't match what the tool speaks. For example, Claude Code only speaks Anthropic's Messages API, and some providers only offer OpenAI's.

To use such a provider:

  1. Open the tool's page, click the Routing tab, then Start routing. (Clicking Switch on the card also offers Start routing and use it.)
  2. CC Switch rewrites the tool's config to point at a local address (http://127.0.0.1:15721 by default) with the placeholder key PROXY_MANAGED. The real endpoint and key stay inside CC Switch.
  3. Keep CC Switch running. When you quit it, it writes the direct config back first and reconnects next time it starts.
  4. Click Back to direct when you're done.

Routing also gives you a failover queue: when a request fails, CC Switch retries the next provider in line, with a circuit breaker so a dead provider isn't hammered.

If your provider already supports the tool's format natively (api.foo offers both Anthropic-native and OpenAI Responses endpoints, for example), stay on Direct. It's one less hop and one less thing that can break.

Troubleshooting

The tool still uses the old provider

  • Restart Codex, Gemini CLI or Grok Build after switching. Claude Code should switch live. If it doesn't, reopen the terminal or editor.
  • Look for an Environment Variable Conflicts Detected banner at the top of CC Switch. Variables like ANTHROPIC_BASE_URL or OPENAI_API_KEY set in your shell profile or Windows environment override the config files CC Switch writes. Open View Details, select the variables and delete them. CC Switch backs them up first. Then restart your terminal.

The connectivity check passes, but requests fail

The Connectivity check on a provider card only confirms the endpoint is reachable. It doesn't send a real model request, so it can't catch a wrong key or model name. Re-copy the key, confirm the model ID against the provider's list, and check the /v1 rule in the table above. In Routing mode, Usage → request logs shows the exact upstream error.

My config file now points to 127.0.0.1

Routing or Aggregation mode is on. That's expected. Click Back to direct to restore the provider's real endpoint.

I can't delete the active provider

For tools with one active provider at a time (Claude Code, Claude Desktop, Codex, Gemini CLI, Grok Build), CC Switch always keeps one in use so the tool never ends up with no configuration. Switch to another provider first, then delete it.

Windows: it won't open or closes immediately

Install the Microsoft Edge WebView2 runtime, and whitelist CC Switch in your antivirus if it's being blocked.

Linux: the AppImage won't start

Make it executable with chmod +x CC-Switch-*.AppImage. GLIBC_2.xx not found means your distro is too old, since glibc 2.35+ is required and RHEL/Rocky/Alma 8–9 aren't supported. FUSE errors go away after installing libfuse2 or switching to the .deb/.rpm.

Uninstall CC Switch

Platform How
Windows Settings → Apps, or the uninstaller in the install folder
macOS (Homebrew) brew uninstall --cask cc-switch (add --zap to remove its data too)
macOS (manual) Move CC Switch from Applications to the Trash
Debian / Ubuntu sudo apt remove cc-switch
Fedora sudo dnf remove cc-switch
Arch paru -R cc-switch-bin

Your coding tools keep working with whatever provider was active last. CC Switch's own data (providers, backups, logs) lives in ~/.cc-switch. Delete that folder for a full cleanup.

FAQ

What is CC Switch?

CC Switch is a free, open-source (MIT) desktop app for Windows, macOS and Linux that manages which API provider your AI coding tools use. You save each provider's endpoint and key once, then switch with one click instead of editing JSON, TOML or YAML files. It supports 16 tools, including Claude Code, Claude Desktop, Codex, Gemini CLI, Grok Build, OpenCode, Kimi Code and GitHub Copilot CLI. The latest version is v4.0.39 (November 22, 2026).

What is the official CC Switch website and GitHub?

The source code and downloads are at github.com/farion1231/cc-switch, and the README names ccswitch.io as the only official website. On a Mac you can also run brew install --cask cc-switch, which downloads the same file from GitHub Releases.

Is ccswitch.dev the same as CC Switch?

No. ccswitch.dev is an unrelated command-line tool for managing Git worktrees. The CC Switch provider manager lives at ccswitch.io and github.com/farion1231/cc-switch.

Is there a CC Switch web version?

No. CC Switch only ships as a desktop app that needs a graphical interface. For servers and SSH sessions, its README points to the community-maintained CC Switch CLI (github.com/SaladDay/cc-switch-cli), a separate project. The page on ccswitch.io that creates import links is a link generator, not a web version of the app.

How do I use CC Switch with Claude Code?

Select Claude Code in the sidebar, click + to add a provider (pick a preset or Custom Configuration, then enter the endpoint and API key), and click Switch on its card. Claude Code picks up the change without a restart.

Does CC Switch work with OpenCode?

Yes. OpenCode is a coexist-mode tool in CC Switch. Click Add on a provider card to write it into OpenCode's config next to the others, then pick the model inside OpenCode. CC Switch also syncs MCP servers, Skills and prompts to it.

What does "Needs routing" mean in CC Switch?

The provider speaks a different API format than the tool, for example an OpenAI-only service used from Claude Code. Start routing on the tool's page so CC Switch translates requests locally, and keep CC Switch running while you use it.

How do I uninstall CC Switch?

On Windows, uninstall it from Settings → Apps. On macOS, run brew uninstall --cask cc-switch (add --zap to delete its data) or move the app to the Trash. On Debian/Ubuntu, run sudo apt remove cc-switch, on Fedora sudo dnf remove cc-switch, and on Arch paru -R cc-switch-bin. Your coding tools keep working with whichever provider was last active.

Is CC Switch free?

Yes. It's MIT-licensed open source. The model providers you configure in it bill you separately.

Found a mistake? Email support@api.foo.