Margrop
Articles374
Tags738
Categories7

Categories

/v1/models 0.025s 0步 0步元递归 0步本身 12类 192.168.x.x 1password 22类一键汇总 3层定位法 401 4个Gateway 4个Gateway全军覆没 503 60秒延迟 60秒超时 6个节点 AC ACP AI AI Coding Assistant AI编程助手 AI辅助 AI辅助编程 AP API Agent couldn't generate Alertmanager AppDaemon Aqara BaiduPCS CC-Switch CI/CD CLI Tools CLI工具 CONFIG Caddy Chrome缺失 Claude Code Cloudflare Codex Cookie 认证 Cron D1 DB探针 DB静止 DIY-123模型 DIY-MINI DIY平台 Date Diagrams.net Diary Docker Docker Compose EADDRINUSE EasyTier NAT穿透 Efficiency Tools Electerm English FTS5 Gateway Gemini CLI GitHub Actions HA HADashboard Hermes Hexo HomeAssistant IP IPv4 Java LVM‑Thin Linux MacOS Macmini Macmini log路径 Markdown MiniMax MiniMax-M3 Multi-Agent MySQL NAS NRestarts Nginx Node-RED Node.js OOM OpenAI OpenClaw OpenClaw gateway OpenCode OpenResty OpenWrt PPPoE Portainer PostgreSQL ProcessOn Prometheus Proxmox VE RPC Restart=always Restart=always循环 SOCKS5 SQLite SSL Session Shell Subagent TTS TimeMachine UML Uptime Kuma VM151 VM152 WeCom缺失 VM153 VPN VPS VPS4 VPS4 overlay TCP不可达 WeCom Web WebSocket Windows Workers activate ad adb adblock agent aligenie aliyun alpine annotation aop authy auto-restart autofs backup baidupan bash bitwarden boot brew browser by-design caddy2 capture_output cdn centos cert certbot charles chat chat completion chrome classloader client clone closures cloudflare cmd command commit connected container cron crontab cron任务 cron设计 ctyun dashboard ddsm demo dependency deploy developer devtools dll dns docker domain download draw drawio dsm dump duplicate service unit dylib edge exception exit 78 export fail2ban fallback fallback失效 feign firewall-cmd flow frp frpc frps fuckgfw function fuser gcc gfw git gitea github golang google_gemma-4 gperftools gridea grub gvt-g hacs havcs heap hello hexo hibernate hidpi hoisting homeassistant hosts html htmlparser https iKuai idea image img img2kvm immortalwrt import index install intel io ios ip iptables iptv ipv6 iso java javascript jetbrains jieba jni jnilib journald journald日志漂移 jpa js json jsonb jupter jupyterlab jvm k8s kernel key kid kms kodi koolproxy koolproxyr kvm lan lastpass launchctl learning lede letsencrypt linux live loopback-proxy low-code lsof lvm lxc m3u8 mac macos manual mariadb markdown maven md5 meta-acceptance meta-pattern meta-probe microcode mirror model provider modem modules monitor mount mstsc mysql n2n n5105 nas netstat network new-api nfs node node-red nodejs nohup notepad++ npm nssm ntp one-api oop openfeign openssl os otp ovz p14 packet capture pat pdf pem perf ping ping通但chat不通 pip plugin png port=18789 powerbutton print pro proxy pve pvekclean python qcow2 qemu qemu-guest-agent rar reboot reconnect循环 reflog remote remote desktop renew repo resize retina root route router rule rules running runtime safari sata schema schema列名 scipy-notebook scoping scp server server is busy service不可信 slmgr so socket-proxyd socks source spk split边界 spring springboot springfox sqlite3 CLI ss ssh ssl stale stash stderr被吞 string subprocess supernode svg svn swagger sync synology system-level daemon system-level vs user-level system-level与user-level抢端口 systemctl systemctl disable systemd systemd duplicate service systemd exit 78 systemd service unit systemd unit systemd unit race systemd-socket systemd被覆盖 tap tap-windows tapwindows telecom template terminal tls tmux token token失效 totp transient 999 trigram tvbox txt ubuntu udisk ui undertow unicode61 uninstall unlocker upgrade upstream provider timeout uptimeMs url user-level daemon v10探针 v11探针 v12探针 v13探针 v1探针 v2ray v6探针 v7探针 v8探针 vhd vim vlmcsd vm vmdk web websocket wechat windows with work day 2 worker wow xiaoya xml yum zip 一键告警脚本 上游LLM容量 不是我的锅 中国电信 中文搜索 主动0步 主动0步本身 主动不追问 主动不追问本身 主动不追问本身也是清单之外 主动不通知 主动不通知本身 主动修 主动修system-level本身也是清单之外 主动修本身也是清单之外 主动周一 主动意识到 主动意识到0步本身 主动意识到0步本身也是清单之外 主动追问 云电脑 交换机 人机协作 代理 优化 但chat 30s+ 但是我的事 体检 保护逻辑本身也是清单之外 修挖坑闭环 修正本身 修正递归 值班 假阳 假阴 健康检查 元递归 光猫 全绿 全量同步 公网IP 内存 内存优化 内网 内网IP 内网渗透 写作 分词 切换 列名误判 升级 协作 单位混淆 博客 反向代理 反常稳定 反应 vs 知识 启动 告警 告警优化 周一 周一焦虑 周三 周二 周二晚上 周五 周六 周四 周报 周日 周末 周末也是清单之外 周末本身也是清单之外 周末突破 周末第二天 周末落地 周末落地本身 夏令时 多场景 多智能体 多节点 多节点管理 天猫精灵 天翼云 安全 安装 定时任务 容器 容器网络 导入 小米 工作感悟 工作日 工作日常 工作日第三天 工作日第五天 工作日第四天 已通知用户 常用软件 幂等 广告屏蔽 序列号 应用市场 异常 循环类 心态 心智成长 心理模型 心跳 心跳检查 性能优化 感悟 打工 打工人 打工人的无奈 批量校验 技术 抓包 挖坑→修坑闭环 排查 排查思路 探针再升级 探针本身 探针版本 探针管理 探针自检 探针踩坑 接受 接受之后 接受修 接受修正 接受层 接受挖坑 接受本身 接受递归 描述文件 放下 故障 故障排查 效率 效率工具 数据 旁路由 旁路进程 无服务器 日记 时区 显卡虚拟化 智能家居 智能音箱 服务器 服务管理 架构 梯子 模块 模型别名映射 模型探测 模型端点可达性 模型端点能ping通 模型调用 毫秒 流程 流程图 流程管理 浏览器 清单之后 清单之外 清单之外也包括接受本身 清单的元递归 清单设计 清单边界 清单进化 源码备份 漫游 激活 激活循环 火绒 焦虑 玄学 生活 电信 画图 监控 监控系统 直播源 直觉 磁盘 端口 端口冲突 端口扫描 第10天 第10类 第11天 第11类 第12天 第12类 第13天 第13类 第14天 第14类 第15类 第16天 第16类 第17类 第18类 第19类 第20类 第21类 第22类 第23类 第25类 第6天 第7天 第8天 第9天 第9类 管理 续期 网关 网络 网络风暴 群晖 脚本 脚本优化 腾讯 自动化 自动恢复 自建应用 自我反思 自我打脸 节点角色 虚拟机 被动意识到 角色不匹配 角色误判 角色误配 角色错配 认证 设计偏差 证书 语雀 误报 误报过滤 超时 路由 路由器 软件管家 软路由 运维 运维监控 进程 连接保活 连接问题 通信机制 通知 通知元递归 通知挖坑 通知本身 部署 部署链路 配置 配置落后 钉钉 镜像 镜像源 长期稳定 长连接 门窗传感器 问题排查 防火墙 阿里云 阿里源 集客 静默期 飞书

