Agentsflare CC Switch Configuration Guide
CC Switch is an open-source cross-platform configuration manager for AI CLI tools. It centrally manages API configurations for Claude Code, Codex, Gemini CLI, OpenCode, OpenClaw, Hermes Agent, and other popular AI coding agents — allowing you to switch between different API providers and models without manually editing config files.
Installing CC Switch
macOS
Option 1: Homebrew (Recommended)
brew tap farion1231/ccswitch
brew install --cask cc-switchOption 2: Manual Installation
Download the .dmg file from GitHub Releases, open it, and drag CC Switch.app into your Applications folder.
Windows
Option 1: MSI Installer (Recommended)
Download the .msi installer from GitHub Releases and run it.
Option 2: Portable Version
Download the .zip portable version, extract it, and run CC-Switch.exe directly.
Linux
Arch Linux (AUR)
paru -S cc-switch-binDebian / Ubuntu
sudo dpkg -i cc-switch_*.debAppImage (Universal)
chmod +x CC-Switch_*.AppImage
./CC-Switch_*.AppImageWeb Version (Headless / SSH Servers)
wget https://github.com/farion1231/cc-switch/releases/latest/download/cc-switch-web-linux-x64.tar.gz
tar -xzf cc-switch-web-linux-x64.tar.gz
cd cc-switch-web/
./cc-switch-webDefault port is 17666. Access via browser at http://localhost:17666.
Adding Agentsflare as a Provider in CC Switch
After launching CC Switch, click the + button in the top-right corner to add a new configuration. Fill in the Agentsflare details as follows:
| Field | Value |
|---|---|
| Name | Agentsflare (or any recognizable name) |
| Endpoint | Choose the Anthropic-compatible or OpenAI-compatible endpoint based on the tool type |
| API Key | Your Agentsflare API Key |
Selecting the Application Type
CC Switch supports creating independent configurations for different tools. Switch the application type at the top:
- Claude — for Claude Code / Claude Desktop
- Codex — for OpenAI Codex CLI
- Gemini — for Gemini CLI
- OpenCode — for Opencode
- OpenClaw — for Openclaw
- Hermes — for Hermes Agent
Configuring Agentsflare Endpoints
Choose the appropriate Agentsflare endpoint based on the application type:
| Application Type | Endpoint | Description |
|---|---|---|
| Claude / Claude Desktop | https://api.agentsflare.com/anthropic | Anthropic Messages API compatible endpoint |
| Codex / OpenCode / OpenClaw / Hermes | https://api.agentsflare.com/v1 | OpenAI API compatible endpoint |
After filling in, click Fetch Models to load the available model list, then click Save.
Claude Code Configuration
Via CC Switch (Recommended)
- Select the Claude application type in CC Switch
- Add or select the Agentsflare Provider
- Fill in the following parameters:
| Parameter | Value |
|---|---|
| ANTHROPIC_API_KEY | Your Agentsflare API Key |
| ANTHROPIC_BASE_URL | https://api.agentsflare.com/anthropic |
| Model | e.g., claude-opus-4-6, claude-sonnet-4-6 |
- Click Enable to activate the configuration
- Launch Claude Code to use Claude models through the Agentsflare proxy
Manual Configuration (Fallback)
For manual configuration, refer to the Claude Code Configuration Guide.
Claude Desktop Configuration
Claude Desktop is Anthropic's official desktop client. Here's how to configure it:
Via CC Switch
- Select the Claude application type in CC Switch
- Add the Agentsflare Provider with Endpoint
https://api.agentsflare.com/anthropic - Enable Developer Mode in Claude Desktop
- Configure custom API via Configure third-party inference:
- Base URL:
https://api.agentsflare.com/anthropic - API Key: Your Agentsflare API Key
- Base URL:
Manual Configuration (Fallback)
Refer to the Claude Desktop Configuration Guide.
Codex Configuration
Via CC Switch (Recommended)
- Select the Codex application type in CC Switch
- Add the Agentsflare Provider with Endpoint
https://api.agentsflare.com/v1 - Fill in the following parameters:
| Parameter | Value |
|---|---|
| OPENAI_API_KEY | Your Agentsflare API Key |
| OPENAI_BASE_URL | https://api.agentsflare.com/v1 |
| Model | e.g., gpt-5.2 |
- Click Enable to activate the configuration
- Launch Codex to use it
Choosing the API Endpoint
Agentsflare provides two OpenAI-compatible API endpoints. CC Switch uses the base URL by default. To specify a particular endpoint:
| Endpoint Type | Configuration Value | Use Case |
|---|---|---|
| Chat Completions (default) | https://api.agentsflare.com/v1 or https://api.agentsflare.com/v1/chat/completions | Standard chat, code generation, general tasks |
| Responses | https://api.agentsflare.com/v1/responses | Complex reasoning, tool calling, multi-turn context |
Note: Codex natively uses the OpenAI Responses API. When using a Chat Completions endpoint (e.g.,
https://api.agentsflare.com/v1), you must enable Local Routing (Chat Completions Routing) in CC Switch. CC Switch's local proxy automatically converts Codex's outgoing Responses requests into Chat Completions requests and rebuilds the response back into Responses format — no manual config changes needed. Without routing enabled, Codex sending Responses requests directly to a Chat Completions endpoint will result in errors.
Manual Configuration (Fallback)
For manual configuration, refer to the Codex Configuration Guide.
OpenCode Configuration
Via CC Switch (Recommended)
- Select the OpenCode application type in CC Switch (if supported)
- Add the Agentsflare Provider with Endpoint
https://api.agentsflare.com/v1 - Fill in the API Key and model information
- Click Enable to activate the configuration
Manual Configuration (Fallback)
For manual configuration, refer to the OpenCode Configuration Guide.
OpenClaw Configuration
Via CC Switch (Recommended)
- Select the OpenClaw application type in CC Switch (if supported)
- Add the Agentsflare Provider with Endpoint
https://api.agentsflare.com/v1 - Fill in the API Key and model information
- Click Enable to activate the configuration
Manual Configuration (Fallback)
For manual configuration, refer to the OpenClaw Configuration Guide.
Hermes Agent Configuration
Hermes Agent is an open-source CLI coding agent from Nous Research, supporting 300+ models and a cross-platform gateway.
Via CC Switch (Recommended)
- Select the Hermes application type in CC Switch (if supported)
- Add the Agentsflare Provider with Endpoint
https://api.agentsflare.com/v1 - Fill in the following parameters:
| Parameter | Value |
|---|---|
| base_url | https://api.agentsflare.com/v1 |
| api_key | Your Agentsflare API Key |
| Model | e.g., claude-sonnet-4-6, gpt-5.2, etc. |
- Click Enable to activate the configuration
Manual Configuration (Fallback)
If CC Switch does not yet support Hermes, you can manually configure it as follows:
Option 1: Interactive setup with hermes model
hermes model
# Select "Custom endpoint (self-hosted / VLLM / etc.)"
# Enter API base URL: https://api.agentsflare.com/v1
# Enter API Key: Your Agentsflare API Key
# Enter model name: claude-sonnet-4-6Option 2: Manual config file editing
Edit ~/.hermes/config.yaml:
model:
default: claude-sonnet-4-6
provider: custom
base_url: https://api.agentsflare.com/v1
api_key: Your Agentsflare API KeyOption 3: Environment variables
Edit ~/.hermes/.env:
OPENAI_BASE_URL=https://api.agentsflare.com/v1
OPENAI_API_KEY=Your Agentsflare API KeyAfter configuration, restart Hermes:
hermes gateway restartQuick Switching Between Configurations
The core advantage of CC Switch is the ability to switch between Provider configurations with one click:
- In the CC Switch main interface, select an existing Provider configuration
- Click Enable to activate it
- For supported CLI tools (e.g., Claude Code), some support hot-switching without restart
- For tools that require a restart, CC Switch will prompt you to restart the corresponding tool
FAQ
CC Switch cannot detect installed CLI tools
Make sure the corresponding tool is correctly installed and its command is available in PATH. You can verify manually by running:
claude --version # Claude Code
codex --version # Codex
opencode --version # OpenCode
openclaw --version # OpenClaw
hermes --version # HermesConfiguration switch not taking effect
Some tools need to be restarted to read the new configuration. Please:
- Exit the current tool session
- Restart the tool
- Verify the connection again
Model list fails to load
If clicking Fetch Models fails to load the model list, check:
- Is the API Key correct?
- Is the Endpoint URL correct (pay attention to
/v1or/anthropicsuffixes)? - Is the network connection normal?
How to manage multiple API Keys
CC Switch supports adding multiple configurations for the same Provider, distinguished by different names (e.g., Agentsflare-Key1, Agentsflare-Key2). Switch as needed.
