Skip to content

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)

bash
brew tap farion1231/ccswitch
brew install --cask cc-switch

Option 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)

bash
paru -S cc-switch-bin

Debian / Ubuntu

bash
sudo dpkg -i cc-switch_*.deb

AppImage (Universal)

bash
chmod +x CC-Switch_*.AppImage
./CC-Switch_*.AppImage

Web Version (Headless / SSH Servers)

bash
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-web

Default 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:

FieldValue
NameAgentsflare (or any recognizable name)
EndpointChoose the Anthropic-compatible or OpenAI-compatible endpoint based on the tool type
API KeyYour 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 TypeEndpointDescription
Claude / Claude Desktophttps://api.agentsflare.com/anthropicAnthropic Messages API compatible endpoint
Codex / OpenCode / OpenClaw / Hermeshttps://api.agentsflare.com/v1OpenAI API compatible endpoint

After filling in, click Fetch Models to load the available model list, then click Save.


Claude Code Configuration

  1. Select the Claude application type in CC Switch
  2. Add or select the Agentsflare Provider
  3. Fill in the following parameters:
ParameterValue
ANTHROPIC_API_KEYYour Agentsflare API Key
ANTHROPIC_BASE_URLhttps://api.agentsflare.com/anthropic
Modele.g., claude-opus-4-6, claude-sonnet-4-6
  1. Click Enable to activate the configuration
  2. 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

  1. Select the Claude application type in CC Switch
  2. Add the Agentsflare Provider with Endpoint https://api.agentsflare.com/anthropic
  3. Enable Developer Mode in Claude Desktop
  4. Configure custom API via Configure third-party inference:
    • Base URL: https://api.agentsflare.com/anthropic
    • API Key: Your Agentsflare API Key

Manual Configuration (Fallback)

Refer to the Claude Desktop Configuration Guide.


Codex Configuration

  1. Select the Codex application type in CC Switch
  2. Add the Agentsflare Provider with Endpoint https://api.agentsflare.com/v1
  3. Fill in the following parameters:
ParameterValue
OPENAI_API_KEYYour Agentsflare API Key
OPENAI_BASE_URLhttps://api.agentsflare.com/v1
Modele.g., gpt-5.2
  1. Click Enable to activate the configuration
  2. 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 TypeConfiguration ValueUse Case
Chat Completions (default)https://api.agentsflare.com/v1 or https://api.agentsflare.com/v1/chat/completionsStandard chat, code generation, general tasks
Responseshttps://api.agentsflare.com/v1/responsesComplex 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

  1. Select the OpenCode application type in CC Switch (if supported)
  2. Add the Agentsflare Provider with Endpoint https://api.agentsflare.com/v1
  3. Fill in the API Key and model information
  4. Click Enable to activate the configuration

Manual Configuration (Fallback)

For manual configuration, refer to the OpenCode Configuration Guide.


OpenClaw Configuration

  1. Select the OpenClaw application type in CC Switch (if supported)
  2. Add the Agentsflare Provider with Endpoint https://api.agentsflare.com/v1
  3. Fill in the API Key and model information
  4. 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.

  1. Select the Hermes application type in CC Switch (if supported)
  2. Add the Agentsflare Provider with Endpoint https://api.agentsflare.com/v1
  3. Fill in the following parameters:
ParameterValue
base_urlhttps://api.agentsflare.com/v1
api_keyYour Agentsflare API Key
Modele.g., claude-sonnet-4-6, gpt-5.2, etc.
  1. 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

bash
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-6

Option 2: Manual config file editing

Edit ~/.hermes/config.yaml:

yaml
model:
  default: claude-sonnet-4-6
  provider: custom
  base_url: https://api.agentsflare.com/v1
  api_key: Your Agentsflare API Key

Option 3: Environment variables

Edit ~/.hermes/.env:

bash
OPENAI_BASE_URL=https://api.agentsflare.com/v1
OPENAI_API_KEY=Your Agentsflare API Key

After configuration, restart Hermes:

bash
hermes gateway restart

Quick Switching Between Configurations

The core advantage of CC Switch is the ability to switch between Provider configurations with one click:

  1. In the CC Switch main interface, select an existing Provider configuration
  2. Click Enable to activate it
  3. For supported CLI tools (e.g., Claude Code), some support hot-switching without restart
  4. 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:

bash
claude --version    # Claude Code
codex --version     # Codex
opencode --version  # OpenCode
openclaw --version  # OpenClaw
hermes --version    # Hermes

Configuration switch not taking effect

Some tools need to be restarted to read the new configuration. Please:

  1. Exit the current tool session
  2. Restart the tool
  3. Verify the connection again

Model list fails to load

If clicking Fetch Models fails to load the model list, check:

  1. Is the API Key correct?
  2. Is the Endpoint URL correct (pay attention to /v1 or /anthropic suffixes)?
  3. 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.


Resources

This documentation is licensed under CC BY-SA 4.0.