Hitokoto

Archive

Managing Five AI Coding Assistants Simultaneously: How I Escaped Configuration Hell with CC Switch CLI

Managing Five AI Coding Assistants Simultaneously: How I Escaped Configuration Hell with CC Switch CLI

Managing Five AI Coding Assistants Simultaneously: How I Escaped Configuration Hell with CC Switch CLI

You probably won’t believe this, but just last week, I was simultaneously using five AI coding assistants — Claude Code, Codex, OpenCode, OpenClaw, and Gemini CLI.

Why so many? Because different tools excel at different things. Some are better at code review, others generate test cases faster, and some integrate better with my workflow.

But then one day, my go-to API reseller sent an email: “Hey, we’re changing our endpoint! Please update your configuration.”

I read that email and felt my stomach drop.

Five tools. Five configuration formats. Five different file paths.

This is the story of how I climbed out of “Configuration Hell” — and found CC Switch CLI along the way.

Background: Five Tools, Five “Dialects”

Let me show you just how messy my configuration files used to be:

Claude Code uses ~/.claude/settings.json, with field names like anthropicApiKey and apiUrl.
Codex uses ~/.codex/config.toml, with field names like api_key and base_url.
Gemini CLI is the special one — it uses ~/.gemini/.env environment variable format.
OpenCode uses ~/.config/opencode/opencode.json, but the format isn’t quite the same as Claude’s.
OpenClaw has its own ~/.openclaw/openclaw.json configuration system.

