gitmyhub

z-switch

Rust ★ 21 updated 13d ago

Claude Code 与 Codex 的桌面供应商一键切换器:直连原子改写或本地代理热切换,内置官方账号卡片与供应商体检。One-click provider switcher for Claude Code & Codex. 跨平台 · 开源 · 无广告 · 无返利链接 · Tauri + Rust.

A desktop app that lets you one-click switch which AI API provider tools like Claude Code, Codex, or Grok connect to.

RustTauriReactTypeScriptsetup: easycomplexity 2/5

z-switch is a desktop app for people who use AI coding tools like Claude Code, Codex, or Grok through multiple API providers, such as official accounts or third-party relay services. Instead of manually editing configuration files every time you want to switch which provider a tool talks to, z-switch lets you manage several providers as cards and switch between them with one click.

It works in two ways. The default mode directly and safely rewrites the coding tool's own configuration files, so the change takes effect the next time that tool reads its config. An experimental second mode runs a small local proxy on your machine, letting you swap which provider is being used while the tool keeps running, without needing to restart it. On first launch, the app saves a copy of your existing Claude Code and Codex settings and automatically builds an official account card, plus imports any relay provider you already had configured.

Each provider card can be tested before use: the app can check that the address responds, fetch the list of available models, measure response speed, and send a small real test message to see how long the provider takes to reply. For Claude, you can configure separate settings for its different model tiers; for Codex you can choose between two connection styles; Grok uses a single model with a configurable context size. The app can also optionally sync your provider choice to the separate Claude desktop chat app and to the Claude Code extension for VS Code.

All data stays on the device: there is no cloud upload or usage tracking, and API keys or test message contents are never written to log files. Every configuration change is saved atomically with a backup taken beforehand, and the original settings from before you ever used z-switch can be restored at any time. The project is open source under the MIT license, contains no ads, and states it carries no referral links. It is built with Tauri, Rust, React, and TypeScript, and runs on Windows, macOS, and Linux.

Where it fits