If you are new to Claude Code or AI coding agents, the hardest part is often not the model itself. It is the configuration.
Where is settings.json? Which tool wants ANTHROPIC_BASE_URL? Which one uses OpenAI-compatible /v1? Why does one terminal see the command while another does not?
CC Switch solves that problem by giving you a visual way to manage API providers for multiple coding tools. With one ClaudeAPI key, you can configure tools such as Claude Code, OpenCode, OpenClaw, Hermes, and other supported CLIs without manually editing JSON or TOML files every time.
This guide walks through the beginner path: install the tools you want, create a ClaudeAPI key, install CC Switch, add ClaudeAPI as a provider, activate it, and test that the configuration works.

What CC Switch does
CC Switch is a cross-platform desktop app for managing API configuration across AI coding tools. It does not run model inference by itself. Instead, it writes and switches the configuration that your local coding tools read.
In plain English:
ClaudeAPI provides the API key and model access.
CC Switch manages the local provider configuration.
Your coding tool sends requests using the active profile.
ClaudeAPI provides the API key and model access.
CC Switch manages the local provider configuration.
Your coding tool sends requests using the active profile.
Core features include:
| Feature | What it means |
|---|---|
| Visual provider management | Fill in forms instead of editing config files by hand |
| One-click switching | Change providers from the app or tray menu |
| Presets | Use built-in templates for common API providers |
| Multi-tool support | Manage configuration for supported coding tools |
| MCP management | Keep MCP-related configuration easier to reuse |
| Connection tests | Check whether an endpoint and key are reachable |
| Sync options | Sync configuration through your own cloud storage when enabled |
The main benefit for beginners is simple: you do not need to memorize every config file path before using Claude-powered coding tools.
Before you start: install the tools you want to manage
CC Switch can only manage tools that are installed locally. It does not install Claude Code, OpenCode, OpenClaw, or Hermes for you.
If you only use one or two tools, install only those. If you want CC Switch to show all four in its app switcher, make sure each CLI command is available in your system PATH.
Claude Code
Install Claude Code using Anthropic’s current official instructions for your operating system. Installation methods can change, so check the Claude Code documentation if you are writing internal team docs.
Common install commands you may see include:
npm install -g @anthropic-ai/claude-code
npm install -g @anthropic-ai/claude-code
On macOS, Linux, or WSL, some setups use:
curl -fsSL https://claude.ai/install.sh | bash
curl -fsSL https://claude.ai/install.sh | bash
On Windows PowerShell, some setups use:
irm https://claude.ai/install.ps1 | iex
irm https://claude.ai/install.ps1 | iex
Verify:
claude --version
claude --version
If this is your first time using Claude Code, run it once:
claude
claude
OpenCode
OpenCode installation options vary by platform. Common options include:
curl -fsSL https://opencode.ai/install | bash
curl -fsSL https://opencode.ai/install | bash
or npm:
npm install -g opencode-ai
npm install -g opencode-ai
Homebrew users may use:
brew install anomalyco/tap/opencode
brew install anomalyco/tap/opencode
Verify:
opencode --version
opencode --version
OpenClaw
OpenClaw is an agent-oriented project related to OpenCode-style workflows. Follow the official project documentation for the latest install command.
Common examples include:
curl -fsSL https://openclaw.ai/install.sh | bash
curl -fsSL https://openclaw.ai/install.sh | bash
or:
npm install -g openclaw
npm install -g openclaw
Verify:
openclaw --version
openclaw --version
If the command exists but does not start, check Node.js, npm global paths, WSL configuration, and your terminal PATH.
Hermes
Hermes Agent from Nous Research is a local autonomous agent with persistent memory. It can be configured to use ClaudeAPI as a model backend when the tool supports compatible provider configuration.
Official docs:
https://hermes-agent.nousresearch.com/docs/
https://hermes-agent.nousresearch.com/docs/
On macOS and Linux, the installer is commonly:
curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash
curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash
Windows users can use Hermes Desktop from the official site or install through Git Bash when supported by the current installer.
After installation, open a new terminal or reload your shell:
source ~/.zshrc
# or
source ~/.bashrc
source ~/.zshrc
# or
source ~/.bashrc
Verify:
hermes --version
hermes --version
Verify all installed commands
Open a new terminal and run:
claude --version
opencode --version
openclaw --version
hermes --version
claude --version
opencode --version
openclaw --version
hermes --version
If a command is missing, locate it:
macOS / Linux:
which claude
which opencode
which openclaw
which hermes
which claude
which opencode
which openclaw
which hermes
Windows PowerShell:
where.exe claude
where.exe opencode
where.exe openclaw
where.exe hermes
where.exe claude
where.exe opencode
where.exe openclaw
where.exe hermes
If the terminal can run the command but CC Switch cannot see it, restart CC Switch. If needed, restart the system so the desktop app and terminal share the same environment.