Every time I needed to switch API providers, I had to:

  1. Open one config file
  2. Check the docs to confirm the field name
  3. Modify it
  4. Save
  5. Repeat the above four times

This isn’t coding — this is filling out forms.

What’s even more annoying is that some field names look similar but aren’t quite the same — base_url vs apiUrl vs endpoint. Every time I had to double-check I hadn’t made a mistake.

Before vs After CC-Switch
Figure 1: My configuration file management before CC Switch — scattered everywhere, all different formats

The Pain Point: How Long Does It Take to Switch Providers?

Let me calculate the time:

Suppose I need to switch all tools from “Reseller A” to “Reseller B”:

  • Claude Code: Open ~/.claude/settings.json, find the apiUrl field, modify, save → 3 minutes
  • Codex: Open ~/.codex/config.toml, find base_url, modify, save → 3 minutes
  • Gemini CLI: Modify the environment variables in ~/.gemini/.env → 2 minutes
  • OpenCode: Open ~/.config/opencode/opencode.json, find the corresponding field → 3 minutes
  • OpenClaw: Open ~/.openclaw/openclaw.json, find the corresponding field → 3 minutes

Total: 14 minutes. And that’s the “smooth” scenario. If you accidentally modify the wrong field, troubleshooting adds even more time.

The scary part: if you have multiple environments (office, home, different projects), you’d have to repeat this for each one.

This isn’t coding — this is running errands.

The Turning Point: Discovering CC Switch CLI

After reaching my limit, I started searching for “AI coding assistant configuration management tools.” That’s when I found two projects:

  1. farion1231/cc-switch — The original desktop GUI version, written in Rust + Tauri
  2. SaladDay/cc-switch-cli — The CLI version, same functionality but better suited for someone like me who works over SSH

I chose cc-switch-cli because:

  • Most of my work happens on remote servers
  • Command-line operations can be scripted and automated
  • The TUI interface fits perfectly with my workflow

Installation is a single command:

1
curl -fsSL https://github.com/SaladDay/cc-switch-cli/releases/latest/download/install.sh | bash

After installation, just type cc-switch to enter the interactive TUI interface.

What Exactly Is CC Switch CLI?

CC Switch CLI is a cross-platform command-line tool written in Rust, designed specifically to unified management of Provider configurations for multiple AI coding assistants.

Supported applications:

  • Claude Code (default)
  • Codex
  • Gemini CLI
  • OpenCode
  • OpenClaw

It has six core functional modules:

Module What It Does
🔌 Provider Management One-click API provider switching, with speed testing
🛠️ MCP Server Management Unified management of MCP configurations across tools
💬 Prompts Management Backup and switch System Prompts
🎯 Skills Management Install and manage community Skills extensions
🌉 Proxy Management Local multi-app proxy routing control
⚙️ Configuration Management Backup, restore, WebDAV sync

Feature Overview
Figure 2: CC Switch CLI’s six core functional modules

Deep Dive into Core Features

1. Provider Management — One-Click Provider Switching

This is CC Switch’s core feature. Say I have multiple API provider configurations:

1
2
3
4
5
6
7
8
9
10
11
# List all configured providers
cc-switch provider list

# View the currently active provider
cc-switch provider current

# Switch to a specified provider
cc-switch provider switch apiyi-proxy

# Test provider API latency
cc-switch provider speedtest apiyi-proxy

CC Switch stores all provider information in a SQLite database (~/.cc-switch/cc-switch.db), then generates the corresponding configuration files for different applications.

For example, when switching to Claude Code, it updates ~/.claude/settings.json; when switching to Codex, it updates ~/.codex/config.toml. You don’t need to know what each tool’s configuration file looks like — CC Switch handles everything.

Provider Switch Workflow
Figure 3: CC Switch’s complete workflow when executing a Provider switch

2. Cross-Application Unified Management

This is the feature that surprised me most — one --app parameter handles all tools.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# List Claude's providers
cc-switch --app claude provider list

# List Codex's providers
cc-switch --app codex provider list

# View OpenClaw's providers
cc-switch --app openclaw provider list

# Sync MCP servers to Codex
cc-switch --app codex mcp sync

# View Gemini's prompts
cc-switch --app gemini prompts list

This means: No matter how many AI coding tools you use, you can operate them all with the same set of commands.

