cc-switch

What does it do?

It is a cross-platform desktop manager for Claude Code, Claude Desktop, Codex, Gemini CLI, and other listed coding tools. [1a][1b] It lets a user switch API providers in one click and manage Skills and Prompts in one place instead of hand-editing configuration files in formats such as JSON, TOML, or YAML. [2]

Activity, over time

Daily observations from the public event archive.

Attention

Daily stars & forks

Loading attention chart

Star accumulation

Cumulative stars

Loading star accumulation chart

Pull requests

Daily opens & merges

Loading pull requests chart

Conversations

Daily issues & comments

Loading conversations chart

Community

Daily accounts & reviews

Loading community chart

Releases

Daily releases

Loading releases chart

Mentions

22posts · 30d
Nov 30 posts
  1. @lidangzzz 用简洁的 GUI 管理多个 Agent 应用的供应商、用量、会话历史、MCP、Skills,稳定、原生、低侵入 farion1231/cc-switch

    7 likes · 1,080 views
  2. DEV · · @dedupedai

    How to switch Claude Code between API providers in one click with CC Switch (and run GPT in it) If you use Claude Code with more than one API provider, you know the routine: open ~/.claude/settings.json, swap the base URL, swap the key, swap the model, hope you did not break the JSON, and do it again tomorrow when you hit a limit. Multiply that by Codex and Gemini CLI, which each keep their own config in their own format, and switching becomes a chore you avoid. CC Switch is a desktop app for Windows, macOS and Linux that does this in one click. Pick a preset, paste a key, press Enable. It manages Claude Code, Claude Desktop, Codex, Gemini CLI, Grok Build, OpenCode, OpenClaw, Hermes Agent, Pi, MiniMax Code, Kimi Code and Oh My Pi, and the README lists 90+ provider presets, including AWS Bedrock and NVIDIA NIM. This guide covers install, your first switch, running GPT or local models inside Claude Code through its routing mode, and the details that trip people up. Install macOS (Homebrew is the recommended route): brew install --cask cc-switch Update later with: brew upgrade --cask cc-switch The macOS build is universal (Apple Silicon and Intel) and is signed and notarized. On Arch Linux: paru -S cc-switch-bin Windows and other Linux users download the .msi, .deb, .rpm or .AppImage from the repo's Releases page. Requirements per the README: Windows 10+, macOS 12+, or Linux with glibc 2.35+ and WebKitGTK 4.1 (Ubuntu 22.04+, Debian 12+). Working on a server over SSH with no desktop? The README points to the community CC Switch CLI, which shares the same ~/.cc-switch data folder: brew install cc-switch-cli Nothing you already have gets lost On first launch, CC Switch imports your existing Claude Code, Codex, Gemini CLI and Grok Build config as a provider called default, and adds an official provider for each tool. Before it rewrites any config file for the first time, it backs up the original to ~/.cc-switch/backups/live-first-write/. It also only touches the key fields when you switch: endpoint, key, model and API protocol. Your plugins, hooks, permissions, MCP servers, your own environment variables and even comments in the file stay as they are. That is the main reason to use it over a shell script that overwrites the whole file. Your first switch 1. Pick the tool in the sidebar (say, Claude Code). 2. Click "+" in the top right and choose a preset, or create a custom config. 3. Paste your API key and save. 4. Select the provider and click "Enable". Claude Code picks up the change without a restart. Codex, Gemini CLI and Grok Build need you to restart the terminal or the CLI. Claude Desktop needs a full quit and reopen. You can also switch from the system tray, which shows one row per tool with its current mode, provider and quota. To go back to your subscription, switch to the built-in "Claude Official" provider and run /login in Claude Code. For Codex, use "OpenAI Official" and codex login. Use GPT, Gemini or a local model inside Claude Code Claude Code speaks the Anthropic Messages format. Many providers, and most local model servers, only offer an OpenAI-style Chat Completions endpoint. CC Switch handles this with Routing mode: it runs a local router on your machine that converts between Anthropic Messages, OpenAI Chat Completions, OpenAI Responses and Gemini's native format. To set it up: 1. Edit the provider and open "Advanced Options". 2. Set "Upstream Format" to match the provider: "OpenAI Chat Completions" for Chat Completions only services (many local servers), "OpenAI Responses API" for Responses endpoints, or "Gemini Native generateContent" for Gemini. 3. On the Claude Code page, open the "Routing" tab and click "Start routing". The README is direct about the failure mode: choosing the wrong format or forgetting to start routing usually gives you a 404 or 405. While routing is on, your Claude Code config points at http://127.0.0.1:15721 with a placeholder key PROXY_MANAGED. That is expected. The real address and key live in CC Switch, and "Usage" in the sidebar shows "requested model to actual model" for each request. Quitting CC Switch writes your direct config back first, so Claude Code keeps working without it. Routing also gives you auto-failover: set a queue of providers per tool, and when a request fails CC Switch moves to the next one. Note that official providers like Claude Official cannot go through routing. Aggregation: several providers in one model picker On the Claude Code and Codex pages there is also an "Aggregation" mode. Add a few providers and their models all appear in the tool's own model list, and each request goes to whichever provider owns the model you picked. Two caveats from the docs: aggregation does not do failover, and Claude Code needs version 2.1.243 or later. Switching models mid-session also rebuilds the prompt cache, so the first turn after a switch costs a bit more. Gotchas - The model resets after a switch. The model is a key field that belongs to the provider. If you change it with /model inside Claude Code, it lasts until your next switch. To keep it, edit the provider in CC Switch. - "Connectivity check" passing does not mean your key works. It only checks the address is reachable. If requests fail, check the key, model name and upstream format, and read the request log under "Usage". - WSL on Windows. Point the tool's config folder at the WSL path (for example \\wsl.localhost\Ubuntu\home\<user>\.claude) in "Settings, App config". For routing, switch WSL2 to mirrored networking, because 127.0.0.1 inside WSL cannot reach the router on Windows in the default NAT mode. Bonus: one place for MCP, skills and prompts CC Switch also has panels to add an MCP server or skill once and sync it to each tool, and a prompt library that writes to CLAUDE.md, AGENTS.md or GEMINI.md. Its usage dashboard tracks tokens, cache hit rate and spending per provider and model from each tool's local session logs, even with routing off. CC Switch or a gateway? CC Switch is for one developer on one machine who wants to flip providers without editing files. If you need a shared, server-side gateway for a team or an app, look at something like LiteLLM, which lets you call 100+ LLMs with one OpenAI-format API. We compare both kinds in the best AI repos for LLM gateways and routers. The short version of this guide, with the exact steps and a prompt, lives on the Deduped page for switching Claude Code providers in one click. --- Get one email every Monday with the week's hottest AI repos and exactly how to use them: subscribe free at dedupedai.com

  3. 现在一个桌面应用就能管理 Claude Code、Codex 和你跑的其他所有编程智能体的账号和设置 cc-switch 拿了 14.6 万颗星,就是因为大家不想再手动切来切去了 farion1231/cc-switch

    3 likes · 1,579 views
  4. YouTube · · YouTube description · AI & Tech Today

    3 Trending GitHub Repos: CC Switch, New API & LocalAI – Where Your AI Calls Go Three repositories trending on GitHub today, explained in plain language: what each one does, how it works, who should try it, how to get started, and where the caveats are. This edition is all about the plumbing between AI tools and AI models: a desktop app that switches providers for your coding agents in one click, a self-hosted gateway that puts one API in front of every model provider for a whole team, and an engine that runs models on your own hardware. ⏱ Chapters 0:00 Intro & this week in dev tools 1:39 CC Switch: one app for your coding agents 4:43 New API: a self-hosted AI gateway 8:03 LocalAI: run any model on your own hardware 11:11 Summary 📦 Repos 1. farion1231/cc-switch – CC Switch, by Jason Young (Rust · MIT)farion1231/cc-switch 2. QuantumNous/new-api – New API, by QuantumNous (Go · AGPL-3.0)QuantumNous/new-api Docs: docs.newapi.ai 3. mudler/LocalAI – LocalAI, by Ettore Di Giacinto and the LocalAI team (Go · MIT)mudler/LocalAI Docs: localai.io 📰 News mentioned • OpenCode Console breach exposes stored API keys (Oct 17): techcrunch.com • VS Code 1.142 adds agent Canvases (Oct 14): code.visualstudio.com • GitHub open source license compliance generally available (Oct 16): github.blog Star counts are as of 21 October 2026. Features and claims are as described in each project's README and release notes; try them in your own setup before relying on them. If you found this useful, like and subscribe for the next round of trending repos. #GitHub #OpenSource #AI #DeveloperTools #LLM

    44 views
  5. V2EX · · 分享创造 · @yicheng47

    Runner 0.17.0 发布:支持 Claude Code 多账号切换 之前在 V 站介绍过 Runner ,是一个管理 CLI agent 的原生桌面工具,本质是一个类似 terminal multiplexer 的工具,可以在同一个 app 中管理不同平台的 agent cli ,也可以把几个 agent 组成 crew 一起协作沟通。 之前的帖子:[我的第一个 300 stars 开源项目 Runner]( v2ex.com) 这次做 claude 多账号切换的初衷主要是我自己用了两年的 Claude 账号最近被封了,用的是 Max 订阅。并且想要再搞出一个新的 max 账号现在太难了,有 [KYC]( support.claude.com),加上越来越严格的检查,感觉普通国内用户想稳定用一个 Max 账号的成本已经显著增加了。 从我自己最近的使用情况来看,Pro 账号的检查相对没那么严格,用多个 Pro 的重度用户也多了起来。这样就需要管理几个账号、看各自的用量,也希望换个账号以后还能接着之前的工作继续做。 所以这次 0.17.0 给 Runner 加了 Claude Code 多账号支持,可以在里面分别登录、查看用量,切换账号以后继续之前的对话。这里单独开一帖,配几张图介绍一下。 ![用量菜单中查看和切换 Claude Code 账号]( raw.githubusercontent.com) 添加另一个账号 ![Agents 设置页:Claude Code 的账号数量和当前账号]( raw.githubusercontent.com) 在 Settings → Agents → Claude Code 的 Accounts 里面,可以看到自己原来用的账号,默认叫 Personal 。点 Add account ,给新账号起个名字,再跟着 Claude Code 的浏览器登录流程走一遍就可以了。如果之前已经用独立目录登录过,也可以直接选择那个目录。 添加以后,两个账号的登录会分别保留,平时切换不用再来回退出和登录。 ![Claude Code 账号设置:独立登录、当前账号和配置共享]( raw.githubusercontent.com) 原来的配置可以继续用 我自己用 Claude Code 会配一些 skills 、MCP 和插件,换个账号以后如果这些都要重新弄一遍,还是挺麻烦的。所以添加账号时,可以勾选 Use Personal’s settings ,继续用主账号的全局 CLAUDE.md 、skills 、MCP 和已启用的插件。 这里主账号和当前使用的账号是分开的:主账号提供共享配置,Active 决定接下来用哪个账号启动会话。比如配置一直用 Personal 的,干活时可以切到 Work 。 新账号已有的本地配置和同名 skill 会保留,登录信息也是各自独立的。 换个账号,继续之前的对话 在用量下拉框里选好账号以后,新开的 chat 和新启动的 Claude Code crew 成员就会使用它。已经在跑的会话会继续使用原来的账号。 已有的 chat 如果也想换账号,可以先 Stop ,选好另一个账号,再点 Resume 。Runner 会接着原来的对话继续,不用重新开一个 chat ,再把项目和做到哪一步介绍一遍。 这一版先做了手动切换,不会在额度用完时自动轮换账号。多账号功能目前也只针对 Claude Code 。 账号切换实现对比 做这个功能的时候,也看了社区里一些工具的实现。大致可以分成两类: 1. 通过反代或者 agent gateway 。 客户端先把请求交给一个中间服务,由它选择账号、转发请求,有的还会做协议转换。具体实现也有区别,比如 [Magpie 的 Claude gateway]( github.com/yetone/magpie/blob/main/docs/subsystem…),是由 gateway 调用真实的 Claude Code ,再由 Claude Code 向 Anthropic 发起请求。 2. 原生 CLI 直连,在本机切换账号。 不额外加模型请求代理,还是由 Claude Code 自己发请求。这里又可以分成替换登录凭据和切换账号目录两种做法,所以 direct mode 不一定就是切目录。 [Anthropic 官方文档里的多账号用法]( code.claude.com)是给每个账号一个独立的配置目录,用 CLAUDE_CONFIG_DIR 来选择。例如个人账号继续直接运行 claude,工作账号用 CLAUDE_CONFIG_DIR=~/.claude-work claude,各自在自己的目录下登录。 对 Runner 来说,我觉得沿用这个官方提供的机制是最稳妥的选择。Runner 本来就在管理本机的 CLI 进程,经常会有几个 agent 同时跑。每个账号保留自己的登录状态和凭据存储,登录、保存凭据和 token 刷新都交给 Claude Code ,Runner 负责启动时选好目录。从登录状态的稳定性和账号凭据管理上,这样我会更放心一些。 Runner 具体怎么做 - 登录和凭据: 添加账号时,在对应目录下运行 claude auth login,走 Claude Code 自己的浏览器登录流程。macOS 上凭据由 Claude Code 放进对应的 Keychain 项,Windows 上放在对应目录的凭据文件里。Runner 保存账号名字、目录等信息,不另外保存一份供切换用的凭据;查看用量时会读取本机凭据,查询对应账号的用量。 - 启动和切换: 原来的账号保持原来的启动方式,额外账号通过 CLAUDE_CONFIG_DIR 指定目录。切换 Active 账号,只影响接下来新开或恢复的会话,已经在跑的 agent 继续用自己的账号。在 Runner 外面直接打开的 Claude Code 也继续使用原来的默认登录。 - 共享配置: 目录分开以后,skills 、MCP 和插件这些也需要处理。Runner 按需链接主账号的 CLAUDE.md 、skills 等内容,settings 、MCP 和插件通过启动参数带入,保留各账号已有的本地文件和插件状态。所以账号可以分别登录,常用配置仍然可以共用。 - 继续原来的对话: Runner 会记住对话文件最初在哪个目录。换账号恢复时,用 claude --resume <原对话文件路径> 接着原来的记录继续,不需要把历史复制到新账号目录,也不用从头开一个 chat 。 和 Magpie direct mode 的区别 [Magpie 的 direct mode]( github.com/yetone/magpie/blob/main/internal/provi…) 会记住多个账号的凭据,切换时先保存当前账号的最新凭据,再把选中账号的凭据写回 Claude Code 原来使用的位置。这样配置和历史可以一直留在同一个目录,切换工具需要处理凭据的保存、替换和刷新后的同步。 Runner 这里切的是启动时使用的目录,每个账号的凭据留在各自的存储里。相应地,Runner 要多处理共享配置和跨目录恢复对话。这是两种实现各自需要处理的事情,也和 Runner 本身就管理会话的功能有关。 另外,Magpie 的 [gateway 内部也会给 Claude 账号使用独立目录]( github.com/yetone/magpie/blob/main/internal/provi…)。所以这个区别具体说的是它切换原生 Claude Code 登录的 direct mode ,独立目录也不是 Runner 特有的做法。 和 CC Switch 的区别 [CC Switch]( github.com/farion1231/cc-switch/blob/main/README.…) 在 Claude Code 这一侧主要是切换 provider 配置。Direct 模式会修改配置里的 endpoint 、key 、模型等字段; Routing 模式则让请求经过它的本地路由,可以做协议转换和故障切换。Claude Official 使用 Claude Code 自己的登录,不经过本地 Routing 。 按它目前的文档,Accounts 里的多订阅账号管理列出的是 ChatGPT 、GitHub Copilot 和 Grok 。它的 Claude provider 切换,和 Runner 这次做的几个 Claude 订阅账号各自登录、切换后继续同一个会话,处理的需求有所不同。 下载和反馈 Repo: yicheng47/runner 官网: runnersh.dev 下载: runnersh.dev 版本说明:[Runner 0.17.0]( github.com/yicheng47/runner/releases/tag/v0.17.0) 支持 macOS ( Apple Silicon )和 Windows x64 ( Windows 10 1809 及以上)。 有多个 Claude 账号的朋友可以试试看,有问题在楼里反馈,或者到 GitHub 提 issue 都可以。也欢迎分享自己平时是怎么切换账号的,看看还有哪些地方可以做得方便一点。

  6. CC Switch حساب‌های Coding Agent رو مدیریت می‌کنه برای جابه‌جایی بین Claude Code و Codex، تنظیمات و حساب‌ها رو یک‌جا نگه می‌داره. اوپن‌سورس و دسکتاپیه. farion1231/cc-switch

    3 likes · 126 views
  7. Reddit · · r/ClaudeCode · u/IvanovAlex

    MultiClaude (fork of CC Switch) for Claude Desktop and Science! Hello! I made MultiClaude, a fork of CC Switch focused on Claude Desktop and Claude Science: iaa2005/multi-claude What it adds: - Aggregation for Claude Desktop. Desktop sees one gateway, but the model picker shows models from several providers at once (e.g. DeepSeek, Xiaomi MiMo, OpenRouter, a local model). Add or remove a provider and the list updates without restarting Desktop. Each model is listed once, the reasoning effort picker works, and Direct mode returns Desktop to your claude.ai account. - Claude Science support. Routing or Aggregation through a third-party provider, Direct for the official account. Your model settings are saved per mode and restored when you switch back. - Separate usage stats for Claude Desktop and Claude Science, priced at the real model. - Claude Code + DeepSeek fix: no more 422 unknown variant tool_definition when an MCP server connects mid-session. - Russian UI, its own auto-updates, and a separate data folder, so it runs alongside the original CC Switch. Limitation: a Claude subscription can't be mixed into Desktop's aggregation. Third-party providers use their own API keys; Claude itself via an API key works. Windows build (installer or portable exe) is in Releases. Feedback and issues welcome!

    1 comment
  8. One desktop app now manages accounts and settings for Claude Code, Codex, and every other coding agent you run cc-switch hit 146k stars because people got tired of switching tools manually farion1231/cc-switch

    51 likes · 6 reposts · 44,968 views
  9. Qiita · · @folkbench

    Claude Code / Codex / Gemini CLI の接続先切り替えで設定ファイルを壊さないためのデスクトップアプリを作った(Folkbench Switch・ベータ) > 最初にお断り: この記事で紹介する Folkbench Switch は私が作ったものです。プロバイダーの稼働率・レイテンシ・価格を計測して公開している folkbench.com と同じリポジトリに入っています。とはいえ、公式 API を含め、互換エンドポイントならどれでも使えます。 はじめに AI コーディング CLI を毎日使っていると、API の接続先が 1 つでは足りなくなってきませんか。 - 長めのリファクタリング中に公式 API のレート制限に引っかかる - モデルが "at capacity" で使えない - まとめて投げるタスクは安いプロバイダーで十分 - チームでは共有プロキシ経由にしている CLI 自体はどれも便利なのですが、プロバイダーの切り替えは今でもほぼ手作業です。この記事では、各ツールが接続設定をどこに持っているか、手で書き換えると何が起きがちか、そして切り替えを「退屈で、いつでも戻せる作業」にするために作った小さな OSS デスクトップアプリを紹介します。 各ツールの接続設定はどこにあるか | ツール | ファイル | 変える必要があるもの | |---|---|---| | Claude Code | ~/.claude/settings.json | Base URL と、正しい認証情報の種類(auth token か API key か) | | Codex | ~/.codex/config.toml | カスタム model provider のブロック。ChatGPT の OAuth ログイン情報もすぐ隣にある | | Gemini CLI | ~/.gemini/.env + ~/.gemini/settings.json | 環境変数と認証方式の両方を揃える | | Aider | ~/.aider.conf.yml | モデル名と API エンドポイント | | OpenCode | ~/.config/opencode/ | プロバイダーのマッピングとキー(プロトコルに合った SDK も) | | Kimi CLI | ~/.kimi-code または ~/.kimi | CLI のバージョン次第 | ファイルにまとめるとこうなります。 ~/.claude/settings.json # Claude Code (JSON) ~/.codex/config.toml # Codex (TOML) ~/.codex/auth.json # Codex の認証情報(OAuth の退避・復元対象) ~/.gemini/.env # Gemini CLI (dotenv) ~/.gemini/settings.json # Gemini CLI (JSON, 認証方式) ~/.aider.conf.yml # Aider (YAML) ~/.config/opencode/ # OpenCode ~/.kimi-code または ~/.kimi # Kimi CLI(バージョンによる) JSON、TOML、YAML、dotenv とフォーマットはバラバラで、「どのフィールドが重要か」もツールごとに違います。 手で書き換えると起きがちなこと 1. 関係ない設定まで消える。 「動いていた settings.json」をコピペで上書きすると、permissions や hooks、モデルの好みまで消えます。 2. 2 つの設定がずれる。 Gemini CLI は .env と settings.json の認証方式が一致している必要があり、片方だけ変えると分かりにくい認証エラーになります。 3. Codex にログインし直しになる。 私の環境では、Codex をサードパーティのプロバイダーに向けてから戻すと、ChatGPT の OAuth をブラウザでやり直す羽目になることがよくありました。 4. 作業中に集中が切れる。 プロバイダーが 502 を返し始めたら、ターミナルを離れてファイルを編集し、CLI を再起動……で思考が途切れます。 5. 人に教えるのがつらい。 プログラマーではない友人何人かに、チャットで「ここに Base URL を貼って」とスクショを送りながら Claude Code をセットアップしました。もうやりたくありません。 作ったもの: Folkbench Switch Folkbench Switch は Tauri + Rust(フロントエンドは React/Vite)製のデスクトップアプリです。apps/switch/ 配下は Apache-2.0 で、macOS と Windows 向けに配布しています。設計方針は次のとおりです。 プロファイル方式(ファイルを丸ごとコピーしない) プロバイダーを「Base URL + API キー」として保存します(1 つのプロバイダーに複数のキーとメモを持てます)。プロファイルを適用すると、対象ツールの接続関連のフィールドだけを書き換え、それ以外の設定はそのまま残します。 書き込む前に diff を見せる 対象ファイルの何がどう変わるのかを、書き込み前に確認できます。 失うものは退避しておく Codex をサードパーティのプロバイダーに切り替えるとき、公式の ChatGPT OAuth 認証情報(~/.codex/auth.json)を退避し、公式に戻すときに復元します。 失敗しても安全側に倒す - 書き込みに失敗した場合、ロールバックするのは自分が書いた分だけ - 読み込んだ後にファイルが外部で変更されていたら、上書きせずに止まる - 共有の書き込みロックと多重起動防止で、2 つの書き込みが競合しないようにしている ローカル完結が基本(通信はソースコードで確認済み) - テレメトリーも同期もありません - WebView の CSP で直接の HTTP 通信は塞いであり、通信はすべて Rust 側を通ります - API キーが送られるのは、そのキーのプロバイダーに対してだけです(モデル一覧の取得や残高確認をしたとき)。リダイレクトは同一オリジンにのみ追従します - 「接続チェック」ボタンはキーを送らずに Base URL に GET するだけです - 自動で行う通信は 1 つだけで、起動時に folkbench.com から公開ランキングを匿名で GET します(キーも設定も送りません) - Folkbench へのサインインは任意で、スキップできます - アップデート確認は手動のみで、署名検証付きです その他の機能 - セッションごとのトークン使用量とコスト見積もり。 ローカルのツールログから読み、公開されている参考価格で計算します - 切り替える前にプロバイダーの状態を確認。 folkbench.com の公開している稼働率・レイテンシをアプリ内で見られます - シンプルモード。 モデルを選ぶ → プロバイダーを選ぶ → キーを貼る → 作業フォルダを選ぶ → 起動、で完了。Node/npm/Homebrew がなければ検出してインストールコマンドを表示します。友人に渡しているのはこのモードです(細かく触りたい人向けに Pro モードもあります) 対応ツール Claude Code、Codex、Gemini CLI、Aider、OpenCode、Kimi CLI、DeepSeek Harness に対応しています。MiniMax Code、Qwen Code、Grok Build、Hermes、Pi は対応作業中です。 ローカル LLM サーバー Ollama や LM Studio はカスタム Base URL として使えます。http:// が使えるのは localhost / ループバックのみで、それ以外のホストは https:// が必要です。 http://localhost:11434/v1 # Ollama: OK http://127.0.0.1:1234/v1 # LM Studio: OK http://192.168.1.10:11434 # LAN 上の別マシン: 拒否される(https:// が必要) プリセットはまだありません。 他のツールとの比較 この分野では cc-switch が定番で機能も豊富です。あらゆる設定を触りたいならそちらがいい選択だと思います。Folkbench Switch はもっと絞っていて、初心者向けのフロー、書き込み前の diff、Codex の OAuth 保持に重点を置いています。dotfiles に慣れている方なら、ANTHROPIC_BASE_URL を切り替えるシェルの alias だけで十分かもしれません。 現時点での制限(正直に書きます) - ベータ版(0.1.0-beta.4)です。荒削りなところはあります - macOS / Windows のみ。 Linux 向けインストーラーはまだありません(CI では Ubuntu でビルド・テストしています) - Windows 版はコード署名(Authenticode)していません。 SmartScreen の警告が出ます。macOS 版は Developer ID 署名 + 公証済みです - API キーは OS のキーチェーンではなく、アプリの設定ディレクトリにある credentials.json に平文で保存されます。 Unix ではパーミッション 0600(所有者のみ)で書き込みますが、暗号化はしていません - Homebrew / winget / scoop での配布はまだなく、GitHub Releases からのダウンロードのみです(SHA256SUMS あり) - ローカル LLM サーバーのプリセットはまだありません 使ってみて、壊れたところを教えてください - ダウンロード(SHA256 チェックサム付き): github.com/Folkbench/folkbench/releases - ソースコード: github.com/Folkbench/folkbench/tree/main/apps/swi… - Issue: github.com/Folkbench/folkbench/issues 特に知りたいのは設定まわりのエッジケースです。ちょっと変わった Claude Code の認証設定、Codex の複数プロファイル、まだ対応できていない OpenCode のプロバイダーなど。「この設定で壊れた」という報告がいちばん助かります。コメントでも Issue でも歓迎です。

    1 like
  10. DEV · · @folkbench

    One config, many providers: safely switching Claude Code, Codex and Gemini CLI between API endpoints --- title: "One config, many providers: safely switching Claude Code, Codex and Gemini CLI between API endpoints" published: true tags: claude, ai, opensource, rust --- If you use AI coding CLIs every day, you probably have more than one API provider. The reasons vary: the official API rate-limits you during a long refactor, a model shows "at capacity", a cheaper provider is good enough for bulk tasks, or your team routes everything through a shared proxy. The tools themselves are great. Switching between providers is still mostly manual. This post covers where each tool keeps its connection settings, what goes wrong when you edit them by hand, and the small open-source desktop app I built to make switching boring and reversible. > Disclosure up front: I wrote the app. It lives in the same repo as folkbench.com, which publishes provider uptime/latency/price measurements. Everything below works with any compatible endpoint, official ones included. Where each tool keeps its connection settings | Tool | File(s) | What has to change | |---|---|---| | Claude Code | ~/.claude/settings.json | Base URL, and the right credential type (auth token vs. API key) | | Codex | ~/.codex/config.toml | A custom model provider block. Your ChatGPT OAuth login lives alongside it. | | Gemini CLI | ~/.gemini/.env + ~/.gemini/settings.json | Env vars and the auth method, kept in sync | | Aider | ~/.aider.conf.yml | Model name and API endpoint | | OpenCode | ~/.config/opencode/ | Provider mapping + key (and the right SDK per protocol) | | Kimi CLI | ~/.kimi-code or ~/.kimi | Depends on CLI version | Every tool uses a different format: JSON, TOML, YAML, dotenv. Each has its own idea of which fields matter. What goes wrong when you do it by hand 1. You clobber unrelated settings. Copy-pasting a "known good" settings.json over yours wipes permissions, hooks and model preferences. 2. Two fields drift apart. Gemini CLI needs both the .env and the auth type in settings.json to agree. Change one and you get confusing auth errors. 3. Codex forgets who you are. In my experience, pointing Codex at a third-party provider and then back often meant redoing the ChatGPT OAuth browser flow. 4. Mid-task context switch. A provider throws 502s, you leave the terminal, edit a file, restart the CLI, and lose your train of thought. 5. Helping friends doesn't scale. I set Claude Code up for several non-programmer friends over chat, sending screenshots of where to paste the Base URL. Never again. The approach: profiles + diff + scoped writes Folkbench Switch is a Tauri + Rust desktop app (Apache-2.0, macOS and Windows) built around a few rules: - Profiles, not file copies. You save providers as Base URL + key (several keys per provider, with notes). Applying a profile writes only the connection fields for the target tool. - Show the diff first. Before it writes, you see exactly what will change in the target file. - Stash what you'd lose. When Codex is switched to a third-party provider, the official OAuth credentials are stashed and restored when you switch back. - Fail safe. If a write fails, only that write is rolled back. If the file was changed externally since it was read, the app stops instead of overwriting. A shared write lock and a single-instance guard prevent two writers racing. - Local by default. Keys and configs stay on your disk (keys in an owner-only 0600 file in the app's config dir). The webview's CSP blocks direct HTTP; every request goes through the Rust side. A key is only sent to the provider it belongs to, when you load that provider's model list or check its balance, and redirects are followed only within the same origin. There's no telemetry or sync. At startup the app makes an anonymous GET for public rankings from folkbench.com. Signing in to Folkbench is optional, and update checks are manual and signature-verified. Other things that turned out useful: - Per-session token usage and cost estimate, read from local tool logs and priced at public reference rates. - Provider health before switching. The app can show public uptime/latency probes from folkbench.com, so you can see whether a route is up before you move to it. - Simple mode. Pick a model, pick a provider, paste a key, choose a working folder, launch. It detects missing Node/npm/Homebrew and shows the install command. This is the mode I give to friends. How it compares cc-switch is the established, feature-rich tool in this space, and if you want every knob it's a good choice. Folkbench Switch is narrower: a beginner-first flow, diff-before-write, and Codex OAuth preservation. If you're comfortable with dotfiles, a shell alias that swaps ANTHROPIC_BASE_URL may be all you need. Current limitations - 0.1.0-beta.4. Expect rough edges. - The Windows installer is not Authenticode-signed yet (SmartScreen will warn). macOS builds are Developer ID signed and notarized. - No Linux installer yet. CI compiles and tests on Ubuntu, but releases are macOS/Windows only. - Local model servers (Ollama, LM Studio) work as a custom Base URL; plain http:// is accepted for localhost/loopback only. There are no presets yet. - Keys are not in the OS keychain yet. - MiniMax Code, Qwen Code, Grok Build, Hermes and Pi support is still in progress. Try it / tell me what breaks - Downloads (with SHA256 checksums): github.com/Folkbench/folkbench/releases - Source: github.com/Folkbench/folkbench/tree/main/apps/swi… - Issues: github.com/Folkbench/folkbench/issues I'm most interested in config edge cases: unusual Claude Code credential setups, multiple Codex profiles, OpenCode providers I haven't handled. Comments and issues are both fine.

Latest stargazers

The last 10 distinct accounts we observed this year.

Most active participants

PR, issue, comment & review events in the past year.

Packages

2
PackageVersionDownloads · 30dTrend · 30d
cc-switchv0.3.1
v0.3.1——
———

README badges

Embed a badge in your README or website.

Live mentions · last 30 days
farion1231/cc-switch mentions in the last 30 days