Skip to content

CC-Switch

CC-Switch is a graphical configuration tool that simplifies setting up AI coding tools (Claude Code, CodeX, Gemini CLI) to use custom API endpoints like 3xCoder.

Features

  • One-Click Configuration — Configure Claude Code, CodeX, and Gemini CLI from a single interface
  • Multiple Profiles — Save and switch between different API configurations
  • Cross-Platform — Works on Windows, macOS, and Linux
  • Auto-Detection — Automatically detects installed AI tools and their config locations

Installation

CC-Switch runs via npx — no global installation needed:

bash
npx cc-switch@latest

TIP

Requires Node.js v18 or later.

Quick Start

  1. Run CC-Switch:
bash
npx cc-switch@latest
  1. The interactive interface will launch in your terminal

  2. Select the tool you want to configure:

    • Claude Code — Anthropic's coding assistant
    • CodeX — OpenAI's coding CLI
    • Gemini CLI — Google's Gemini interface
  3. Enter your 3xCoder settings:

    • Base URL: https://api.3xcoder.com
    • API Key: Your 3xCoder API key
  4. Click Apply — CC-Switch will write the correct configuration files for the selected tool

  5. Launch your tool — it will now use the 3xCoder endpoint

Configuring for 3xCoder

Claude Code

SettingValue
Base URLhttps://api.3xcoder.com
API KeyYour 3xCoder key (sk-...)

CodeX

SettingValue
Base URLhttps://api.3xcoder.com/v1
API KeyYour 3xCoder key (sk-...)

Gemini CLI

SettingValue
Base URLhttps://api.3xcoder.com/v1beta/models
API KeyYour 3xCoder key (sk-...)

Advanced Features

Profile Management

CC-Switch lets you save multiple configuration profiles:

  • Production — Your main 3xCoder key with production settings
  • Development — A development key with different quotas
  • Testing — A test key for experimentation

Switch between profiles without re-entering credentials.

Batch Configuration

Configure all three tools at once:

  1. Select Configure All
  2. Enter your base URL and API key
  3. CC-Switch writes the correct format for each tool

Config Backup

CC-Switch automatically backs up existing configuration files before making changes. If something goes wrong, you can restore the previous config.

Troubleshooting

CC-Switch won't launch

  • Ensure Node.js v18+ is installed: node -v
  • Try clearing the npx cache: npx clear-npx-cache then retry
  • Use npm exec cc-switch@latest as an alternative

Changes don't take effect

  • Restart the AI tool after applying CC-Switch changes
  • Close all terminal instances of the tool
  • Verify the config file was written: check the file paths shown in CC-Switch output

Wrong config location detected

  • CC-Switch uses default paths for each OS
  • If your tool uses a custom config location, you may need to configure manually (see the individual tool deployment guides)

3xCoder — Unified AI API Endpoint