3. Prompts Management — Prompts You Won’t Lose

Have you ever spent hours crafting the perfect System Prompt, only to lose it when you switched environments?

CC Switch’s Prompts management can:

  • Backup System Prompts for all applications (CLAUDE.md, AGENTS.md, GEMINI.md, etc.)
  • Create multiple prompt presets and switch between them anytime
  • Sync to the cloud via WebDAV, so you won’t lose anything even when switching computers
1
2
3
4
5
6
7
8
9
10
11
# List all prompt presets
cc-switch prompts list

# Create a new preset
cc-switch prompts create "Code Review Mode"

# Activate a preset
cc-switch prompts activate 代码审查模式

# Export to file
cc-switch config export ~/cc-switch-backup.json

4. Skills Management — One-Click Community Skills Installation

CC Switch also supports Skills extension management. Find a good Skill on GitHub? Install and enable it with one command:

1
2
3
4
5
6
7
8
9
10
11
# Search for available Skills
cc-switch skills discover "testing"

# Install
cc-switch skills install superpower-tdd

# Enable the Skill
cc-switch skills enable superpower-tdd --app claude

# Sync to application directory
cc-switch skills sync

This is way more convenient than manually cloning repos and copying files to the correct directories.

5. Configuration Backup & WebDAV Sync

CC Switch automatically backs up configurations to ~/.cc-switch/backups/, keeping the last 10 versions.

1
2
3
4
5
6
7
8
9
10
11
12
# Create a backup
cc-switch config backup --name "before-provider-switch"

# Restore a backup
cc-switch config restore

# Configure WebDAV sync (supports services like Nutstore)
cc-switch config webdav set \
--base-url https://dav.example.com \
--username user \
--password pass \
--enable

With WebDAV sync, my provider configurations from the office automatically sync when I open my laptop at home.

6. Environment Checks

1
2
3
4
5
# Check which AI CLI tools are installed locally
cc-switch env tools

# Check for environment variable conflicts
cc-switch env check

This feature helped me discover ANTHROPIC_API_KEY environment variable conflicts multiple times — some tools set the API Key in environment variables, which caused the configuration file settings to be ignored.

Real-World Usage Experience

After using it for a week, here’s my honest assessment:

Pros:

  1. Drastically reduces repetitive operations: Used to take 14 minutes to switch providers, now one command does it
  2. Centralized configuration management: All provider information in one SQLite database, everything at a glance
  3. High degree of automation: Backup, restore, and sync can all be scripted
  4. Friendly interactive TUI: Don’t remember a command? Just type cc-switch for menu navigation
  5. Multi-language support: Can switch between Chinese and English interfaces

Cons:

  1. Learning curve: New users need to understand how the --app parameter works
  2. Some documentation is outdated: GitHub’s README is updated, but some third-party docs haven’t kept up
  3. No GUI: Users accustomed to desktop apps might find it inconvenient (but I prefer CLI)

My Daily Routine Now

After using CC Switch, my workflow now looks like this:

Arriving at the office in the morning:

1
2
# Check which provider I'm using today
cc-switch provider list

Switching providers:

1
2
3
4
5
6
# One-click switch
cc-switch provider switch rightcode

# Verify success
cc-switch --app claude provider current
cc-switch --app codex provider current

Backing up configuration:

1
2
# Automatic backup
cc-switch config backup

The whole process takes less than a minute, and there’s no risk of editing the wrong file.

Reflection: Configuration Management Is a Discipline

The more AI coding assistants I use, the more I realize: Configuration management is a discipline in itself.

More tools means each tool has its own configuration file format — this is historical baggage, but it’s also reality. However, we can’t be led around by reality.

CC Switch CLI’s solution is clear: So you don’t have to remember what each tool’s configuration file looks like — one set of commands handles everything.

It’s not perfect, but it’s the closest thing I’ve found to achieving “unified management.” If you’re also using multiple AI coding assistants, give it a try.

After all, we’re paying for AI’s capabilities — not paying with our time filling out forms.


Author: An engineer who climbed out of Configuration Hell

Image Descriptions:

CC Switch Central Hub
Image 1: CC Switch as a central hub, unified management of multiple AI coding assistant configurations

TUI Interface Screenshot
Image 2: CC Switch interactive TUI interface, supports menu navigation and real-time status viewing

Author:Margrop
Link:http://blog.margrop.com/post/2026-05-09-cc-switch-cli-ai-cli-provider-switch-en/
版权声明:本文采用 CC BY-NC-SA 3.0 CN 协议进行许可