Features Supported Tools Gateway Simulator Documentation Manual FAQ Help Download Installer
Enterprise Local Gateway | v3.16.1 Release

The Professional Cockpit for
Local AI CLI Agents

Secure, isolate, and route terminal prompt executions. CC Switch unifies variables, manages Model Context Protocol (MCP) servers, and logs spent telemetry locally across Claude Code, Codex, Gemini CLI, OpenCode, and Hermes.

$ brew install --cask cc-switch
CC Switch Dashboard — Console Proxy: Port 15721
API Calls 2,450
Total Spend $3.16
Success Rate 99.7%
Endpoint Latency Speeds
DeepSeek Preset
42ms
SiliconFlow Hub
65ms
Kimi k2.7
98ms
0

Queries Managed

0

Active Installations

0

Provider Presets

0

CLI Integrations

SYSTEM FEATURES

Integrated Environment Control

Every feature designed to isolate credentials, guarantee high availability, and log spent parameters safely.

🔌

High-Performance Local Gateway

CC Switch starts a local HTTP proxy server (http://127.0.0.1:15721). It intercepts agent traffic, translates payloads (Anthropic Messages ➔ OpenAI Chat Completions on the fly), and logs request parameters.

Local proxy gateway flow diagram CLI Agent Local Proxy Port 15721 AI Relay

Latency Speeds Telemetry

Inspect connection latency responses to active providers before launching CLI agents to select the fastest routes.

DeepSeek Preset
42ms
SiliconFlow Hub
65ms
Kimi Coding
98ms
📁

Transaction-Safe SQL Storage

Dual-layer configuration. Sync presets, prompts, and server logs securely in SQLite database files, isolating UI configurations in JSON settings.

SQLite database target: ~/.cc-switch/cc-switch.db
🧩

Unified MCP Context & Prompt Sync

A visual dashboard linking Model Context Protocol (MCP) server directories and prompt files (CLAUDE.md, AGENTS.md, etc.) across Claude Desktop, Claude Code, and Hermes with bidirectional backfill syncs.

Claude Code
Claude Desktop
Hermes Agent
OpenClaw
CONNECTIONS NODE

Supported Agent CLI Environments

Seamlessly consolidate configurations and proxy operations across seven leading developer terminals.

Anthropic

Claude Code

Manage your official Anthropic channels and custom API relays. Features auto-backfill for shared plugin config directories.

config:~/.claude.json
Anthropic

Claude Desktop

Bypass official OAuth constraints to configure third-party API keys. Supports model mapping configurations (Opus / Sonnet / Haiku mapping).

config:~/Library/Application Support/Claude
OpenAI

Codex

Precisely maps and logs token parameters based on session telemetry files. Features Codex OAuth reverse proxy setups.

config:~/.codex.toml
Google AI

Gemini CLI

Injects credentials into active shell configurations. Enables instant switches without terminal restarts.

config:~/.geminirc
Open Source

OpenCode

Configure Qwen Coder, Zhipu GLM, Kimi Coding, DeepSeek, and custom local models running over standard endpoints.

config:~/.opencode.json
Open Source

OpenClaw

Unifies multi-agent gateway parameters, workspace directories, daily memories, and AWS Bedrock API credentials.

config:~/.openclaw/config
GATEWAY TESTBED

Interactive Local Gateway Sandbox

Run speed tests, trigger custom queries, and inspect how format conversion handles schemas in real-time.

CC Switch Configuration Board

1. Select Upstream Provider Preset
2. Gateway Proxy status
Local Proxy Server active on port 15721
3. Trigger Operations
Active Gateway Failover Queue
  • 1. DeepSeek Currently Active
  • 2. SiliconFlow Standby Queue
  • 3. Backup Provider Standby Queue
127.0.0.1:15721 — Connection Logger Console
[Proxy-Core] Listening for local queries on loopback adapter port 15721.
[Proxy-Core] Database bindings established. Log telemetry target: ~/.cc-switch/cc-switch.db
[Proxy-Core] Pre-cached mapping presets parsed.
DATA FLOWS

Architecture & Interception Sequence

How CC Switch intercepts agent connections, writes metrics, and translates schemas.

AI Agent CLI (e.g. Claude Code)
Terminal executes user shell query
Local Gateway Proxy (Tokio + Rust)
Port 15721 intercepts payload
SQLite DAO Database
Records logs & counts
Format Translation
Messages ↔ Completions
Upstream API Endpoint Relay
Returns Server-Sent stream events

High Availability Safeguards

  • Atomic Write Operations Config updates overwrite temporary targets first, performing a rename execution to bypass incomplete disk writes.
  • Dual-Way Synchronization Writes active settings directly into target tool configurations while backfilling shared snippets dynamically.
  • Concurrency-Safe Memory Models Tauri commands run asynchronously over thread-safe memory models. Database connections utilize mutex pools.
  • Local-First Privacy Guard API credentials and prompt telemetry never contact external servers. All information remains on the host SQLite DB.
COMPARATIVE INDEX

How CC Switch Unifies Your Environment

A direct look at managing configurations manually versus utilizing a dedicated cockpit.

Feature Capability CC Switch Cockpit Manual File Editing Generic Web Proxies
Multi-Agent Configuration Console ✔ Unified UI (7 CLI tools, 50+ presets) ✘ Fragmented config scripts ⚠ Limited (Static configurations only)
Format Conversion Layer ✔ Native (Messages ↔ Completions) ✘ Not supported ✘ Not supported
Live System Tray Switcher ✔ Yes (Instant configuration swap) ✘ Not supported ✘ Not supported
Failover & Circuit Breaker Queue ✔ Yes (Automated queue failover) ✘ Not supported ⚠ Basic server switches only
MCP & System Prompt Sync ✔ Yes (Bidirectional synchronization) ✘ Not supported ✘ Not supported
Cost Telemetry & Spend Metrics ✔ Yes (SQLite query dashboard) ✘ Not supported ⚠ Raw request logs only
Atomic Disk Saves ✔ Yes (Prevents configuration corruptions) ✘ No safeguards ✘ Not supported

The Ultimate Developer Guide to CC Switch

Authoritative documentation guide for local-first AI agent routing, SQLite connection layers, and high-availability configuration management.

1. Introduction

The modern software engineering landscape has transitioned from simple, autocomplete-style AI inline suggestions to autonomous, terminal-resident AI agent workflows. Developers no longer just use AI; they collaborate with it in full-loop coding tasks. Tools such as Claude Code, Claude Desktop, Google's Gemini CLI, OpenAI's Codex, OpenCode, OpenClaw, and Hermes Agent represent a paradigm shift. They can search local projects, edit files, execute git commits, run unit tests, and resolve build errors directly.

However, as the proliferation of these command-line interface (CLI) agents has accelerated, so has the configuration overhead. Operating multiple separate agents across different workspaces requires managing fragmented configuration formats (JSON, TOML, YAML, `.env` files), handling custom API relays, orchestrating Model Context Protocol (MCP) servers, syncing system prompts, and debugging environment variables.

CC Switch is the definitive open-source desktop solution built to resolve these pain points. By providing a unified, local-first management system, CC Switch acts as the control panel for all your AI coding agents, enabling hot-switching of providers, local request proxying, high-availability failover, and bidirectional configuration syncing.

2. What is CC Switch?

CC Switch is an open-source, cross-platform desktop application built on the Tauri 2 and Rust framework. It acts as an orchestrator and manager for seven core developer-focused AI agent CLI tools:

  1. Claude Code: Anthropic’s high-performance terminal agent.
  2. Claude Desktop: Anthropic's flagship desktop client, supporting official sign-ins and third-party configuration profiles.
  3. Codex: OpenAI’s powerful code-generation CLI.
  4. Gemini CLI: Google's developer CLI tool powered by Gemini models.
  5. OpenCode: An open-source, terminal-based coding assistant.
  6. OpenClaw: A highly custom agent gateway.
  7. Hermes: An agent framework specialized in memory, tools, and MCP servers.

Instead of requiring developers to manually edit raw config files under hidden home directories (~/.config/ or ~/.claude/), CC Switch provides a visually polished, local-first interface to add, configure, test, and switch between more than 50 API provider presets.

3. Why It Exists & The Problems It Solves

AI agents are powerful, but the developer experience surrounding their configuration is highly fragmented. Below are the key problems CC Switch resolves:

FRAGMENTATION

Using different API providers (official, proxy services) requires manually editing configuration files across several distinct directories.

Fragmented Configurations

Each AI tool stores its settings differently. Claude Code uses a hidden JSON config, Codex uses a custom TOML or environment variables, and Gemini CLI relies on bash/zsh profiles. Switching from an official endpoint to an internal company gateway or a third-party relay requires editing several configurations across multiple files.

Lack of Centralized Logging and Spending Auditing

Developers running large agent tasks (like resolving a test suite) often have no direct visibility into how many tokens were consumed, which API endpoints were called, or what the actual dollar cost of the run was until they check their cloud provider billing console.

Single-Point-of-Failure (SPOF)

If an API provider goes down or experiences rate limits mid-workflow, the CLI agent fails immediately, halting the developer's momentum. There is no native mechanism in these tools to switch to a backup provider automatically.

MCP and Extension Fragmentation

Model Context Protocol (MCP) servers allow LLMs to read databases, inspect container states, or search documentation. Managing these servers across Claude Desktop, Claude Code, and Hermes separately results in sync issues and configuration drift.

4. Core Features

CC Switch is designed to be the ultimate cockpit for AI coding agents. Its key capabilities include:

1. Visual Provider Management

A single dashboard containing over 50 provider presets (including Anthropic, OpenAI, Google, AWS Bedrock, Nvidia NIM, SiliconFlow, Kimi, DeepSeek, GLM, and specialized dev relays like Cubence, DMXAPI, and PackyCode). Users can import their API keys, measure latencies via a built-in Speed Test service, and switch active profiles in one click.

2. Local Proxy Service & High Availability Gateway

CC Switch starts a local HTTP proxy server (http://127.0.0.1:15721) that acts as an intelligent intermediary. When enabled, it intercepts agent traffic and applies advanced rules:

  • Format Conversion: Translates Anthropic Messages format to OpenAI Chat Completions on the fly, allowing developers to run Claude Code using OpenAI-compatible endpoints or models like DeepSeek-Coder.
  • Automatic Failover: Dynamically routes requests to a secondary provider in the queue if the primary provider fails or returns a rate-limit error.
  • Circuit Breaker: Automatically suspends a failing provider for a set recovery period (default 60 seconds) to prevent infinite retry loops.

3. Unified MCP, Prompts, & Skills Management

MCP Panel: Centralizes MCP server definitions and handles bidirectional synchronization, ensuring that servers added to CC Switch are automatically populated in Claude Desktop and other supporting tools.

Prompt Sync: Markdown prompt editor with backfill protection that maintains sync between files like CLAUDE.md, AGENTS.md, and GEMINI.md.

Skills Manager: Resolves one-click installations of skill scripts from Git repositories or local ZIP files directly into the target agent folders.

4. Cost and Token Tracking Dashboard

A visual analytics dashboard that reads SQLite request logs. It tracks total queries, token volumes, cache hit rates (critical for optimizing costs when using prompt caching on Claude 3.5 Sonnet), and live spending metrics based on customizable, model-specific pricing tables.

5. Supported AI Platforms & Presets

CC Switch contains deep integration for mainstream LLM platforms. The following catalog provides detail on preset configuration templates:

Table 1: Supported API provider presets and their routing modes
Preset Name Protocol Type Target Model Routing Badges
Claude Official Anthropic Messages claude-3-5-sonnet / claude-3-opus Direct Connection
DeepSeek Chat Completions deepseek-coder / deepseek-reasoner Local Routing Required
Kimi For Coding Chat Completions kimi-k2.7-code Local Routing Required
SiliconFlow OpenAI Compatible multi-model support Direct Routing
OpenAI Official Chat Completions gpt-4o / o1-pro / gpt-5.5-preview Direct Connection
Google Official Gemini Native gemini-1.5-pro / gemini-2.0-flash Direct OAuth

6. Installation Guide

CC Switch supports all major desktop environments with native-compiled binaries. Follow the instructions corresponding to your operating system:

macOS Installation

The macOS app is signed and notarized by Apple. You can drag the .dmg into your Applications folder or install via Homebrew:

Terminal
# Install using Homebrew cask
brew install --cask cc-switch

# Upgrade package to latest version
brew upgrade --cask cc-switch

Windows Installation

Requires the Microsoft Edge WebView2 runtime. Run the CC-Switch-v3.16.1-Windows.msi installer, or use the portable .zip package.

PowerShell
# Install WebView2 via WinGet if needed
winget install Microsoft.EdgeWebView2Runtime

Linux Installation

Download the relevant release package (.deb, .rpm, .AppImage) or install via the Arch User Repository (AUR):

Bash
# Arch Linux AUR installation
paru -S cc-switch-bin

# Run AppImage from shell
chmod +x CC-Switch-*.AppImage
./CC-Switch-*.AppImage
WAYLAND WORKAROUND

On Wayland sessions utilizing NVIDIA GPUs, launch the AppImage with: CC_SWITCH_GDK_BACKEND=wayland ./CC-Switch-*.AppImage to bypass mouse pointer problems or black screens on window resizes.

7. Technical Architecture

CC Switch is built upon a high-performance, security-focused architecture designed around Tauri 2 and Rust, with a modern UI fronted by React 18 and TypeScript.

Tauri IPC and Asynchronous Rust

Tauri acts as the secure bridge. It executes commands securely on the local operating system, passing structured JSON messages between the frontend and the Rust backend, avoiding the memory usage associated with Electron-based wrappers.

The backend core processes incoming connections in a multithreaded environment utilizing the Tokio async runtime. Structured database calls map directly to SQLite schemas via transaction-safe connection managers.

8. How It Works: The Local Proxy & Format Conversion

The defining technical breakthrough of CC Switch is its local proxy engine. Let’s look at the flow of a developer query when executing claude code in the terminal:

  1. Request Capture: The user enters a prompt in the terminal. Claude Code sends a JSON POST request containing Anthropic messages data.
  2. Interception: Because CC Switch is running in the background with "App Takeover" enabled, the local CLI tool is configured to point its endpoint base URL to http://127.0.0.1:15721.
  3. Local Format Rectification: If the active provider is configured with the OpenAI format (e.g., DeepSeek Coder), CC Switch intercepts the request. The Rust proxy service translates the Anthropic Messages structure (system instructions, user prompts, dynamic history) into standard OpenAI chat/completions schema arrays.
  4. Forwarding & Stream Handling: The proxy executes the upstream HTTP request. It listens for the response stream. When chunks arrive from the upstream server, it converts the Server-Sent Events (SSE) from the OpenAI stream format back into Anthropic stream events on the fly, feeding them directly back to the terminal.
  5. Analytics Recording: Simultaneously, the token usage and cost metrics are written asynchronously to cc-switch.db.

9. Setup Workflow

Getting up and running with CC Switch takes less than 5 minutes:

Step 1: First hook - Upon startup, CC Switch scans your filesystem for existing agent settings (e.g., Claude Code configs or Google CLI configs) and auto-generates your default provider layout.

Step 2: Add provider configuration - Click the "+" icon, select a preset template (e.g., Kimi For Coding or SiliconFlow), paste your API key, and click Save.

Step 3: Toggle proxy gateway - Click the Proxy Toggle button at the top of the interface until it lights up green, then enable App Takeover for your desired CLI agents.

Step 4: Execute agent CLI - Start your agent in the terminal. Your requests will now route through CC Switch. You can switch active backends instantly via the system tray icon menu without interrupting your active shell session.

10. Advanced Configuration & Deep Customization

CC Switch stores files in local user paths for complete configuration control:

  • Database: ~/.cc-switch/cc-switch.db - SQLite table containing providers, MCPs, logs, and prompt models.
  • Device Settings: ~/.cc-switch/settings.json - Stores local window preferences, dark/light themes, and minimized state toggles.
  • Backups: ~/.cc-switch/backups/ - Automated database copy rotation keeping the 10 most recent states.
  • Skills Folders: ~/.cc-switch/skills/ - Symlinked paths mapping directly to active agent plugin locations.

Model Mapping Customization

To use Claude Desktop with custom third-party relays, you must define custom model mapping rules. The following JSON structure maps upstream model ids into desktop sonnet, opus, or haiku profiles:

model-mapping.json
{
  "claude-3-5-sonnet-20241022": "deepseek-coder",
  "claude-3-opus-20240229": "deepseek-reasoner",
  "claude-3-5-haiku-20241022": "deepseek-coder"
}

11. Security, Performance & Developer Experience

Local-First Security: Your API keys, prompt logs, and session files are never sent to CC Switch servers. Everything is stored locally in your SQLite database. The proxy server runs entirely on your localhost loopback adapter (127.0.0.1), ensuring zero network exposure to third parties.

High Reliability via Atomic Writes: When writing configuration files back to disk, CC Switch employs an Atomic Write Pattern. It writes updated payloads to a temporary file (e.g., config.json.tmp), calls OS-level flush operations, and performs an atomic replace. This prevents corrupted settings if a crash occurs mid-write.

Low Memory Footprint: Tauri compiles directly to native OS web views rather than bundling an entire Chrome executable. When minimized to the system tray in Lightweight Mode, the main window is destroyed, keeping idle memory consumption below 15MB RAM.

12. Best Practices & Troubleshooting Tips

Optimize your agent configurations using these developer tips:

Resolve Proxy Port Conflicts

If the local proxy fails to start, the port 15721 is likely occupied by another process. Run the diagnostics checks to verify:

Terminal Diagnostics
# macOS & Linux port check
lsof -i :15721

# Windows port check
netstat -ano | findstr :15721

Terminate the conflicting process, or modify the listening port setting inside the CC Switch Advanced settings panel.

Config Snippet Backfill Protection

When switching providers, your global agent variables (personas, ignore files, editor setups) might get wiped. Configure the **Shared Config Panel** and select "Write Shared Config" to ensure these properties carry over to new profiles automatically.

13. Frequently Asked Questions (FAQ)

Q: Does CC Switch cost money?

A: No, CC Switch is free and open-source under the MIT License.

Q: Do I need to restart my terminal after switching providers?

A: For Codex and Gemini CLI, yes. For Claude Code, no - it supports live hot-swapping configurations without terminal restarts.

Q: How does the auto-failover queue determine health status?

A: If a request returns a network error, timeout, or a status code of 5xx/429, CC Switch registers a failure. After 3 consecutive failures, the active provider status turns red and routes requests to the next standby provider in the queue automatically.

14. Future Scope

The CC Switch roadmap aims to incorporate several new key additions:

  • Local LLM Routing: Built-in direct integrations for local offline model engines running Ollama or Llama.cpp.
  • Dynamic Context Injection: Automatically inserting dynamic environment files (e.g., local Git diff states) into prompt streams before requests leave the local proxy gateway.
  • Network Dashboard: Web dashboard interface enabling secure remote cost monitoring and log checking from different developer machines on the same local network.

15. Conclusion

As AI agents become an integral part of modern software development, having a structured, secure, and highly available configuration manager is essential. CC Switch simplifies this complexity. By offering visual provider management, local proxy conversion, robust failover queues, and unified MCP syncing in a lightweight Tauri package, it allows developers to focus on what matters most: building great software.

Whether you are a sole developer utilizing DeepSeek, or an enterprise team orchestrating custom internal models, CC Switch provides the tools you need to build a modern, high-performance AI development workflow.

RESOURCES

Frequently Asked Questions

Find answers to common questions about installation, databases, and backup syncs.

CC Switch supports seven main CLI tools: Claude Code, Claude Desktop, Codex, Gemini CLI, OpenCode, OpenClaw, and Hermes Agent. Presets are pre-populated on dashboard panels.

For Codex and Gemini CLI, yes. Restarting the shell is required to load env vars. Claude Code supports instant hot-swaps without needing terminal restarts.

All data stays locally on your system: SQLite database configurations are saved under ~/.cc-switch/cc-switch.db and UI window settings are under ~/.cc-switch/settings.json.

If the local proxy experiences rate-limits (HTTP 429) or timeouts from the primary provider, it increments a failure count. After 3 consecutive failures, the proxy marks the provider degraded and routes upcoming queries to the next healthy standby in the queue automatically.

NATIVE CLIENT

Deploy CC Switch Local Cockpit

Download the latest native binary for your target operating system from our live Releases Portal.

🍎

macOS Client

Signed and notarized `.dmg` installer bundles optimized for Apple Silicon and Intel platforms.

Download DMG Or run: brew install --cask cc-switch

Windows Client

Native `.msi` installers and portable `.zip` structures for x64 architecture.

Download MSI Compatible with Windows 10/11
🐧

Linux Client

Debian `.deb`, Fedora `.rpm`, and universal `.AppImage` distribution bundles.

Download AppImage Or Arch AUR: paru -S cc-switch-bin

Type keys to filter the 2,200+ words user manual...