Step 1: Create a ClaudeAPI key
Go to ClaudeAPI, create an account, and open the console.

In the API Keys page, create a new key.

Copy the key and keep it private.

Do not commit API keys to Git. If a key is leaked, revoke it and create a new one.
Common ClaudeAPI model IDs include:
| Model | Model ID | Typical use |
|---|---|---|
| Claude Opus 4.8 | claude-opus-4-8 |
Complex reasoning, long context |
| Claude Opus 4.7 | claude-opus-4-7 |
Complex reasoning, long context |
| Claude Opus 4.6 | claude-opus-4-6 |
Complex reasoning, long context |
| Claude Sonnet 4.6 | claude-sonnet-4-6 |
Daily development default |
| Claude Haiku 4.5 | claude-haiku-4-5-20251001 |
Lightweight, fast tasks |
Model availability and pricing can change, so use the ClaudeAPI console as the source of truth.

Step 2: Download and install CC Switch
Use the official sources:
| Type | Link |
|---|---|
| Website | ccswitch.io |
| Source code | github.com/farion1231/cc-switch |
| Downloads | GitHub Releases |
Download the build for your operating system.

You can also download from GitHub Releases.


Step 3: Add ClaudeAPI as a provider
The easiest path is to create or import the ClaudeAPI provider directly from the ClaudeAPI console when that option is available.


You can also add the provider manually in CC Switch:
- Open CC Switch.
- Choose the target tool, such as Claude Code.
- Add a new provider.
- Fill in the ClaudeAPI key and endpoint.

Use these values for Anthropic Messages / Claude-style tools:
| Field | Value |
|---|---|
| Provider name | ClaudeAPI or any label you prefer |
| API format | Anthropic Messages / native Claude format |
| API key | Your sk-... ClaudeAPI key |
| Base URL | https://gw.claudeapi.com |
Do not add /v1 for Claude Code-style Anthropic configuration.

Save the provider.

Step 4: Activate and test the provider
Find the ClaudeAPI provider in the provider list and click Activate or Enable.
CC Switch will write the relevant environment configuration for the selected tool. For Claude Code, that typically means values equivalent to:
{
"env": {
"ANTHROPIC_AUTH_TOKEN": "your-api-key",
"ANTHROPIC_BASE_URL": "https://gw.claudeapi.com"
}
}
{
"env": {
"ANTHROPIC_AUTH_TOKEN": "your-api-key",
"ANTHROPIC_BASE_URL": "https://gw.claudeapi.com"
}
}
Use CC Switch’s connection test to confirm the endpoint works.

Then open a terminal and start Claude Code:
claude
claude
Inside Claude Code, you can use:
/model
/model
to inspect or change the active model, depending on your Claude Code version and configuration.
Step 5: Configure model mappings
In CC Switch, you can set model mappings so different tools or roles use the right Claude model.

Suggested defaults:
| Mapping | Suggested model |
|---|---|
| Main model | claude-sonnet-4-6 |
| Sonnet model | claude-sonnet-4-6 |
| Opus model | claude-opus-4-8 |
| Haiku model | claude-haiku-4-5-20251001 |
If you only want one model, set the main model to the one you use most often.

Switch providers from the tray
CC Switch can stay in the system tray. If you keep multiple providers, such as ClaudeAPI and an official Anthropic profile, you can switch from the tray menu without opening the full app.
Useful provider patterns:
| Provider name | Use |
|---|---|
ClaudeAPI-Sonnet |
Daily coding |
ClaudeAPI-Opus |
Architecture and complex reasoning |
ClaudeAPI-Haiku |
Quick, lightweight tasks |
ClaudeAPI-Test |
Staging or experiments |
For production teams, separate keys by environment or project so usage is easier to audit.
Which base URL should I use?
This is the part most people get wrong.
For Claude Code / Anthropic Messages-style configuration:
https://gw.claudeapi.com
https://gw.claudeapi.com
For OpenAI-compatible tools:
https://gw.claudeapi.com/v1
https://gw.claudeapi.com/v1
Do not mix them. If a tool asks for Anthropic or Claude native configuration, use the host without /v1. If a tool asks for OpenAI-compatible API base, use /v1.
FAQ
The provider switch did not take effect. What should I do?
Restart the terminal or the target CLI. If you use a local forwarding mode that supports hot switching, restarting may not be necessary, but a fresh terminal is the safest beginner troubleshooting step.
What happens if ANTHROPIC_BASE_URL is wrong?
You may see authentication errors, connection errors, or 404-style endpoint errors. For ClaudeAPI with Claude-style tools, use:
https://gw.claudeapi.com
https://gw.claudeapi.com
Make sure it is gw, not api, and do not add /v1.
I forgot to save my API key. Can I view it again?
Usually API keys are shown only once. If you lose it, create a new key in the ClaudeAPI console and revoke the old one if needed.
Does CC Switch store my API key?
CC Switch stores configuration locally. The source article states that CC Switch uses a local SQLite database such as:
~/.cc-switch/cc-switch.db
~/.cc-switch/cc-switch.db
If you enable cloud sync, your configuration may sync through the storage provider you configure, such as Dropbox, OneDrive, iCloud, or WebDAV. Decide whether that is appropriate for your team’s security policy.
Why does CC Switch not show one of my tools?
Usually the tool is not installed, or the command is not visible in the environment CC Switch reads.
Verify from a new terminal:
claude --version
opencode --version
openclaw --version
hermes --version
claude --version
opencode --version
openclaw --version
hermes --version
Then restart CC Switch.
Troubleshooting
| Problem | Likely cause | Fix |
|---|---|---|
command not found |
CLI not installed or not in PATH |
Reinstall the tool or fix PATH |
| Provider activated but CLI still uses old config | Existing terminal/session did not reload | Open a new terminal or restart the CLI |
| 401 error | Wrong API key or copied whitespace | Create/copy the key again |
| 404 or connection error | Wrong base URL | Use https://gw.claudeapi.com for Claude-style tools |
| Model not found | Model ID is not enabled or is misspelled | Copy the exact model ID from the ClaudeAPI console |
| CC Switch does not detect a tool | Desktop app cannot see the same PATH |
Restart CC Switch or the system |
Summary
After setup, your workflow is:
- ClaudeAPI provides the API key and model access.
- CC Switch manages local provider configuration.
- Claude Code, OpenCode, OpenClaw, Hermes, or another supported tool uses the active profile.
The beginner-safe rule is:
Claude-style tools: https://gw.claudeapi.com
OpenAI-compatible tools: https://gw.claudeapi.com/v1
Claude-style tools: https://gw.claudeapi.com
OpenAI-compatible tools: https://gw.claudeapi.com/v1
Once your key, provider, and model mappings are saved, switching providers becomes a click instead of a config-file hunt.
Related guides
- Claude Code with cc-switch setup guide
- Claude API Base URL configuration guide
- Claude API model ID list
- Claude API error guide



