farion1231/cc-switch/main 3.4M tokens More Tools
```
├── .gitattributes (omitted)
├── .github/
   ├── CODEOWNERS (100 tokens)
   ├── FUNDING.yml
   ├── ISSUE_TEMPLATE/
      ├── bug_report.yml (500 tokens)
      ├── config.yml (100 tokens)
      ├── doc_issue.yml (300 tokens)
      ├── feature_request.yml (400 tokens)
      ├── question.yml (300 tokens)
   ├── dependabot.yml (100 tokens)
   ├── labeler.yml (400 tokens)
   ├── pull_request_template.md (100 tokens)
   ├── workflows/
      ├── ci.yml (1500 tokens)
      ├── claude.yml (800 tokens)
      ├── labeler.yml (100 tokens)
      ├── release.yml (5.8k tokens)
      ├── stale.yml (300 tokens)
      ├── sync-r2.yml (2k tokens)
      ├── wsl2-nightly.yml (700 tokens)
├── .gitignore (100 tokens)
├── .node-version
├── CHANGELOG.md (89.9k tokens)
├── CODE_OF_CONDUCT.md (1500 tokens)
├── CONTRIBUTING.md (1700 tokens)
├── LICENSE (omitted)
├── README.md (9.1k tokens)
├── README_DE.md (10.2k tokens)
├── README_JA.md (6.5k tokens)
├── README_ZH.md (5.6k tokens)
├── SECURITY.md (2000 tokens)
├── SUPPORT.md (400 tokens)
├── assets/
   ├── partners/
      ├── banners/
         ├── fable5.png
         ├── glm-en.jpg
         ├── glm-zh.jpg
         ├── kimi-banner-en.png
         ├── kimi-banner-zh.png
         ├── minimax-en.jpeg
         ├── minimax-zh.jpeg
      ├── logos/
         ├── TeamoRouter-banner.png
         ├── a6-banner-en.jpg
         ├── a6-banner-zh.jpg
         ├── aicodemirror.jpg
         ├── aicoding.jpg
         ├── aigocode.png
         ├── apikey_banner.png
         ├── apinebula_banner.png
         ├── atlascloud_banner.png
         ├── byteplus.png
         ├── ccsub.svg (8.9k tokens)
         ├── chefshop.png
         ├── claudeapi.png
         ├── claudecn.jpg
         ├── code0.png
         ├── crazyrouter.jpg
         ├── crazyrouter.png
         ├── cubence.png
         ├── dds.png
         ├── dmx-en.jpg
         ├── dmx-zh.jpeg
         ├── etok.png
         ├── fenno-banner.png
         ├── huoshan.png
         ├── lioncc.png
         ├── mikubanner.svg (3.4k tokens)
         ├── nekocode-banner.png
         ├── newapi-banner.png
         ├── packycode.png
         ├── pateway.png
         ├── ppio-banner.png
         ├── rightcode.jpg
         ├── runapi.jpg
         ├── shengsuanyun.png
         ├── shengsuanyun.svg (23.7k tokens)
         ├── silicon_en.jpg
         ├── silicon_zh.jpg
         ├── sssaicode.png
         ├── subrouter-banner.png
         ├── ucloud.png
         ├── unity2.jpg
         ├── zetaapi-banner.png
   ├── screenshots/
      ├── add-en.png
      ├── add-ja.png
      ├── add-zh.png
      ├── main-en.png
      ├── main-ja.png
      ├── main-zh.png
├── components.json (100 tokens)
├── deplink.html (19.7k tokens)
├── docs/
   ├── guides/
      ├── claude-codex-routing-guide-en.md (3.4k tokens)
      ├── claude-codex-routing-guide-ja.md (2.1k tokens)
      ├── claude-codex-routing-guide-zh.md (1500 tokens)
      ├── codex-claude-routing-guide-en.md (2.6k tokens)
      ├── codex-claude-routing-guide-ja.md (1600 tokens)
      ├── codex-claude-routing-guide-zh.md (1200 tokens)
      ├── codex-deepseek-routing-guide-en.md (2.5k tokens)
      ├── codex-deepseek-routing-guide-ja.md (1600 tokens)
      ├── codex-deepseek-routing-guide-zh.md (1200 tokens)
      ├── codex-desktop-custom-model-visibility-en.md (900 tokens)
      ├── codex-desktop-custom-model-visibility-ja.md (500 tokens)
      ├── codex-desktop-custom-model-visibility-zh.md (400 tokens)
      ├── codex-kimi-routing-guide-en.md (1800 tokens)
      ├── codex-kimi-routing-guide-ja.md (1200 tokens)
      ├── codex-kimi-routing-guide-zh.md (900 tokens)
      ├── codex-official-auth-preservation-guide-en.md (2.3k tokens)
      ├── codex-official-auth-preservation-guide-ja.md (1500 tokens)
      ├── codex-official-auth-preservation-guide-zh.md (1200 tokens)
      ├── codex-unified-session-history-guide-en.md (8.6k tokens)
      ├── codex-unified-session-history-guide-ja.md (5k tokens)
      ├── codex-unified-session-history-guide-zh.md (3.6k tokens)
      ├── proxy-guide-zh.md (500 tokens)
   ├── images/
      ├── claude-codex-routing/
         ├── 01-claude-providers-require-routing.png
         ├── 02-responses-provider-form.png
         ├── 03-codex-oauth-form.png
      ├── codex-claude-routing/
         ├── 01-codex-providers-require-routing.png
         ├── 02-claude-codex-provider-form.png
         ├── 03-anthropic-advanced-options.png
         ├── 04-local-route-codex-takeover.png
      ├── codex-deepseek-routing/
         ├── 01-codex-providers-require-routing.png
         ├── 02-deepseek-codex-routing-form.png
         ├── 03-local-route-codex-takeover.png
      ├── codex-kimi-routing/
         ├── 01-codex-providers-require-routing.png
         ├── 02-kimi-codex-routing-form.png
         ├── 03-local-route-codex-takeover.png
      ├── codex-official-auth-preservation/
         ├── 01-codex-app-enhancement-setting.png
   ├── pi-frontend-uiux-guidelines-zh.md (1900 tokens)
   ├── pi-live-provider-sync-requirements-zh.md (700 tokens)
   ├── pi-native-contract-zh.md (600 tokens)
   ├── pi-thinking-level-map-requirements-zh.md (500 tokens)
   ├── release-notes/
      ├── v3.10.0-en.md (1700 tokens)
      ├── v3.10.0-ja.md (1200 tokens)
      ├── v3.10.0-zh.md (1000 tokens)
      ├── v3.11.0-en.md (3.2k tokens)
      ├── v3.11.0-ja.md (2k tokens)
      ├── v3.11.0-zh.md (1700 tokens)
      ├── v3.11.1-en.md (1300 tokens)
      ├── v3.11.1-ja.md (900 tokens)
      ├── v3.11.1-zh.md (800 tokens)
      ├── v3.12.0-en.md (2.3k tokens)
      ├── v3.12.0-ja.md (1600 tokens)
      ├── v3.12.0-zh.md (1400 tokens)
      ├── v3.12.1-en.md (1300 tokens)
      ├── v3.12.1-ja.md (1000 tokens)
      ├── v3.12.1-zh.md (900 tokens)
      ├── v3.12.2-en.md (1500 tokens)
      ├── v3.12.2-ja.md (1000 tokens)
      ├── v3.12.2-zh.md (900 tokens)
      ├── v3.12.3-en.md (3k tokens)
      ├── v3.12.3-ja.md (2.1k tokens)
      ├── v3.12.3-zh.md (1800 tokens)
      ├── v3.13.0-en.md (5.1k tokens)
      ├── v3.13.0-ja.md (3.3k tokens)
      ├── v3.13.0-zh.md (2.7k tokens)
      ├── v3.14.0-en.md (5.1k tokens)
      ├── v3.14.0-ja.md (3.7k tokens)
      ├── v3.14.0-zh.md (3k tokens)
      ├── v3.14.1-en.md (2.4k tokens)
      ├── v3.14.1-ja.md (1600 tokens)
      ├── v3.14.1-zh.md (1400 tokens)
      ├── v3.15.0-en.md (5.8k tokens)
      ├── v3.15.0-ja.md (4.1k tokens)
      ├── v3.15.0-zh.md (3.2k tokens)
      ├── v3.16.0-en.md (6.1k tokens)
      ├── v3.16.0-ja.md (4.3k tokens)
      ├── v3.16.0-zh.md (3.4k tokens)
      ├── v3.16.1-en.md (3.6k tokens)
      ├── v3.16.1-ja.md (2.5k tokens)
      ├── v3.16.1-zh.md (2000 tokens)
      ├── v3.16.2-en.md (5.5k tokens)
      ├── v3.16.2-ja.md (3.8k tokens)
      ├── v3.16.2-zh.md (3.3k tokens)
      ├── v3.16.3-en.md (6.3k tokens)
      ├── v3.16.3-ja.md (4.4k tokens)
      ├── v3.16.3-zh.md (3.4k tokens)
      ├── v3.16.4-en.md (7.3k tokens)
      ├── v3.16.4-ja.md (5k tokens)
      ├── v3.16.4-zh.md (4k tokens)
      ├── v3.16.5-en.md (6.2k tokens)
      ├── v3.16.5-ja.md (4.1k tokens)
      ├── v3.16.5-zh.md (3.3k tokens)
      ├── v3.17.0-en.md (9.8k tokens)
      ├── v3.17.0-ja.md (4.9k tokens)
      ├── v3.17.0-zh.md (4.6k tokens)
      ├── v3.18.0-en.md (9.3k tokens)
      ├── v3.18.0-ja.md (5.7k tokens)
      ├── v3.18.0-zh.md (4.3k tokens)
      ├── v3.19.0-en.md (10k tokens)
      ├── v3.19.0-ja.md (6.1k tokens)
      ├── v3.19.0-zh.md (4.3k tokens)
      ├── v3.19.1-en.md (9k tokens)
      ├── v3.19.1-ja.md (5.6k tokens)
      ├── v3.19.1-zh.md (4.1k tokens)
      ├── v3.19.2-en.md (6.7k tokens)
      ├── v3.19.2-ja.md (4.3k tokens)
      ├── v3.19.2-zh.md (3.2k tokens)
      ├── v3.20.0-en.md (12.1k tokens)
      ├── v3.20.0-ja.md (7.8k tokens)
      ├── v3.20.0-zh.md (6.1k tokens)
      ├── v3.6.0-en.md (2k tokens)
      ├── v3.6.0-zh.md (1000 tokens)
      ├── v3.6.1-en.md (3.1k tokens)
      ├── v3.6.1-zh.md (1600 tokens)
      ├── v3.7.0-en.md (2.2k tokens)
      ├── v3.7.0-zh.md (1300 tokens)
      ├── v3.7.1-en.md (2.5k tokens)
      ├── v3.7.1-zh.md (1400 tokens)
      ├── v3.8.0-en.md (1900 tokens)
      ├── v3.8.0-ja.md (1200 tokens)
      ├── v3.8.0-zh.md (1200 tokens)
      ├── v3.9.0-en.md (1800 tokens)
      ├── v3.9.0-ja.md (1200 tokens)
      ├── v3.9.0-zh.md (1100 tokens)
   ├── user-manual/
      ├── README.md (100 tokens)
      ├── assets/
         ├── claude-desktop-add-provider-en.png
         ├── claude-desktop-add-provider-ja.png
         ├── claude-desktop-add-provider.png
         ├── claude-desktop-import-from-claude-en.png
         ├── claude-desktop-import-from-claude-ja.png
         ├── claude-desktop-import-from-claude.png
         ├── claude-desktop-model-mapping-rows-en.png
         ├── claude-desktop-model-mapping-rows-ja.png
         ├── claude-desktop-model-mapping-rows.png
         ├── claude-desktop-panel-en.png
         ├── claude-desktop-panel-ja.png
         ├── claude-desktop-panel.png
         ├── claude-desktop-route-toggle-context-en.png
         ├── claude-desktop-route-toggle-context-ja.png
         ├── claude-desktop-route-toggle-context.png
         ├── image-20260108001629138.png
         ├── image-20260108002153668.png
         ├── image-20260108002626389.png
         ├── image-20260108002807657.png
         ├── image-20260108004348993.png
         ├── image-20260108004734882.png
         ├── image-20260108004946288.png
         ├── image-20260108005327817.png
         ├── image-20260108005723522.png
         ├── image-20260108005739731.png
         ├── image-20260108010110382.png
         ├── image-20260108010253926.png
         ├── image-20260108010308060.png
         ├── image-20260108010324583.png
         ├── image-20260108011338922.png
         ├── image-20260108011353927.png
         ├── image-20260108011730105.png
         ├── image-20260108011742847.png
         ├── image-20260108011859974.png
         ├── image-20260108011907928.png
         ├── image-20260108011915381.png
         ├── image-20260108011933565.png
         ├── local-routing-display-setting-en.png
         ├── local-routing-display-setting-ja.png
         ├── local-routing-display-setting.png
      ├── en/
         ├── 1-getting-started/
            ├── 1.1-introduction.md (600 tokens)
            ├── 1.2-installation.md (900 tokens)
            ├── 1.3-interface.md (1400 tokens)
            ├── 1.4-quickstart.md (700 tokens)
            ├── 1.5-settings.md (2.8k tokens)
         ├── 2-providers/
            ├── 2.1-add.md (5.9k tokens)
            ├── 2.2-switch.md (800 tokens)
            ├── 2.3-edit.md (900 tokens)
            ├── 2.4-sort-duplicate.md (400 tokens)
            ├── 2.5-usage-query.md (2.1k tokens)
            ├── 2.6-claude-desktop.md (2.8k tokens)
         ├── 3-extensions/
            ├── 3.1-mcp.md (1200 tokens)
            ├── 3.2-prompts.md (800 tokens)
            ├── 3.3-skills.md (1600 tokens)
            ├── 3.4-sessions.md (1100 tokens)
            ├── 3.5-workspace.md (500 tokens)
         ├── 4-proxy/
            ├── 4.1-service.md (1100 tokens)
            ├── 4.2-routing.md (900 tokens)
            ├── 4.3-failover.md (1300 tokens)
            ├── 4.4-usage.md (2.4k tokens)
            ├── 4.5-model-test.md (1100 tokens)
         ├── 5-faq/
            ├── 5.1-config-files.md (1500 tokens)
            ├── 5.2-questions.md (2.2k tokens)
            ├── 5.3-deeplink.md (1400 tokens)
            ├── 5.4-env-conflict.md (700 tokens)
         ├── README.md (1400 tokens)
      ├── ja/
         ├── 1-getting-started/
            ├── 1.1-introduction.md (400 tokens)
            ├── 1.2-installation.md (700 tokens)
            ├── 1.3-interface.md (900 tokens)
            ├── 1.4-quickstart.md (400 tokens)
            ├── 1.5-settings.md (2000 tokens)
         ├── 2-providers/
            ├── 2.1-add.md (4.1k tokens)
            ├── 2.2-switch.md (500 tokens)
            ├── 2.3-edit.md (500 tokens)
            ├── 2.4-sort-duplicate.md (200 tokens)
            ├── 2.5-usage-query.md (1400 tokens)
            ├── 2.6-claude-desktop.md (2k tokens)
         ├── 3-extensions/
            ├── 3.1-mcp.md (800 tokens)
            ├── 3.2-prompts.md (500 tokens)
            ├── 3.3-skills.md (1000 tokens)
            ├── 3.4-sessions.md (700 tokens)
            ├── 3.5-workspace.md (300 tokens)
         ├── 4-proxy/
            ├── 4.1-service.md (700 tokens)
            ├── 4.2-routing.md (600 tokens)
            ├── 4.3-failover.md (800 tokens)
            ├── 4.4-usage.md (1600 tokens)
            ├── 4.5-model-test.md (700 tokens)
         ├── 5-faq/
            ├── 5.1-config-files.md (1100 tokens)
            ├── 5.2-questions.md (1400 tokens)
            ├── 5.3-deeplink.md (1000 tokens)
            ├── 5.4-env-conflict.md (300 tokens)
         ├── README.md (1100 tokens)
      ├── zh/
         ├── 1-getting-started/
            ├── 1.1-introduction.md (300 tokens)
            ├── 1.2-installation.md (700 tokens)
            ├── 1.3-interface.md (700 tokens)
            ├── 1.4-quickstart.md (300 tokens)
            ├── 1.5-settings.md (1800 tokens)
         ├── 2-providers/
            ├── 2.1-add.md (3.3k tokens)
            ├── 2.2-switch.md (400 tokens)
            ├── 2.3-edit.md (400 tokens)
            ├── 2.4-sort-duplicate.md (200 tokens)
            ├── 2.5-usage-query.md (1200 tokens)
            ├── 2.6-claude-desktop.md (1900 tokens)
         ├── 3-extensions/
            ├── 3.1-mcp.md (700 tokens)
            ├── 3.2-prompts.md (400 tokens)
            ├── 3.3-skills.md (800 tokens)
            ├── 3.4-sessions.md (500 tokens)
            ├── 3.5-workspace.md (200 tokens)
         ├── 4-proxy/
            ├── 4.1-service.md (600 tokens)
            ├── 4.2-routing.md (400 tokens)
            ├── 4.3-failover.md (600 tokens)
            ├── 4.4-usage.md (1400 tokens)
            ├── 4.5-model-test.md (500 tokens)
         ├── 5-faq/
            ├── 5.1-config-files.md (1000 tokens)
            ├── 5.2-questions.md (1100 tokens)
            ├── 5.3-deeplink.md (900 tokens)
            ├── 5.4-env-conflict.md (300 tokens)
         ├── README.md (1000 tokens)
├── flatpak/
   ├── README.md (500 tokens)
   ├── com.ccswitch.desktop.desktop
   ├── com.ccswitch.desktop.metainfo.xml (200 tokens)
   ├── com.ccswitch.desktop.yml (700 tokens)
├── package.json (600 tokens)
├── pnpm-lock.yaml (omitted)
├── pnpm-workspace.yaml
├── postcss.config.cjs
├── rust-toolchain.toml
├── scripts/
   ├── generate-download-manifest.mjs (700 tokens)
   ├── rewrite-updater-manifest.mjs (400 tokens)
├── session-manager.md (1000 tokens)
├── src-tauri/
   ├── .gitignore
   ├── Cargo.lock (omitted)
   ├── Cargo.toml (700 tokens)
   ├── Info.plist (100 tokens)
   ├── build.rs (200 tokens)
   ├── capabilities/
      ├── default.json (100 tokens)
   ├── common-controls.manifest (100 tokens)
   ├── icons/
      ├── 128x128.png
      ├── 128x128@2x.png
      ├── 32x32.png
      ├── 64x64.png
      ├── Square107x107Logo.png
      ├── Square142x142Logo.png
      ├── Square150x150Logo.png
      ├── Square284x284Logo.png
      ├── Square30x30Logo.png
      ├── Square310x310Logo.png
      ├── Square44x44Logo.png
      ├── Square71x71Logo.png
      ├── Square89x89Logo.png
      ├── StoreLogo.png
      ├── android/
         ├── mipmap-hdpi/
            ├── ic_launcher.png
            ├── ic_launcher_foreground.png
            ├── ic_launcher_round.png
         ├── mipmap-mdpi/
            ├── ic_launcher.png
            ├── ic_launcher_foreground.png
            ├── ic_launcher_round.png
         ├── mipmap-xhdpi/
            ├── ic_launcher.png
            ├── ic_launcher_foreground.png
            ├── ic_launcher_round.png
         ├── mipmap-xxhdpi/
            ├── ic_launcher.png
            ├── ic_launcher_foreground.png
            ├── ic_launcher_round.png
         ├── mipmap-xxxhdpi/
            ├── ic_launcher.png
            ├── ic_launcher_foreground.png
            ├── ic_launcher_round.png
      ├── dmg-background.png
      ├── icon.icns
      ├── icon.ico
      ├── icon.png
      ├── ios/
         ├── AppIcon-20x20@1x.png
         ├── AppIcon-20x20@2x-1.png
         ├── AppIcon-20x20@2x.png
         ├── AppIcon-20x20@3x.png
         ├── AppIcon-29x29@1x.png
         ├── AppIcon-29x29@2x-1.png
         ├── AppIcon-29x29@2x.png
         ├── AppIcon-29x29@3x.png
         ├── AppIcon-40x40@1x.png
         ├── AppIcon-40x40@2x-1.png
         ├── AppIcon-40x40@2x.png
         ├── AppIcon-40x40@3x.png
         ├── AppIcon-512@2x.png
         ├── AppIcon-60x60@2x.png
         ├── AppIcon-60x60@3x.png
         ├── AppIcon-76x76@1x.png
         ├── AppIcon-76x76@2x.png
         ├── AppIcon-83.5x83.5@2x.png
      ├── tray/
         ├── macos/
            ├── statusTemplate.png
            ├── statusTemplate@2x.png
            ├── statusbar_template_3x.png
   ├── src/
      ├── app_config.rs (8.1k tokens)
      ├── app_store.rs (800 tokens)
      ├── auto_launch.rs (700 tokens)
      ├── claude_desktop_config.rs (15.5k tokens)
      ├── claude_mcp.rs (3.6k tokens)
      ├── claude_plugin.rs (700 tokens)
      ├── codex_config.rs (41.2k tokens)
      ├── codex_history_migration.rs (18.5k tokens)
      ├── codex_state_db.rs (700 tokens)
      ├── commands/
         ├── auth.rs (3.1k tokens)
         ├── balance.rs
         ├── codex_oauth.rs (600 tokens)
         ├── coding_plan.rs (200 tokens)
         ├── config.rs (2.8k tokens)
         ├── copilot.rs (1300 tokens)
         ├── deeplink.rs (600 tokens)
         ├── env.rs (100 tokens)
         ├── failover.rs (1800 tokens)
         ├── global_proxy.rs (1300 tokens)
         ├── hermes.rs (1100 tokens)
         ├── import_export.rs (1600 tokens)
         ├── lightweight.rs (100 tokens)
         ├── mcp.rs (1100 tokens)
         ├── misc.rs (52.1k tokens)
         ├── mod.rs (200 tokens)
         ├── model_fetch.rs (1000 tokens)
         ├── omo.rs (500 tokens)
         ├── openclaw.rs (1000 tokens)
         ├── pi.rs (200 tokens)
         ├── plugin.rs (300 tokens)
         ├── profile.rs (1200 tokens)
         ├── prompt.rs (700 tokens)
         ├── provider.rs (8.8k tokens)
         ├── proxy.rs (2.6k tokens)
         ├── s3_sync.rs (3k tokens)
         ├── session_manager.rs (700 tokens)
         ├── settings.rs (5k tokens)
         ├── skill.rs (1900 tokens)
         ├── stream_check.rs (1600 tokens)
         ├── subscription.rs (300 tokens)
         ├── sync_support.rs (800 tokens)
         ├── usage.rs (1900 tokens)
         ├── webdav_sync.rs (3.1k tokens)
         ├── workspace.rs (2.2k tokens)
         ├── xai_oauth.rs (800 tokens)
      ├── config.rs (5.1k tokens)
      ├── database/
         ├── backup.rs (26.3k tokens)
         ├── dao/
            ├── failover.rs (900 tokens)
            ├── mcp.rs (2000 tokens)
            ├── mod.rs (100 tokens)
            ├── profiles.rs (1400 tokens)
            ├── prompts.rs (600 tokens)
            ├── providers.rs (7k tokens)
            ├── providers_seed.rs (800 tokens)
            ├── proxy.rs (6.8k tokens)
            ├── settings.rs (2.2k tokens)
            ├── skills.rs (2.9k tokens)
            ├── stream_check.rs (500 tokens)
            ├── universal_providers.rs (500 tokens)
            ├── usage_rollup.rs (4.7k tokens)
         ├── migration.rs (1800 tokens)
         ├── mod.rs (1900 tokens)
         ├── schema.rs (24.4k tokens)
         ├── tests.rs (6.2k tokens)
      ├── deeplink/
         ├── mcp.rs (1400 tokens)
         ├── mod.rs (1100 tokens)
         ├── parser.rs (2.2k tokens)
         ├── prompt.rs (600 tokens)
         ├── provider.rs (8.7k tokens)
         ├── skill.rs (400 tokens)
         ├── tests.rs (6.6k tokens)
         ├── utils.rs (600 tokens)
      ├── error.rs (700 tokens)
      ├── gemini_config.rs (4.1k tokens)
      ├── gemini_mcp.rs (1200 tokens)
      ├── grok_config.rs (4.8k tokens)
      ├── hermes_config.rs (17.7k tokens)
      ├── init_status.rs (700 tokens)
      ├── lib.rs (19.4k tokens)
      ├── lightweight.rs (600 tokens)
      ├── linux_fix.rs (1000 tokens)
      ├── main.rs (300 tokens)
      ├── mcp/
         ├── claude.rs (900 tokens)
         ├── codex.rs (5.8k tokens)
         ├── gemini.rs (800 tokens)
         ├── grokbuild.rs (1700 tokens)
         ├── hermes.rs (4k tokens)
         ├── mod.rs (200 tokens)
         ├── opencode.rs (2.4k tokens)
         ├── validation.rs (400 tokens)
      ├── model_capabilities.rs (1800 tokens)
      ├── openclaw_config.rs (7k tokens)
      ├── opencode_config.rs (3.1k tokens)
      ├── panic_hook.rs (1600 tokens)
      ├── pi_config/
         ├── mod.rs (4.4k tokens)
      ├── prompt.rs (100 tokens)
      ├── prompt_files.rs (600 tokens)
      ├── provider.rs (11.6k tokens)
      ├── proxy/
         ├── body_filter.rs (2000 tokens)
         ├── cache_injector.rs (2.9k tokens)
         ├── circuit_breaker.rs (3.2k tokens)
         ├── content_encoding.rs (2.9k tokens)
         ├── copilot_optimizer.rs (10.8k tokens)
         ├── error.rs (1400 tokens)
         ├── error_mapper.rs (1000 tokens)
         ├── failover_switch.rs (800 tokens)
         ├── forwarder.rs (41k tokens)
         ├── gemini_url.rs (5.3k tokens)
         ├── handler_config.rs (1400 tokens)
         ├── handler_context.rs (2.3k tokens)
         ├── handlers.rs (27.5k tokens)
         ├── http_client.rs (2.6k tokens)
         ├── hyper_client.rs (7.1k tokens)
         ├── json_canonical.rs (1300 tokens)
         ├── log_codes.rs (300 tokens)
         ├── media_sanitizer.rs (8.7k tokens)
         ├── mod.rs (300 tokens)
         ├── model_mapper.rs (2.9k tokens)
         ├── provider_router.rs (4.4k tokens)
         ├── providers/
            ├── adapter.rs (500 tokens)
            ├── auth.rs (1500 tokens)
            ├── claude.rs (18.9k tokens)
            ├── codex.rs (14.5k tokens)
            ├── codex_chat_common.rs (1400 tokens)
            ├── codex_chat_history.rs (5.9k tokens)
            ├── codex_oauth_auth.rs (15.5k tokens)
            ├── codex_responses_sse.rs (2.8k tokens)
            ├── copilot_auth.rs (13.5k tokens)
            ├── copilot_model_map.rs (2.3k tokens)
            ├── gemini.rs (2.7k tokens)
            ├── gemini_schema.rs (2.4k tokens)
            ├── gemini_shadow.rs (2.6k tokens)
            ├── mod.rs (3.9k tokens)
            ├── models/
               ├── anthropic.rs (600 tokens)
               ├── mod.rs
               ├── openai.rs (600 tokens)
            ├── reasoning_bridge.rs (800 tokens)
            ├── streaming.rs (12.7k tokens)
            ├── streaming_codex_anthropic.rs (10.4k tokens)
            ├── streaming_codex_chat.rs (12.4k tokens)
            ├── streaming_gemini.rs (9.7k tokens)
            ├── streaming_responses.rs (70.5k tokens)
            ├── transform.rs (14.5k tokens)
            ├── transform_codex_anthropic.rs (25.4k tokens)
            ├── transform_codex_chat.rs (34.5k tokens)
            ├── transform_codex_responses_namespace.rs (4.6k tokens)
            ├── transform_codex_responses_xai_sanitize.rs (3.8k tokens)
            ├── transform_gemini.rs (19.1k tokens)
            ├── transform_responses.rs (38.3k tokens)
            ├── xai_oauth_auth.rs (9.5k tokens)
         ├── response_processor.rs (8.7k tokens)
         ├── server.rs (4.9k tokens)
         ├── session.rs (2.8k tokens)
         ├── sse.rs (2.4k tokens)
         ├── switch_lock.rs (200 tokens)
         ├── thinking_budget_rectifier.rs (2.3k tokens)
         ├── thinking_optimizer.rs (2.1k tokens)
         ├── thinking_rectifier.rs (4.5k tokens)
         ├── tool_media.rs (6.3k tokens)
         ├── types.rs (3k tokens)
         ├── usage/
            ├── calculator.rs (1800 tokens)
            ├── logger.rs (5.6k tokens)
            ├── mod.rs (100 tokens)
            ├── parser.rs (8.6k tokens)
      ├── resources/
         ├── codex_deepseek_catalog_template.json (15.2k tokens)
         ├── codex_native_responses_template.json (200 tokens)
         ├── gpt5_5_template.json (9.4k tokens)
      ├── services/
         ├── balance.rs (3k tokens)
         ├── codex_oauth_models.rs (1200 tokens)
         ├── coding_plan.rs (16.5k tokens)
         ├── config.rs (2k tokens)
         ├── env_checker.rs (1700 tokens)
         ├── env_manager.rs (1600 tokens)
         ├── mcp.rs (3.8k tokens)
         ├── mod.rs (300 tokens)
         ├── model_fetch.rs (4.2k tokens)
         ├── model_pricing.rs (5.6k tokens)
         ├── omo.rs (12.3k tokens)
         ├── pi_prompt_files.rs (3.7k tokens)
         ├── pi_state.rs (1000 tokens)
         ├── profile.rs (4.8k tokens)
         ├── prompt.rs (5.1k tokens)
         ├── provider/
            ├── endpoints.rs (600 tokens)
            ├── gemini_auth.rs (900 tokens)
            ├── live.rs (23k tokens)
            ├── mod.rs (53.4k tokens)
            ├── pi.rs (6.6k tokens)
            ├── usage.rs (2k tokens)
         ├── proxy.rs (74.3k tokens)
         ├── s3.rs (6.1k tokens)
         ├── s3_auto_sync.rs (1600 tokens)
         ├── s3_sync.rs (2.1k tokens)
         ├── session_usage.rs (6.2k tokens)
         ├── session_usage_codex.rs (21.5k tokens)
         ├── session_usage_gemini.rs (3.1k tokens)
         ├── session_usage_grokbuild.rs (9.2k tokens)
         ├── session_usage_opencode.rs (3.8k tokens)
         ├── session_usage_pi.rs (11.5k tokens)
         ├── skill.rs (42.9k tokens)
         ├── speedtest.rs (1200 tokens)
         ├── sql_helpers.rs (1600 tokens)
         ├── stream_check.rs (3.7k tokens)
         ├── subscription.rs (8.4k tokens)
         ├── subscription_grok.rs (6.3k tokens)
         ├── sync_protocol.rs (4.8k tokens)
         ├── usage_cache.rs (1100 tokens)
         ├── usage_stats.rs (31k tokens)
         ├── webdav.rs (3.3k tokens)
         ├── webdav_auto_sync.rs (1600 tokens)
         ├── webdav_sync.rs (2.2k tokens)
         ├── webdav_sync/
            ├── archive.rs (2.6k tokens)
      ├── session_manager/
         ├── mod.rs (2.6k tokens)
         ├── providers/
            ├── claude.rs (3.8k tokens)
            ├── codex.rs (7.7k tokens)
            ├── gemini.rs (1700 tokens)
            ├── grokbuild.rs (2.1k tokens)
            ├── hermes.rs (3.9k tokens)
            ├── mod.rs
            ├── openclaw.rs (3.1k tokens)
            ├── opencode.rs (6.9k tokens)
            ├── pi.rs (8.1k tokens)
            ├── utils.rs (1100 tokens)
         ├── terminal/
            ├── mod.rs (2.7k tokens)
      ├── settings.rs (7.8k tokens)
      ├── store.rs (200 tokens)
      ├── tray.rs (11.3k tokens)
      ├── usage_events.rs (400 tokens)
      ├── usage_script.rs (4.7k tokens)
   ├── tauri.conf.json (400 tokens)
   ├── tauri.windows.conf.json (100 tokens)
   ├── tests/
      ├── app_config_load.rs (800 tokens)
      ├── app_type_parse.rs (200 tokens)
      ├── deeplink_import.rs (700 tokens)
      ├── hermes_roundtrip.rs (800 tokens)
      ├── import_export_sync.rs (8k tokens)
      ├── mcp_commands.rs (8.2k tokens)
      ├── profile_roundtrip.rs (5.5k tokens)
      ├── provider_commands.rs (4.4k tokens)
      ├── provider_service.rs (21k tokens)
      ├── proxy_commands.rs (500 tokens)
      ├── skill_sync.rs (2.8k tokens)
      ├── support.rs (500 tokens)
   ├── wix/
      ├── per-user-main.wxs (3.5k tokens)
├── src/
   ├── App.tsx (13.1k tokens)
   ├── assets/
      ├── icons/
         ├── app-icon.png
         ├── chatgpt.svg (1200 tokens)
         ├── claude.svg (500 tokens)
   ├── components/
      ├── AppSwitcher.tsx (1400 tokens)
      ├── BrandIcons.tsx (500 tokens)
      ├── CodexOauthAccountQuota.tsx (300 tokens)
      ├── CodexOauthQuotaFooter.tsx (200 tokens)
      ├── ConfirmDialog.tsx (600 tokens)
      ├── CopilotQuotaFooter.tsx (1300 tokens)
      ├── DatabaseUpgrade.tsx (2k tokens)
      ├── DeepLinkImportDialog.tsx (6.5k tokens)
      ├── FirstRunNoticeDialog.tsx (400 tokens)
      ├── FrontendErrorBoundary.tsx (400 tokens)
      ├── IconPicker.tsx (600 tokens)
      ├── JsonEditor.tsx (2.2k tokens)
      ├── MarkdownEditor.tsx (800 tokens)
      ├── ProviderIcon.tsx (600 tokens)
      ├── SubscriptionQuotaFooter.tsx (2.9k tokens)
      ├── UpdateBadge.tsx (200 tokens)
      ├── UsageFooter.tsx (2.8k tokens)
      ├── UsageScriptModal.tsx (12.4k tokens)
      ├── XaiOauthQuotaFooter.tsx (200 tokens)
      ├── agents/
         ├── AgentsPanel.tsx (200 tokens)
      ├── common/
         ├── AppCountBar.tsx (800 tokens)
         ├── AppToggleGroup.tsx (300 tokens)
         ├── FullScreenPanel.tsx (1200 tokens)
         ├── ListItemRow.tsx (100 tokens)
         ├── ManagementListSearch.tsx (300 tokens)
      ├── deeplink/
         ├── McpConfirmation.tsx (1200 tokens)
         ├── PromptConfirmation.tsx (400 tokens)
         ├── SkillConfirmation.tsx (300 tokens)
      ├── env/
         ├── EnvWarningBanner.tsx (2000 tokens)
      ├── hermes/
         ├── HermesMemoryPanel.tsx (1100 tokens)
      ├── mcp/
         ├── McpFormModal.tsx (5k tokens)
         ├── McpWizardModal.tsx (2.8k tokens)
         ├── UnifiedMcpPanel.tsx (2.9k tokens)
         ├── useMcpValidation.ts (500 tokens)
      ├── openclaw/
         ├── AgentsDefaultsPanel.tsx (2.8k tokens)
         ├── EnvPanel.tsx (700 tokens)
         ├── OpenClawHealthBanner.tsx (600 tokens)
         ├── ToolsPanel.tsx (1800 tokens)
         ├── hooks/
            ├── useOpenClawModelOptions.ts (400 tokens)
         ├── utils.ts (400 tokens)
      ├── profiles/
         ├── ProfileManageDialog.tsx (1200 tokens)
         ├── ProfileSwitcher.tsx (1600 tokens)
         ├── scope.ts (200 tokens)
      ├── prompts/
         ├── PiNativePromptResources.tsx (5.5k tokens)
         ├── PiPromptPanel.tsx (1500 tokens)
         ├── PromptFormPanel.tsx (900 tokens)
         ├── PromptLibrary.tsx (800 tokens)
         ├── PromptListItem.tsx (500 tokens)
         ├── PromptPanel.tsx (1900 tokens)
         ├── PromptToggle.tsx (200 tokens)
      ├── providers/
         ├── AddProviderDialog.tsx (3.2k tokens)
         ├── AuthSettingsPanel.tsx (200 tokens)
         ├── EditProviderDialog.tsx (1800 tokens)
         ├── FailoverPriorityBadge.tsx (100 tokens)
         ├── ProviderActions.tsx (2.9k tokens)
         ├── ProviderCard.tsx (5.6k tokens)
         ├── ProviderEmptyState.tsx (400 tokens)
         ├── ProviderHealthBadge.tsx (400 tokens)
         ├── ProviderList.tsx (5k tokens)
         ├── ProviderStatusBadge.tsx (300 tokens)
         ├── forms/
            ├── ApiKeyInput.tsx (400 tokens)
            ├── BasicFormFields.tsx (1300 tokens)
            ├── ClaudeDesktopProviderForm.tsx (9.5k tokens)
            ├── ClaudeFormFields.tsx (7.5k tokens)
            ├── CodexCommonConfigModal.tsx (900 tokens)
            ├── CodexConfigEditor.tsx (600 tokens)
            ├── CodexConfigSections.tsx (2k tokens)
            ├── CodexFormFields.tsx (10.3k tokens)
            ├── CodexOAuthSection.tsx (4.8k tokens)
            ├── CommonConfigEditor.tsx (2.6k tokens)
            ├── CopilotAuthSection.tsx (3.3k tokens)
            ├── CustomUserAgentField.tsx (600 tokens)
            ├── EndpointSpeedTest.tsx (3.8k tokens)
            ├── GeminiCommonConfigModal.tsx (900 tokens)
            ├── GeminiConfigEditor.tsx (500 tokens)
            ├── GeminiConfigSections.tsx (1000 tokens)
            ├── GeminiFormFields.tsx (1300 tokens)
            ├── GrokBuildProviderForm.tsx (3.8k tokens)
            ├── HermesFormFields.tsx (3.2k tokens)
            ├── LocalProxyRequestOverridesField.tsx (600 tokens)
            ├── OmoFormFields.tsx (8.1k tokens)
            ├── OpenClawFormFields.tsx (4.6k tokens)
            ├── OpenCodeFormFields.tsx (6.7k tokens)
            ├── PiProviderForm.tsx (15.4k tokens)
            ├── ProviderAdvancedConfig.tsx (1300 tokens)
            ├── ProviderForm.tsx (19.8k tokens)
            ├── ProviderPresetSelector.tsx (3.4k tokens)
            ├── RequestHeadersEditor.tsx (1300 tokens)
            ├── StructuredOptionsEditor.tsx (1700 tokens)
            ├── XaiOAuthSection.tsx (2.1k tokens)
            ├── helpers/
               ├── opencodeFormUtils.ts (900 tokens)
               ├── requestHeaders.ts (100 tokens)
            ├── hooks/
               ├── index.ts (300 tokens)
               ├── useApiKeyLink.ts (600 tokens)
               ├── useApiKeyState.ts (500 tokens)
               ├── useBaseUrlState.ts (1000 tokens)
               ├── useCodexCommonConfig.ts (3k tokens)
               ├── useCodexConfigState.ts (2.1k tokens)
               ├── useCodexOauth.ts
               ├── useCodexTomlValidation.ts (300 tokens)
               ├── useCommonConfigSnippet.ts (2.1k tokens)
               ├── useCopilotAuth.ts (200 tokens)
               ├── useGeminiCommonConfig.ts (3.3k tokens)
               ├── useGeminiConfigState.ts (1500 tokens)
               ├── useHermesFormState.ts (1300 tokens)
               ├── useManagedAuth.ts (1600 tokens)
               ├── useModelState.ts (1600 tokens)
               ├── useOmoDraftState.ts (500 tokens)
               ├── useOmoModelSource.ts (2.1k tokens)
               ├── useOpenclawFormState.ts (1200 tokens)
               ├── useOpencodeFormState.ts (1400 tokens)
               ├── useProviderCategory.ts (600 tokens)
               ├── useSpeedTestEndpoints.ts (1000 tokens)
               ├── useTemplateValues.ts (1500 tokens)
               ├── useXaiOauth.ts
            ├── shared/
               ├── ApiKeySection.tsx (500 tokens)
               ├── EndpointField.tsx (700 tokens)
               ├── ModelDropdown.tsx (600 tokens)
               ├── ModelInputWithFetch.tsx (500 tokens)
               ├── index.ts
      ├── proxy/
         ├── AutoFailoverConfigPanel.tsx (3.5k tokens)
         ├── ClaudeDesktopRouteToggle.tsx (500 tokens)
         ├── FailoverQueueManager.tsx (1800 tokens)
         ├── FailoverToggle.tsx (500 tokens)
         ├── ProxyPanel.tsx (5.2k tokens)
         ├── ProxyToggle.tsx (500 tokens)
         ├── RoutingActivationBrand.tsx (1100 tokens)
         ├── index.ts
      ├── sessions/
         ├── SessionItem.tsx (600 tokens)
         ├── SessionManagerPage.tsx (14.4k tokens)
         ├── SessionMessageItem.tsx (800 tokens)
         ├── SessionToc.tsx (900 tokens)
         ├── utils.ts (1600 tokens)
      ├── settings/
         ├── AboutSection.tsx (9.4k tokens)
         ├── AppVisibilitySettings.tsx (800 tokens)
         ├── AuthCenterPanel.tsx (1000 tokens)
         ├── BackupListSection.tsx (3.3k tokens)
         ├── CodexAuthSettings.tsx (1000 tokens)
         ├── DirectorySettings.tsx (1600 tokens)
         ├── GlobalProxySettings.tsx (1500 tokens)
         ├── ImportExportSection.tsx (1300 tokens)
         ├── LanguageSettings.tsx (400 tokens)
         ├── LogConfigPanel.tsx (800 tokens)
         ├── ProxyTabContent.tsx (2.2k tokens)
         ├── RectifierConfigPanel.tsx (1500 tokens)
         ├── SettingsPage.tsx (4.7k tokens)
         ├── SkillStorageLocationSettings.tsx (900 tokens)
         ├── SkillSyncMethodSettings.tsx (400 tokens)
         ├── TerminalSettings.tsx (700 tokens)
         ├── ThemeSettings.tsx (400 tokens)
         ├── ToolInstallRow.tsx (200 tokens)
         ├── ToolUpgradeConfirmDialog.tsx (700 tokens)
         ├── WebdavSyncSection.tsx (13.3k tokens)
         ├── WindowSettings.tsx (700 tokens)
      ├── skills/
         ├── RepoManagerPanel.tsx (1300 tokens)
         ├── SkillCard.tsx (1100 tokens)
         ├── SkillsPage.tsx (4.7k tokens)
         ├── UnifiedSkillsPanel.tsx (7.4k tokens)
      ├── theme-provider.tsx (700 tokens)
      ├── ui/
         ├── accordion.tsx (400 tokens)
         ├── alert.tsx (300 tokens)
         ├── badge.tsx (200 tokens)
         ├── button.tsx (500 tokens)
         ├── card.tsx (400 tokens)
         ├── checkbox.tsx (300 tokens)
         ├── collapsible.tsx (100 tokens)
         ├── command.tsx (700 tokens)
         ├── dialog.tsx (900 tokens)
         ├── dropdown-menu.tsx (1500 tokens)
         ├── form.tsx (800 tokens)
         ├── ime-safe-input.tsx (600 tokens)
         ├── input.tsx (200 tokens)
         ├── label.tsx (100 tokens)
         ├── popover.tsx (300 tokens)
         ├── scroll-area.tsx (300 tokens)
         ├── select.tsx (900 tokens)
         ├── sonner.tsx (200 tokens)
         ├── switch.tsx (200 tokens)
         ├── table.tsx (600 tokens)
         ├── tabs.tsx (400 tokens)
         ├── textarea.tsx (200 tokens)
         ├── toggle-row.tsx (200 tokens)
         ├── tooltip.tsx (200 tokens)
      ├── universal/
         ├── UniversalProviderCard.tsx (800 tokens)
         ├── UniversalProviderFormModal.tsx (4.8k tokens)
         ├── UniversalProviderPanel.tsx (1900 tokens)
         ├── index.ts
      ├── usage/
         ├── ConnectivityCheckConfigPanel.tsx (1000 tokens)
         ├── ModelStatsTable.tsx (600 tokens)
         ├── ModelsDevAutoSyncPanel.tsx (4.7k tokens)
         ├── ModelsDevPickerDialog.tsx (2.5k tokens)
         ├── PricingConfigPanel.tsx (3.3k tokens)
         ├── PricingEditModal.tsx (1500 tokens)
         ├── ProviderStatsTable.tsx (600 tokens)
         ├── RequestDetailPanel.tsx (2.3k tokens)
         ├── RequestLogTable.tsx (3k tokens)
         ├── UsageDashboard.tsx (3.7k tokens)
         ├── UsageDateRangePicker.tsx (3.2k tokens)
         ├── UsageHero.tsx (2.6k tokens)
         ├── UsageTrendChart.tsx (2.2k tokens)
         ├── format.ts (600 tokens)
      ├── workspace/
         ├── DailyMemoryPanel.tsx (3.8k tokens)
         ├── WorkspaceFileEditor.tsx (600 tokens)
         ├── WorkspaceFilesPanel.tsx (1100 tokens)
   ├── config/
      ├── appConfig.tsx (1100 tokens)
      ├── claudeDesktopProviderPresets.ts (7.5k tokens)
      ├── claudeProviderPresets.ts (9.7k tokens)
      ├── codexProviderPresets.ts (13.3k tokens)
      ├── codexTemplates.ts (100 tokens)
      ├── codingPlanProviders.ts (600 tokens)
      ├── constants.ts (200 tokens)
      ├── geminiProviderPresets.ts (2.9k tokens)
      ├── grokBuildProviderPresets.test.ts (500 tokens)
      ├── grokBuildProviderPresets.ts (3.5k tokens)
      ├── hermesProviderPresets.ts (9.9k tokens)
      ├── jiekouProviderPresets.test.ts (1300 tokens)
      ├── mcpPresets.ts (600 tokens)
      ├── openclawProviderPresets.ts (14.4k tokens)
      ├── opencodeProviderPresets.ts (11.7k tokens)
      ├── piModelCatalog.ts (2.6k tokens)
      ├── piProviderPresets.ts (8.2k tokens)
      ├── piThinkingProfiles.ts (1600 tokens)
      ├── ppioProviderPresets.test.ts (1300 tokens)
      ├── universalProviderPresets.ts (500 tokens)
      ├── userAgentPresets.ts (100 tokens)
   ├── contexts/
      ├── UpdateContext.tsx (800 tokens)
   ├── hooks/
      ├── useBackupManager.ts (300 tokens)
      ├── useDarkMode.ts (200 tokens)
      ├── useDebouncedValue.ts (100 tokens)
      ├── useDirectorySettings.ts (2.4k tokens)
      ├── useDragSort.ts (700 tokens)
      ├── useGlobalProxy.ts (500 tokens)
      ├── useHermes.ts (1100 tokens)
      ├── useImportExport.ts (1200 tokens)
      ├── useLastValidValue.ts (100 tokens)
      ├── useMcp.ts (600 tokens)
      ├── useOpenClaw.ts (800 tokens)
      ├── usePromptActions.ts (1700 tokens)
      ├── useProviderActions.ts (3.1k tokens)
      ├── useProxyStatus.ts (1000 tokens)
      ├── useSessionSearch.ts (400 tokens)
      ├── useSettings.ts (3.5k tokens)
      ├── useSettingsForm.ts (1300 tokens)
      ├── useSettingsMetadata.ts (300 tokens)
      ├── useSkills.helpers.ts (100 tokens)
      ├── useSkills.ts (2.1k tokens)
      ├── useStreamCheck.ts (600 tokens)
      ├── useTauriEvent.ts (200 tokens)
      ├── useUsageCacheBridge.ts (300 tokens)
      ├── useUsageEventBridge.ts (200 tokens)
   ├── i18n/
      ├── index.ts (400 tokens)
      ├── locales/
         ├── en.json (35.6k tokens)
         ├── ja.json (27.7k tokens)
         ├── zh-TW.json (24.5k tokens)
         ├── zh.json (24.3k tokens)
   ├── icons/
      ├── extracted/
         ├── ClaudeApi.png
         ├── TeamoRouter-icon-dark.png
         ├── a6-icon.png
         ├── aicodemirror.svg (1000 tokens)
         ├── aicoding.svg (400 tokens)
         ├── aihubmix-color.svg (300 tokens)
         ├── algocode.svg (700 tokens)
         ├── alibaba.svg (300 tokens)
         ├── amuxapi-icon.svg (100 tokens)
         ├── anthropic.svg (100 tokens)
         ├── apikeyfun.png
         ├── apinebula_icon.png
         ├── atlascloud_icon.png
         ├── aws.svg (600 tokens)
         ├── azure.svg (300 tokens)
         ├── baidu.svg (300 tokens)
         ├── bailian.svg (300 tokens)
         ├── bytedance.svg (200 tokens)
         ├── byteplus.png
         ├── catcoder.svg (100 tokens)
         ├── ccsub.svg (12.2k tokens)
         ├── chatglm.svg (500 tokens)
         ├── cherryin.png
         ├── claude.svg (300 tokens)
         ├── claudecn.png
         ├── claw.svg (200 tokens)
         ├── cloudflare.svg (200 tokens)
         ├── code0.png
         ├── cohere.svg (200 tokens)
         ├── copilot.svg (700 tokens)
         ├── crazyrouter.svg (5k tokens)
         ├── cubence.svg (200 tokens)
         ├── deepseek.svg (400 tokens)
         ├── doubao.svg (200 tokens)
         ├── eflowcode.png
         ├── etok.png
         ├── fenno-icon.webp
         ├── gemini.svg (600 tokens)
         ├── gemma.svg (500 tokens)
         ├── github.svg (200 tokens)
         ├── githubcopilot.svg (400 tokens)
         ├── google.svg (200 tokens)
         ├── googlecloud.svg (200 tokens)
         ├── grok.svg (200 tokens)
         ├── hermes.png
         ├── huawei.svg (300 tokens)
         ├── huggingface.svg (800 tokens)
         ├── hunyuan.svg (200 tokens)
         ├── huoshan.png
         ├── index.ts (27.5k tokens)
         ├── kimi.svg (100 tokens)
         ├── lioncc.svg (1300 tokens)
         ├── longcat-color.svg (200 tokens)
         ├── mcp.svg (200 tokens)
         ├── meta.svg (1200 tokens)
         ├── metadata.ts (3.3k tokens)
         ├── micu.svg (800 tokens)
         ├── midjourney.svg (800 tokens)
         ├── minimax.svg (300 tokens)
         ├── mistral.svg (100 tokens)
         ├── modelscope-color.svg (100 tokens)
         ├── nekocode-icon.png
         ├── newapi.svg (500 tokens)
         ├── notion.svg (200 tokens)
         ├── novita.svg (100 tokens)
         ├── nvidia.svg (200 tokens)
         ├── ollama.svg (700 tokens)
         ├── openai.svg (300 tokens)
         ├── opencode-logo-light.svg (100 tokens)
         ├── openrouter.svg (200 tokens)
         ├── packycode.svg (1100 tokens)
         ├── palm.svg (200 tokens)
         ├── pateway.jpg
         ├── perplexity.svg (100 tokens)
         ├── pipellm.png
         ├── ppio.svg (200 tokens)
         ├── qiniu.png
         ├── qwen.svg (400 tokens)
         ├── rc.svg (700 tokens)
         ├── relaxcode.png
         ├── runapi.jpg
         ├── shengsuanyun.svg (10.5k tokens)
         ├── siliconflow.svg (100 tokens)
         ├── sssaicode.svg (700 tokens)
         ├── stability.svg (200 tokens)
         ├── stepfun.svg (100 tokens)
         ├── subrouter.svg (300 tokens)
         ├── sudocode-us.png
         ├── sudocode.png
         ├── tencent.svg (100 tokens)
         ├── ucloud.svg (700 tokens)
         ├── unity2.png
         ├── vercel.svg
         ├── wenxin.svg (300 tokens)
         ├── xai.svg (100 tokens)
         ├── xiaomimimo.svg (1900 tokens)
         ├── xycai-icon.png
         ├── yi.svg (200 tokens)
         ├── zeroone.svg (200 tokens)
         ├── zetaapi-icon.png
         ├── zhipu.svg (700 tokens)
   ├── index.css (1200 tokens)
   ├── index.html (100 tokens)
   ├── lib/
      ├── api/
         ├── auth.ts (500 tokens)
         ├── config.ts (500 tokens)
         ├── connectivity-check.ts (300 tokens)
         ├── copilot.ts (1000 tokens)
         ├── deeplink.ts (500 tokens)
         ├── env.ts (300 tokens)
         ├── failover.ts (500 tokens)
         ├── globalProxy.ts (300 tokens)
         ├── hermes.ts (500 tokens)
         ├── index.ts (200 tokens)
         ├── mcp.ts (600 tokens)
         ├── model-fetch.ts (600 tokens)
         ├── omo.ts (100 tokens)
         ├── openclaw.ts (700 tokens)
         ├── pi.ts (200 tokens)
         ├── profiles.ts (500 tokens)
         ├── prompts.ts (500 tokens)
         ├── providers.ts (1300 tokens)
         ├── proxy.ts (500 tokens)
         ├── sessions.ts (300 tokens)
         ├── settings.ts (2000 tokens)
         ├── skills.ts (1300 tokens)
         ├── subscription.ts (200 tokens)
         ├── types.ts
         ├── usage.ts (1000 tokens)
         ├── vscode.ts (400 tokens)
         ├── workspace.ts (300 tokens)
      ├── authBinding.ts (100 tokens)
      ├── clipboard.ts (100 tokens)
      ├── errors/
         ├── skillErrorParser.ts (600 tokens)
      ├── frontendLogger.ts (2.3k tokens)
      ├── modelsDevAutoSync.ts (500 tokens)
      ├── modelsDevPricing.ts (1600 tokens)
      ├── piPromptSlug.ts (100 tokens)
      ├── piPromptTemplate.ts (900 tokens)
      ├── platform.ts (300 tokens)
      ├── query/
         ├── copilot.ts (400 tokens)
         ├── failover.ts (1500 tokens)
         ├── index.ts
         ├── mutations.ts (2.6k tokens)
         ├── omo.ts (500 tokens)
         ├── pi.ts (200 tokens)
         ├── profiles.ts (1000 tokens)
         ├── proxy.ts (700 tokens)
         ├── queries.ts (1800 tokens)
         ├── queryClient.ts (100 tokens)
         ├── subscription.ts (1200 tokens)
         ├── usage.ts (2.1k tokens)
      ├── requestOverrides.ts (1000 tokens)
      ├── schemas/
         ├── provider.ts (300 tokens)
      ├── updater.ts (200 tokens)
      ├── usageRange.ts (400 tokens)
      ├── userAgent.ts (100 tokens)
      ├── utils.ts
      ├── utils/
         ├── base64.test.ts (700 tokens)
         ├── base64.ts (500 tokens)
         ├── sequentialBulkAction.ts (200 tokens)
      ├── version.test.ts (400 tokens)
      ├── version.ts (500 tokens)
      ├── windowActivity.ts (300 tokens)
   ├── main.tsx (900 tokens)
   ├── types.ts (4.3k tokens)
   ├── types/
      ├── env.ts (100 tokens)
      ├── icon.ts (100 tokens)
      ├── omo.ts (2.5k tokens)
      ├── proxy.ts (600 tokens)
      ├── subscription.ts (100 tokens)
      ├── usage.ts (1700 tokens)
   ├── utils/
      ├── deepClone.ts (200 tokens)
      ├── deepLinkConfigPreview.ts (600 tokens)
      ├── deeplinkRisk.test.ts (1400 tokens)
      ├── deeplinkRisk.ts (1300 tokens)
      ├── domUtils.ts (100 tokens)
      ├── errorUtils.ts (700 tokens)
      ├── formatters.ts (400 tokens)
      ├── grokBuildConfig.test.ts (900 tokens)
      ├── grokBuildConfig.ts (1100 tokens)
      ├── postChangeSync.ts (100 tokens)
      ├── providerCapabilities.test.ts (2.2k tokens)
      ├── providerCapabilities.ts (1000 tokens)
      ├── providerConfigUtils.test.ts (1700 tokens)
      ├── providerConfigUtils.ts (8.6k tokens)
      ├── providerIcon.test.ts (200 tokens)
      ├── providerIcon.ts (100 tokens)
      ├── providerMetaUtils.ts (300 tokens)
      ├── textNormalization.ts (100 tokens)
      ├── tomlUtils.ts (1200 tokens)
      ├── usageDisplay.ts (300 tokens)
      ├── uuid.ts (200 tokens)
   ├── vite-env.d.ts (omitted)
├── tailwind.config.cjs (900 tokens)
├── tests/
   ├── components/
      ├── AddProviderDialog.test.tsx (1900 tokens)
      ├── AppCountBar.test.tsx (1100 tokens)
      ├── AppToggleGroup.test.tsx (300 tokens)
      ├── BasicFormFields.test.tsx (600 tokens)
      ├── ClaudeDesktopProviderForm.test.tsx (2.8k tokens)
      ├── ClaudeFormFields.test.tsx (1100 tokens)
      ├── CodexOAuthSection.test.tsx (2.8k tokens)
      ├── CommonConfigEditor.test.tsx (600 tokens)
      ├── CommonConfigModalBehavior.test.tsx (700 tokens)
      ├── ConfirmDialog.test.tsx (200 tokens)
      ├── DeepLinkImportDialog.test.tsx (700 tokens)
      ├── EditProviderDialog.test.tsx (2.4k tokens)
      ├── FrontendErrorBoundary.test.tsx (200 tokens)
      ├── FullScreenPanel.test.tsx (200 tokens)
      ├── GlobalProxySettings.test.tsx (500 tokens)
      ├── GrokBuildProviderForm.test.tsx (1900 tokens)
      ├── HermesFormFields.test.tsx (900 tokens)
      ├── ImeSafeInput.test.tsx (1000 tokens)
      ├── ImportExportSection.test.tsx (700 tokens)
      ├── JsonEditor.test.tsx (600 tokens)
      ├── ManagedAuthStatusError.test.tsx (500 tokens)
      ├── ManagementListSearch.test.tsx (300 tokens)
      ├── McpFormModal.test.tsx (3k tokens)
      ├── ModelDropdown.test.tsx (300 tokens)
      ├── ModelsDevAutoSyncPanel.test.tsx (1300 tokens)
      ├── ModelsDevPickerDialog.test.ts (1900 tokens)
      ├── OmoFormFields.mergeCustomModelsIntoStore.test.ts (600 tokens)
      ├── OpenClawFormFields.test.tsx (700 tokens)
      ├── OpenClawProviderActions.test.tsx (400 tokens)
      ├── OpenCodeFormFields.test.tsx (2.1k tokens)
      ├── PiNativePromptResources.test.tsx (2.3k tokens)
      ├── PiProviderForm.test.tsx (14.6k tokens)
      ├── PricingEditModal.test.tsx (500 tokens)
      ├── PromptFormPanel.test.tsx (600 tokens)
      ├── PromptPanel.test.tsx (3.9k tokens)
      ├── ProviderActions.test.tsx (1000 tokens)
      ├── ProviderCard.codexAccount.test.tsx (1900 tokens)
      ├── ProviderCardLayout.test.ts (300 tokens)
      ├── ProviderForm.codexCatalog.test.ts (800 tokens)
      ├── ProviderForm.codexManagedAccount.test.tsx (3.4k tokens)
      ├── ProviderList.test.tsx (3.4k tokens)
      ├── ProviderPresetSelector.test.tsx (3.3k tokens)
      ├── ProxyTabContent.apps.test.ts (100 tokens)
      ├── ProxyToggle.test.tsx (200 tokens)
      ├── RequestLogTable.test.tsx (800 tokens)
      ├── RoutingActivationBrand.test.tsx (400 tokens)
      ├── SelectContentScroll.test.ts (200 tokens)
      ├── SelectItemIndicator.test.ts (300 tokens)
      ├── SessionManagerPage.test.tsx (4k tokens)
      ├── SettingsDialog.test.tsx (3k tokens)
      ├── SkillsPageInstall.test.tsx (2000 tokens)
      ├── UnifiedMcpPanel.test.tsx (1600 tokens)
      ├── UnifiedSkillsPanel.test.tsx (5.2k tokens)
      ├── UsageDashboard.test.tsx (1000 tokens)
      ├── UsageTrendChart.test.ts (800 tokens)
      ├── WebdavSyncSection.test.tsx (3.3k tokens)
      ├── XaiOAuthSection.test.tsx (400 tokens)
      ├── openclaw.utils.test.ts (300 tokens)
      ├── sessionUtils.test.ts (1300 tokens)
      ├── usageFormat.test.ts (100 tokens)
   ├── config/
      ├── appConfig.test.tsx (100 tokens)
      ├── claudeProviderPresets.test.ts (1200 tokens)
      ├── codexChatProviderPresets.test.ts (1600 tokens)
      ├── codexReasoningLevelPresets.test.ts (1600 tokens)
      ├── codexTemplates.test.ts (100 tokens)
      ├── doubaoSeedPresets.test.ts (300 tokens)
      ├── localeCoverage.test.ts (500 tokens)
      ├── longcatProviderPresets.test.ts (1000 tokens)
      ├── managementListLocales.test.ts (400 tokens)
      ├── mimoTokenPlanPresets.test.ts (300 tokens)
      ├── opencodeProviderPresets.test.ts (700 tokens)
      ├── piIcon.test.ts (100 tokens)
      ├── piProviderPresets.test.ts (1100 tokens)
      ├── piThinkingProfiles.test.ts (800 tokens)
      ├── qianfanTokenPlanPresets.test.ts (900 tokens)
      ├── subrouterProviderPresets.test.ts (1000 tokens)
      ├── therouterOpenCodeOpenClawPresets.test.ts (600 tokens)
      ├── therouterProviderPresets.test.ts (600 tokens)
      ├── toolManagementLocales.test.ts (400 tokens)
      ├── xaiOauthLocales.test.ts (300 tokens)
      ├── xaiOauthProviderPresets.test.ts (800 tokens)
   ├── hooks/
      ├── useAddProviderMutation.test.tsx (1800 tokens)
      ├── useApiKeyState.test.tsx (400 tokens)
      ├── useCodexConfigState.catalog.test.ts (500 tokens)
      ├── useCommonConfigSave.test.tsx (1200 tokens)
      ├── useDirectorySettings.test.tsx (1800 tokens)
      ├── useDragSort.test.tsx (800 tokens)
      ├── useImportExport.extra.test.tsx (800 tokens)
      ├── useImportExport.test.tsx (1600 tokens)
      ├── useImportSkillsFromApps.test.tsx (2.4k tokens)
      ├── useManagedAuth.test.tsx (500 tokens)
      ├── useMcpBulkToggle.test.tsx (1700 tokens)
      ├── useMcpValidation.test.tsx (1100 tokens)
      ├── useModelState.test.tsx (900 tokens)
      ├── useOpencodeFormState.test.tsx (700 tokens)
      ├── usePromptActions.test.tsx (2.4k tokens)
      ├── useProviderActions.test.tsx (5.2k tokens)
      ├── useProxyStatus.test.tsx (800 tokens)
      ├── useSettings.test.tsx (3.4k tokens)
      ├── useSettingsForm.test.tsx (1300 tokens)
      ├── useSettingsMetadata.test.tsx (400 tokens)
      ├── useSkillsBulkToggle.test.tsx (2.5k tokens)
      ├── useUpdateProviderMutation.test.tsx (800 tokens)
   ├── integration/
      ├── App.test.tsx (2.9k tokens)
      ├── SettingsDialog.test.tsx (1900 tokens)
   ├── lib/
      ├── frontendLogger.test.ts (2.4k tokens)
      ├── keepLastGoodUsage.test.ts (2000 tokens)
      ├── modelsDevAutoSync.test.ts (1200 tokens)
      ├── piPromptSlug.test.ts (200 tokens)
      ├── piPromptTemplate.test.ts (300 tokens)
      ├── requestOverrides.test.ts (500 tokens)
      ├── sequentialBulkAction.test.ts (300 tokens)
      ├── userAgent.test.ts (300 tokens)
   ├── msw/
      ├── handlers.ts (2.4k tokens)
      ├── server.ts
      ├── state.ts (2.1k tokens)
      ├── tauriMocks.ts (400 tokens)
   ├── setupGlobals.ts (300 tokens)
   ├── setupTests.ts (200 tokens)
   ├── types/
      ├── usage.test.ts (100 tokens)
   ├── utils/
      ├── deepClone.test.ts (200 tokens)
      ├── deepLinkConfigPreview.test.ts (1000 tokens)
      ├── errorUtils.test.ts (200 tokens)
      ├── omoConfig.test.ts (400 tokens)
      ├── providerConfigUtils.codex.test.ts (2.3k tokens)
      ├── providerMetaUtils.test.ts (400 tokens)
      ├── testQueryClient.ts
      ├── usageDisplay.test.ts (200 tokens)
├── tsconfig.json (100 tokens)
├── tsconfig.node.json (100 tokens)
├── vite.config.ts (100 tokens)
├── vitest.config.ts (100 tokens)
```


## /.github/CODEOWNERS

```github/CODEOWNERS path="/.github/CODEOWNERS" 
# Code owners for cc-switch
#
# Branch protection on `main` has "Require review from Code Owners" enabled.
# With this file present, a PR cannot merge to `main` without an approval from
# the owner below. This closes the gap where two collaborators could approve
# each other's malicious PRs (a single non-owner approval is no longer enough).

# Global fallback: every PR needs owner approval before merging to main.
*                 @farion1231

# Most sensitive paths — CI/signing/release and the Rust backend. Listed
# explicitly so they stay locked even if the global rule above is relaxed later.
/.github/         @farion1231
/src-tauri/       @farion1231

```

## /.github/FUNDING.yml

```yml path="/.github/FUNDING.yml" 
github: farion1231

```

## /.github/ISSUE_TEMPLATE/bug_report.yml

```yml path="/.github/ISSUE_TEMPLATE/bug_report.yml" 
name: "🐛 Bug Report / Bug 报告"
description: |
  Report errors or unexpected behavior.
  报告错误或异常行为。
labels:
  - bug
body:
  - type: checkboxes
    attributes:
      label: Self Checks / 自检
      options:
        - label: |
            I have read the [FAQ](https://github.com/farion1231/cc-switch#faq) section in README.
            我已阅读 README 中的[常见问题](https://github.com/farion1231/cc-switch#常见问题)。
          required: true
        - label: |
            I have searched for [existing issues](https://github.com/farion1231/cc-switch/issues), including closed ones.
            我已搜索过[已有的 Issue](https://github.com/farion1231/cc-switch/issues),包括已关闭的。
          required: true

  - type: input
    attributes:
      label: CC Switch Version / 版本号
      description: |
        See the Settings page in the app.
        查看应用设置页面中的版本号。
      placeholder: "e.g. 3.11.1"
    validations:
      required: true

  - type: dropdown
    attributes:
      label: Operating System / 操作系统
      multiple: false
      options:
        - Windows
        - macOS
        - Linux
    validations:
      required: true

  - type: dropdown
    attributes:
      label: Related App / 涉及应用
      description: |
        Which app is affected?
        涉及哪个应用?
      multiple: true
      options:
        - Claude Code
        - Codex
        - Gemini CLI
        - OpenCode
        - OpenClaw
        - Other / 其他
    validations:
      required: true

  - type: textarea
    attributes:
      label: Steps to Reproduce / 重现步骤
      description: |
        Please describe the steps to reproduce the bug. Screenshots and logs are helpful.
        请描述重现步骤。截图和日志会很有帮助。
      placeholder: |
        1. Go to ...
        2. Click on ...
        3. See error ...
    validations:
      required: true

  - type: textarea
    attributes:
      label: Expected Behavior / 期望行为
      description: |
        What did you expect to happen?
        你期望发生什么?
    validations:
      required: true

  - type: textarea
    attributes:
      label: Actual Behavior / 实际行为
      description: |
        What actually happened?
        实际发生了什么?
    validations:
      required: false

  - type: textarea
    attributes:
      label: Additional Context / 补充信息
      description: |
        Any other information, screenshots, or logs.
        其他信息、截图或日志。
    validations:
      required: false

```

## /.github/ISSUE_TEMPLATE/config.yml

```yml path="/.github/ISSUE_TEMPLATE/config.yml" 
blank_issues_enabled: false
contact_links:
  - name: "Security Vulnerabilities / 安全漏洞"
    url: "https://github.com/farion1231/cc-switch/security/advisories/new"
    about: |
      Report security vulnerabilities through GitHub Security Advisories.
      请通过 GitHub 安全公告报告安全漏洞。
  - name: "Discussions / 讨论区"
    url: "https://github.com/farion1231/cc-switch/discussions"
    about: |
      General discussions and community help.
      一般讨论和社区帮助。

```

## /.github/ISSUE_TEMPLATE/doc_issue.yml

```yml path="/.github/ISSUE_TEMPLATE/doc_issue.yml" 
name: "📖 Documentation Issue / 文档问题"
description: |
  Report documentation errors, outdated content, or missing information.
  报告文档错误、过时内容或缺失信息。
labels:
  - documentation
body:
  - type: checkboxes
    attributes:
      label: Self Checks / 自检
      options:
        - label: |
            I have searched for [existing issues](https://github.com/farion1231/cc-switch/issues), including closed ones.
            我已搜索过[已有的 Issue](https://github.com/farion1231/cc-switch/issues),包括已关闭的。
          required: true

  - type: dropdown
    attributes:
      label: Language / 语言
      description: |
        Which language version of the docs?
        涉及哪个语言版本的文档?
      multiple: true
      options:
        - English
        - 中文
        - 日本語
    validations:
      required: true

  - type: input
    attributes:
      label: Document Location / 文档位置
      description: |
        Which file or section is affected? Provide a link or file path.
        涉及哪个文件或章节?请提供链接或文件路径。
      placeholder: "e.g. README.md#faq or docs/user-manual/zh/..."
    validations:
      required: true

  - type: dropdown
    attributes:
      label: Issue Type / 问题类型
      options:
        - "Typo or grammar / 拼写或语法错误"
        - "Outdated content / 内容过时"
        - "Missing information / 信息缺失"
        - "Translation issue / 翻译问题"
        - "Other / 其他"
    validations:
      required: true

  - type: textarea
    attributes:
      label: Description / 描述
      description: |
        Describe the documentation issue.
        描述文档问题。
    validations:
      required: true

```

## /.github/ISSUE_TEMPLATE/feature_request.yml

```yml path="/.github/ISSUE_TEMPLATE/feature_request.yml" 
name: "✨ Feature Request / 功能请求"
description: |
  Propose a new feature or improvement.
  提出新功能或改进建议。
labels:
  - enhancement
body:
  - type: checkboxes
    attributes:
      label: Self Checks / 自检
      options:
        - label: |
            I have read the [FAQ](https://github.com/farion1231/cc-switch#faq) section in README.
            我已阅读 README 中的[常见问题](https://github.com/farion1231/cc-switch#常见问题)。
          required: true
        - label: |
            I have searched for [existing issues](https://github.com/farion1231/cc-switch/issues), including closed ones.
            我已搜索过[已有的 Issue](https://github.com/farion1231/cc-switch/issues),包括已关闭的。
          required: true

  - type: dropdown
    attributes:
      label: Related App / 涉及应用
      description: |
        Which app is this feature for?
        该功能涉及哪个应用?
      multiple: true
      options:
        - Claude Code
        - Codex
        - Gemini CLI
        - OpenCode
        - OpenClaw
        - General / 通用
    validations:
      required: true

  - type: textarea
    attributes:
      label: Problem or Motivation / 问题或动机
      description: |
        Is this request related to a problem? Describe the scenario.
        这个请求是否与某个问题相关?请描述使用场景。
      placeholder: |
        I was trying to ... and found that ...
        我在尝试……的时候,发现……
    validations:
      required: true

  - type: textarea
    attributes:
      label: Proposed Solution / 建议方案
      description: |
        Describe the solution you'd like.
        描述你希望的解决方案。
    validations:
      required: false

  - type: textarea
    attributes:
      label: Additional Context / 补充信息
      description: |
        Any other context, mockups, or screenshots.
        其他背景信息、设计稿或截图。
    validations:
      required: false

  - type: checkboxes
    attributes:
      label: Contribution / 参与贡献
      options:
        - label: |
            I am interested in contributing to this feature.
            我有兴趣参与开发此功能。
          required: false

```

## /.github/ISSUE_TEMPLATE/question.yml

```yml path="/.github/ISSUE_TEMPLATE/question.yml" 
name: "❓ Question / 提问"
description: |
  Ask a question about usage or configuration.
  询问使用或配置相关问题。
labels:
  - question
body:
  - type: checkboxes
    attributes:
      label: Self Checks / 自检
      options:
        - label: |
            I have read the [FAQ](https://github.com/farion1231/cc-switch#faq) section in README.
            我已阅读 README 中的[常见问题](https://github.com/farion1231/cc-switch#常见问题)。
          required: true
        - label: |
            I have searched for [existing issues](https://github.com/farion1231/cc-switch/issues), including closed ones.
            我已搜索过[已有的 Issue](https://github.com/farion1231/cc-switch/issues),包括已关闭的。
          required: true

  - type: dropdown
    attributes:
      label: Related App / 涉及应用
      description: |
        Which app is your question about?
        你的问题涉及哪个应用?
      multiple: true
      options:
        - Claude Code
        - Codex
        - Gemini CLI
        - OpenCode
        - OpenClaw
        - General / 通用
    validations:
      required: true

  - type: textarea
    attributes:
      label: Your Question / 你的问题
      description: |
        Describe your question clearly.
        请清晰地描述你的问题。
    validations:
      required: true

  - type: textarea
    attributes:
      label: What Have You Tried / 你已经尝试过什么
      description: |
        Describe what you've already tried or researched.
        描述你已经尝试过或查阅过的内容。
    validations:
      required: false

  - type: textarea
    attributes:
      label: Environment / 环境信息
      description: |
        OS, CC Switch version, and any relevant details.
        操作系统、CC Switch 版本及其他相关信息。
      placeholder: "e.g. macOS 15.4, CC Switch 3.11.1"
    validations:
      required: false

```

## /.github/dependabot.yml

```yml path="/.github/dependabot.yml" 
version: 2
updates:
  - package-ecosystem: "npm"
    directory: "/"
    schedule:
      interval: "weekly"
    labels:
      - "dependencies"
      - "frontend"
    commit-message:
      prefix: "chore(deps)"
    groups:
      frontend-deps:
        patterns:
          - "*"

  - package-ecosystem: "cargo"
    directory: "/src-tauri"
    schedule:
      interval: "weekly"
    labels:
      - "dependencies"
      - "backend"
    commit-message:
      prefix: "chore(deps)"
    groups:
      cargo-deps:
        patterns:
          - "*"

  - package-ecosystem: "github-actions"
    directory: "/"
    schedule:
      interval: "monthly"
    labels:
      - "dependencies"
      - "actions"
    commit-message:
      prefix: "chore(deps)"

```

## /.github/labeler.yml

```yml path="/.github/labeler.yml" 
# Configuration for actions/labeler v5
# Automatically labels PRs based on changed file paths

frontend:
  - changed-files:
      - any-glob-to-any-file:
          - "src/**"
          - "index.html"
          - "vite.config.ts"
          - "vitest.config.ts"
          - "tailwind.config.cjs"
          - "postcss.config.cjs"
          - "tsconfig.json"
          - "tsconfig.node.json"
          - "components.json"
          - "tests/**"

backend:
  - changed-files:
      - any-glob-to-any-file:
          - "src-tauri/**"

i18n:
  - changed-files:
      - any-glob-to-any-file:
          - "src/i18n/locales/**"

actions:
  - changed-files:
      - any-glob-to-any-file:
          - ".github/**"

dependencies:
  - changed-files:
      - any-glob-to-any-file:
          - "package.json"
          - "pnpm-lock.yaml"
          - "pnpm-workspace.yaml"
          - "src-tauri/Cargo.toml"
          - "src-tauri/Cargo.lock"

documentation:
  - changed-files:
      - any-glob-to-any-file:
          - "*.md"
          - "docs/**"
          - "LICENSE"

mcp:
  - changed-files:
      - any-glob-to-any-file:
          - "src/components/mcp/**"
          - "src/lib/api/mcp.ts"
          - "src-tauri/src/mcp/**"
          - "src-tauri/src/claude_mcp.rs"
          - "src-tauri/src/gemini_mcp.rs"
          - "src-tauri/src/commands/mcp.rs"

skills:
  - changed-files:
      - any-glob-to-any-file:
          - "src/components/skills/**"
          - "src/lib/api/skills.ts"
          - "src-tauri/src/commands/skill.rs"
          - "src-tauri/src/services/skill.rs"
          - "src-tauri/src/database/dao/skills.rs"

proxy:
  - changed-files:
      - any-glob-to-any-file:
          - "src/components/proxy/**"
          - "src/lib/api/proxy.ts"
          - "src-tauri/src/proxy/**"
          - "src-tauri/src/commands/proxy.rs"

```

## /.github/pull_request_template.md

## Summary / 概述

<!-- Briefly describe what this PR does and why. / 简要描述这个 PR 做了什么以及为什么。 -->

## Related Issue / 关联 Issue

<!-- Link the related issue. Use "Fixes #123" to auto-close it when merged. -->
<!-- 关联相关 Issue。使用 "Fixes #123" 可在合并时自动关闭。 -->

Fixes #

## Screenshots / 截图

<!-- If applicable, add before/after screenshots. / 如有需要,请添加修改前后的截图。 -->

| Before / 修改前 | After / 修改后 |
|-----------------|---------------|
|                 |               |

## Checklist / 检查清单

- [ ] `pnpm typecheck` passes / 通过 TypeScript 类型检查
- [ ] `pnpm format:check` passes / 通过代码格式检查
- [ ] `cargo clippy` passes (if Rust code changed) / 通过 Clippy 检查(如修改了 Rust 代码)
- [ ] Updated i18n files if user-facing text changed / 如修改了用户可见文本,已更新国际化文件


## /.github/workflows/ci.yml

```yml path="/.github/workflows/ci.yml" 
name: CI

on:
  pull_request:
    branches: [main]
  push:
    branches: [main]

concurrency:
  group: ci-${{ github.ref }}
  cancel-in-progress: true

jobs:
  changes:
    name: Detect changed areas
    runs-on: ubuntu-latest
    permissions:
      contents: read
      pull-requests: read
    outputs:
      frontend: ${{ steps.filter.outputs.frontend }}
      backend: ${{ steps.filter.outputs.backend }}
    steps:
      # On pull_request the filter reads changed files via the API (no checkout);
      # on push it needs a local git history to diff against.
      - name: Checkout
        if: github.event_name == 'push'
        uses: actions/checkout@v6

      - name: Detect changed paths
        id: filter
        uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3
        with:
          filters: |
            frontend:
              - "src/**"
              - "tests/**"
              - "index.html"
              - "package.json"
              - "pnpm-lock.yaml"
              - "pnpm-workspace.yaml"
              - "tsconfig.json"
              - "tsconfig.node.json"
              - "vite.config.ts"
              - "vitest.config.ts"
              - "tailwind.config.cjs"
              - "postcss.config.cjs"
              - "components.json"
              - ".github/workflows/**"
            backend:
              - "src-tauri/**"
              - "rust-toolchain.toml"
              - ".github/workflows/**"

  frontend:
    name: Frontend Checks
    runs-on: ubuntu-latest
    needs: changes
    # Pushes to main always run everything: they keep the caches that PRs restore from warm.
    if: github.event_name != 'pull_request' || needs.changes.outputs.frontend == 'true'
    steps:
      - name: Checkout
        uses: actions/checkout@v6

      - name: Setup Node.js
        uses: actions/setup-node@v6
        with:
          node-version: "20"

      - name: Setup pnpm
        env:
          COREPACK_ENABLE_DOWNLOAD_PROMPT: "0"
        run: |
          corepack enable
          corepack install
          pnpm --version

      - name: Get pnpm store directory
        id: pnpm-store
        shell: bash
        run: echo "path=$(pnpm store path --silent)" >> $GITHUB_OUTPUT

      - name: Cache pnpm store
        uses: actions/cache@v5
        with:
          path: ${{ steps.pnpm-store.outputs.path }}
          key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
          restore-keys: ${{ runner.os }}-pnpm-store-

      - name: Install dependencies
        run: pnpm install --frozen-lockfile

      - name: TypeScript type check
        run: pnpm typecheck

      - name: Check formatting
        run: pnpm format:check

      - name: Unit tests
        run: pnpm test:unit

  backend:
    name: Backend Checks
    runs-on: ${{ matrix.os }}
    needs: changes
    if: github.event_name != 'pull_request' || needs.changes.outputs.backend == 'true'
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-22.04, windows-latest, macos-latest]
    steps:
      - name: Checkout
        uses: actions/checkout@v6

      - name: Setup Rust
        uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt, clippy

      - name: Install Linux system deps
        if: runner.os == 'Linux'
        run: |
          sudo apt-get update
          sudo apt-get install -y --no-install-recommends \
            build-essential pkg-config libssl-dev \
            libgtk-3-dev librsvg2-dev libayatana-appindicator3-dev
          sudo apt-get install -y --no-install-recommends libwebkit2gtk-4.1-dev \
            || sudo apt-get install -y --no-install-recommends libwebkit2gtk-4.0-dev
          sudo apt-get install -y --no-install-recommends libsoup-3.0-dev \
            || sudo apt-get install -y --no-install-recommends libsoup2.4-dev

      - name: Cache Cargo registry and build
        uses: actions/cache@v5
        with:
          path: |
            ~/.cargo/registry
            ~/.cargo/git
            src-tauri/target
          key: ${{ runner.os }}-cargo-${{ hashFiles('src-tauri/Cargo.lock') }}
          restore-keys: ${{ runner.os }}-cargo-

      - name: Create frontend dist placeholder
        shell: bash
        run: mkdir -p dist

      - name: Check Rust formatting
        run: cargo fmt --check --manifest-path src-tauri/Cargo.toml

      - name: Clippy
        run: cargo clippy --manifest-path src-tauri/Cargo.toml -- -D warnings

      - name: Run tests
        run: cargo test --manifest-path src-tauri/Cargo.toml

  backend-windows-wsl2:
    name: Backend Checks (Windows + WSL2 home)
    runs-on: windows-2025
    timeout-minutes: 45
    needs: changes
    if: github.event_name != 'pull_request' || needs.changes.outputs.backend == 'true'
    permissions:
      contents: read
    steps:
      - name: Checkout
        uses: actions/checkout@v6

      - name: Setup Rust
        uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable

      - name: Setup WSL2
        uses: Vampire/setup-wsl@d1da7f2c0322a5ee4f24975344f67fc0f5baf364 # v7
        with:
          distribution: Ubuntu-24.04
          wsl-version: 2

      - name: Cache Cargo registry and build
        uses: actions/cache@v5
        with:
          path: |
            ~/.cargo/registry
            ~/.cargo/git
            src-tauri/target
          key: ${{ runner.os }}-cargo-${{ hashFiles('src-tauri/Cargo.lock') }}
          restore-keys: ${{ runner.os }}-cargo-

      - name: Create frontend dist placeholder
        shell: bash
        run: mkdir -p dist

      - name: Prepare WSL2-backed test environment
        shell: pwsh
        run: |
          wsl.exe -d Ubuntu-24.04 -- bash -lc "rm -rf /tmp/cc-switch-windows-test-root && mkdir -p /tmp/cc-switch-windows-test-root/{home,temp} && chmod -R 0777 /tmp/cc-switch-windows-test-root"
          $testRoot = "\\wsl.localhost\Ubuntu-24.04\tmp\cc-switch-windows-test-root"
          $testHome = Join-Path $testRoot "home"
          $testTemp = Join-Path $testRoot "temp"
          foreach ($path in @($testRoot, $testHome, $testTemp)) {
            if (-not (Test-Path -LiteralPath $path)) {
              throw "WSL2-backed test path is unavailable: $path"
            }
          }
          "CC_SWITCH_TEST_HOME=$testHome" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
          "CC_SWITCH_WSL_TEST_DIR=$testRoot" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
          "CC_SWITCH_WSL_TEST_TEMP=$testTemp" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

      - name: Compile backend tests with native temp
        # link.exe/mt.exe cannot create manifests when TEMP points at a WSL UNC path.
        run: cargo test --lib --manifest-path src-tauri/Cargo.toml --no-run

      - name: Run Windows-to-WSL2 filesystem contract
        shell: pwsh
        run: |
          $env:TEMP = $env:CC_SWITCH_WSL_TEST_TEMP
          $env:TMP = $env:CC_SWITCH_WSL_TEST_TEMP
          $testName = "config::tests::atomic_write_replaces_existing_wsl_unc_file"
          $testList = cargo test --lib --manifest-path src-tauri/Cargo.toml -- --ignored --list
          if ($LASTEXITCODE -ne 0) {
            exit $LASTEXITCODE
          }
          $expected = "${testName}: test"
          if ($testList -notcontains $expected) {
            throw "Expected ignored test was not discovered: $testName"
          }
          cargo test --lib --manifest-path src-tauri/Cargo.toml $testName -- --ignored --exact --nocapture
          if ($LASTEXITCODE -ne 0) {
            exit $LASTEXITCODE
          }

```

## /.github/workflows/claude.yml

```yml path="/.github/workflows/claude.yml" 
name: Claude

on:
  issue_comment:
    types: [created]
  pull_request_review_comment:
    types: [created]
  pull_request_review:
    types: [submitted]
  issues:
    types: [opened, assigned]

jobs:
  claude:
    if: |
      ((github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude') &&
        (github.event.comment.author_association == 'OWNER' ||
         github.event.comment.author_association == 'MEMBER' ||
         github.event.comment.author_association == 'COLLABORATOR'))
       ||
       (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude') &&
        (github.event.comment.author_association == 'OWNER' ||
         github.event.comment.author_association == 'MEMBER' ||
         github.event.comment.author_association == 'COLLABORATOR'))
       ||
       (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude') &&
        (github.event.review.author_association == 'OWNER' ||
         github.event.review.author_association == 'MEMBER' ||
         github.event.review.author_association == 'COLLABORATOR'))
       ||
       (github.event_name == 'issues' &&
        (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')) &&
        (github.event.issue.author_association == 'OWNER' ||
         github.event.issue.author_association == 'MEMBER' ||
         github.event.issue.author_association == 'COLLABORATOR')))
    runs-on: ubuntu-latest
    permissions:
      contents: read
      pull-requests: write
      issues: write
      id-token: write
    steps:
      - name: Checkout
        uses: actions/checkout@v6
        with:
          fetch-depth: 1
          ref: ${{ github.event.pull_request.head.sha || github.sha }}

      - name: Run Claude (review only)
        uses: anthropics/claude-code-action@v1
        with:
          claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
          claude_args: >-
            --model claude-opus-4-7
            --disallowedTools Edit,Write,MultiEdit,NotebookEdit
            --append-system-prompt "You are reviewing PRs for cc-switch — a small open-source Tauri 2.0 + React + TypeScript desktop app maintained by a single developer who values pragmatism over perfection.
            ONLY flag HIGH SIGNAL issues. An issue qualifies only if it meets at least one of: code that fails to compile/parse/run; code that will definitely produce wrong results; a security vulnerability with a concrete trigger (SSRF, injection, unsafe deserialization, credential or data leaks); database/migration correctness (schema mismatch, data loss on upgrade, broken SCHEMA_VERSION transition); cross-platform breakage (Windows/macOS/Linux specific); clear, quotable violations of CLAUDE.md.
            Each finding must include a confidence score from 0 to 100. Do NOT post any finding scored below 80. Each finding must carry a severity tag — Important (bug that should be fixed before merge), Nit (minor, worth fixing but not blocking), or Pre-existing (exists already, not introduced by this PR).
            DO NOT flag any of the following: pedantic nitpicks a senior engineer would not raise; anything a linter, typechecker, pnpm format, or cargo fmt would catch; missing test coverage unless CLAUDE.md explicitly mandates it; style, naming, or 'could be more idiomatic' suggestions; speculative future-proofing ('what if X is added later'); issues on lines the PR did not modify; potential bugs for which you cannot construct a concrete failure scenario; positive feedback or 'what is well done' sections.
            OUTPUT RULES: Cap Nit-level findings at 5 per review. If you found more nits, append 'plus N similar nits' to the summary instead of listing them inline. If only nits were found, lead the review with 'No blocking issues.' If nothing material is wrong, say 'LGTM' explicitly and stop — approval with zero comments is a valid and expected outcome for most PRs. Do NOT post a final APPROVE or REQUEST CHANGES verdict; leave the merge decision to the maintainer.
            Never modify files, push commits, or create PRs."

```

## /.github/workflows/labeler.yml

```yml path="/.github/workflows/labeler.yml" 
name: Label PRs

on:
  pull_request_target:
    types: [opened, synchronize, reopened]

permissions:
  contents: read
  pull-requests: write

jobs:
  label:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/labeler@v5
        with:
          sync-labels: true

```

## /.github/workflows/release.yml

```yml path="/.github/workflows/release.yml" 
name: Release

on:
  push:
    tags:
      - 'v*'

permissions:
  contents: write

concurrency:
  group: release-${{ github.ref_name }}
  cancel-in-progress: true

jobs:
  release:
    runs-on: ${{ matrix.os }}
    environment: release
    strategy:
      fail-fast: false
      matrix:
        include:
          - os: windows-2022
          - os: windows-11-arm
            arch: arm64
          - os: ubuntu-22.04
          - os: ubuntu-22.04-arm
            arch: arm64
          - os: macos-14

    steps:
      - name: Checkout
        uses: actions/checkout@v6

      - name: Setup Node.js
        uses: actions/setup-node@v6
        with:
          node-version: '20'

      - name: Setup Rust
        uses: dtolnay/rust-toolchain@stable

      - name: Add Windows ARM64 target
        if: runner.os == 'Windows' && matrix.arch == 'arm64'
        shell: pwsh
        run: rustup target add aarch64-pc-windows-msvc

      - name: Add macOS targets
        if: runner.os == 'macOS'
        run: |
          rustup target add aarch64-apple-darwin x86_64-apple-darwin

      - name: Install Linux system deps
        if: runner.os == 'Linux'
        shell: bash
        run: |
          set -euxo pipefail
          sudo apt-get update
          # Core build tools and pkg-config
          sudo apt-get install -y --no-install-recommends \
            build-essential \
            pkg-config \
            curl \
            wget \
            file \
            patchelf \
            libssl-dev \
            rpm \
            flatpak \
            flatpak-builder \
            elfutils \
            xdg-utils
          # GTK/GLib stack for gdk-3.0, glib-2.0, gio-2.0
          sudo apt-get install -y --no-install-recommends \
            libgtk-3-dev \
            librsvg2-dev \
            libayatana-appindicator3-dev
          # WebKit2GTK (version differs across Ubuntu images; try 4.1 then 4.0)
          sudo apt-get install -y --no-install-recommends libwebkit2gtk-4.1-dev \
            || sudo apt-get install -y --no-install-recommends libwebkit2gtk-4.0-dev
          # libsoup also changed major version; prefer 3.0 with fallback to 2.4
          sudo apt-get install -y --no-install-recommends libsoup-3.0-dev \
            || sudo apt-get install -y --no-install-recommends libsoup2.4-dev

      - name: Setup pnpm
        env:
          COREPACK_ENABLE_DOWNLOAD_PROMPT: "0"
        run: |
          corepack enable
          corepack install
          node --version
          pnpm --version

      - name: Get pnpm store directory
        if: runner.os != 'Windows' || matrix.arch != 'arm64'
        id: pnpm-store
        shell: bash
        run: echo "path=$(pnpm store path --silent)" >> $GITHUB_OUTPUT

      - name: Setup pnpm cache
        if: runner.os != 'Windows' || matrix.arch != 'arm64'
        uses: actions/cache@v5
        with:
          path: ${{ steps.pnpm-store.outputs.path }}
          key: ${{ runner.os }}-${{ runner.arch }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
          restore-keys: ${{ runner.os }}-${{ runner.arch }}-pnpm-store-

      - name: Setup LLVM for Windows ARM64
        if: runner.os == 'Windows' && matrix.arch == 'arm64'
        shell: pwsh
        run: |
          $ErrorActionPreference = 'Stop'
          $llvmRoot = 'C:\Program Files\LLVM'
          if (-not (Test-Path $llvmRoot)) {
            throw "LLVM not found at $llvmRoot"
          }
          $llvmBin = Join-Path $llvmRoot 'bin'
          "LIBCLANG_PATH=$llvmBin" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
          "CLANG_PATH=$(Join-Path $llvmBin 'clang.exe')" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
          $llvmBin | Out-File -FilePath $env:GITHUB_PATH -Append -Encoding utf8

      - name: Install frontend deps
        run: pnpm install --frozen-lockfile

      - name: Prepare Tauri signing key
        shell: bash
        run: |
          # 调试:检查 Secret 是否存在
          if [ -z "${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}" ]; then
            echo "❌ TAURI_SIGNING_PRIVATE_KEY Secret 为空或不存在" >&2
            echo "请检查 GitHub 仓库 Settings > Secrets and variables > Actions" >&2
            exit 1
          fi
          
          RAW="${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}"
          # 目标:提供正确的私钥“文件路径”给 Tauri CLI,避免内容解码歧义
          KEY_PATH="$RUNNER_TEMP/tauri_signing.key"
          # 情况 1:原始两行文本(第一行以 "untrusted comment:" 开头)
          if echo "$RAW" | head -n1 | grep -q '^untrusted comment:'; then
            printf '%s\n' "$RAW" > "$KEY_PATH"
            echo "✅ 使用原始两行密钥文件格式"
          else
            # 情况 2:整体被 base64 包裹(解包后应当是两行)
            if DECODED=$(printf '%s' "$RAW" | (base64 --decode 2>/dev/null || base64 -D 2>/dev/null)) \
               && echo "$DECODED" | head -n1 | grep -q '^untrusted comment:'; then
              printf '%s\n' "$DECODED" > "$KEY_PATH"
              echo "✅ 成功解码 base64 包裹密钥,已还原为两行文件"
            else
              # 情况 3:已是第二行(纯 Base64 一行)→ 构造两行文件
              if echo "$RAW" | grep -Eq '^[A-Za-z0-9+/=]+{{contextString}}#39;; then
                ONE=$(printf '%s' "$RAW" | tr -d '\r\n')
                printf '%s\n%s\n' "untrusted comment: tauri signing key" "$ONE" > "$KEY_PATH"
                echo "✅ 使用一行 Base64 私钥,已构造两行文件"
              else
                echo "❌ TAURI_SIGNING_PRIVATE_KEY 格式无法识别:既不是两行原文,也不是其 base64,亦非一行 base64" >&2
                echo "密钥前10个字符: $(echo "$RAW" | head -c 10)..." >&2
                exit 1
              fi
            fi
          fi
          # 将“完整两行内容”作为环境变量注入(Tauri 支持传入完整私钥文本或文件路径)
          # 使用多行写入语法,保持换行以便解析
          # 将完整两行私钥内容进行 base64 编码,作为单行内容注入环境变量
          if command -v base64 >/dev/null 2>&1; then
            KEY_B64=$(base64 < "$KEY_PATH" | tr -d '\r\n')
          elif command -v openssl >/dev/null 2>&1; then
            KEY_B64=$(openssl base64 -A -in "$KEY_PATH")
          else
            KEY_B64=$(KEY_PATH="$KEY_PATH" node -e "process.stdout.write(require('fs').readFileSync(process.env.KEY_PATH).toString('base64'))")
          fi
          if [ -z "$KEY_B64" ]; then
            echo "❌ 无法生成私钥 base64 内容" >&2
            exit 1
          fi
          echo "TAURI_SIGNING_PRIVATE_KEY=$KEY_B64" >> "$GITHUB_ENV"
          if [ -n "${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}" ]; then
            echo "TAURI_SIGNING_PRIVATE_KEY_PASSWORD=${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}" >> $GITHUB_ENV
          fi
          echo "✅ Tauri signing key prepared"

      - name: Import Apple signing certificate
        if: runner.os == 'macOS'
        shell: bash
        run: |
          set -euo pipefail
          # Decode .p12 certificate from base64
          CERT_PATH="$RUNNER_TEMP/certificate.p12"
          printf '%s' "${{ secrets.APPLE_CERTIFICATE }}" | (base64 --decode 2>/dev/null || base64 -D) > "$CERT_PATH"

          # Save original default keychain for cleanup
          ORIGINAL_DEFAULT_KEYCHAIN=$(security default-keychain -d user | tr -d '"' | xargs)
          echo "ORIGINAL_DEFAULT_KEYCHAIN=$ORIGINAL_DEFAULT_KEYCHAIN" >> "$GITHUB_ENV"

          # Create temporary keychain
          KEYCHAIN_PATH="$RUNNER_TEMP/build.keychain-db"
          security create-keychain -p "${{ secrets.KEYCHAIN_PASSWORD }}" "$KEYCHAIN_PATH"
          security set-keychain-settings -lut 21600 "$KEYCHAIN_PATH"
          security default-keychain -s "$KEYCHAIN_PATH"
          security unlock-keychain -p "${{ secrets.KEYCHAIN_PASSWORD }}" "$KEYCHAIN_PATH"

          # Import certificate
          security import "$CERT_PATH" \
            -k "$KEYCHAIN_PATH" \
            -P "${{ secrets.APPLE_CERTIFICATE_PASSWORD }}" \
            -T /usr/bin/codesign \
            -T /usr/bin/security
          security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "${{ secrets.KEYCHAIN_PASSWORD }}" "$KEYCHAIN_PATH"

          # Dynamically resolve signing identity (must be "Developer ID Application")
          IDENTITY=$(security find-identity -v -p codesigning "$KEYCHAIN_PATH" \
            | grep "Developer ID Application" | grep -oE '"[^"]+"' | head -1 | tr -d '"')
          if [ -z "$IDENTITY" ]; then
            echo "❌ No 'Developer ID Application' identity found — listing all identities:" >&2
            security find-identity -v -p codesigning "$KEYCHAIN_PATH"
            exit 1
          fi
          echo "✅ Signing identity: $IDENTITY"
          echo "APPLE_SIGNING_IDENTITY=$IDENTITY" >> "$GITHUB_ENV"

          # Cleanup certificate file
          rm -f "$CERT_PATH"

      - name: Build Tauri App (macOS)
        if: runner.os == 'macOS'
        shell: bash
        timeout-minutes: 60
        env:
          APPLE_SIGNING_IDENTITY: ${{ env.APPLE_SIGNING_IDENTITY }}
          APPLE_ID: ${{ secrets.APPLE_ID }}
          APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
          APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
        run: |
          set -euo pipefail
          max_attempts=3
          for attempt in $(seq 1 "$max_attempts"); do
            echo "=== macOS build/notarization attempt ${attempt}/${max_attempts} ==="
            if pnpm tauri build --target universal-apple-darwin; then
              echo "✅ macOS build/notarization succeeded"
              exit 0
            fi

            if [ "$attempt" -eq "$max_attempts" ]; then
              echo "❌ macOS build/notarization failed after ${max_attempts} attempts" >&2
              exit 1
            fi

            sleep_seconds=$((attempt * 60))
            echo "⚠️ macOS build/notarization failed, retrying in ${sleep_seconds}s..."
            sleep "$sleep_seconds"
          done

      - name: Build Tauri App (Windows)
        if: runner.os == 'Windows'
        shell: pwsh
        env:
          WINDOWS_RELEASE_ARCH: ${{ matrix.arch || 'x86_64' }}
        run: |
          $ErrorActionPreference = 'Stop'
          if ($env:WINDOWS_RELEASE_ARCH -eq 'arm64') {
            pnpm tauri build --target aarch64-pc-windows-msvc --bundles msi
          } else {
            pnpm tauri build
          }

      - name: Build Tauri App (Linux)
        if: runner.os == 'Linux'
        run: pnpm tauri build --bundles appimage,deb,rpm

      - name: Prepare macOS Assets
        if: runner.os == 'macOS'
        shell: bash
        run: |
          set -euxo pipefail
          mkdir -p release-assets
          VERSION="${GITHUB_REF_NAME}"  # e.g., v3.5.0

          # Locate bundle artifacts
          TAR_GZ=""; APP_PATH=""
          for path in \
            "src-tauri/target/universal-apple-darwin/release/bundle/macos" \
            "src-tauri/target/aarch64-apple-darwin/release/bundle/macos" \
            "src-tauri/target/x86_64-apple-darwin/release/bundle/macos" \
            "src-tauri/target/release/bundle/macos"; do
            if [ -d "$path" ]; then
              [ -z "$TAR_GZ" ]   && TAR_GZ=$(find "$path" -maxdepth 1 -name "*.tar.gz" -type f | head -1 || true)
              [ -z "$APP_PATH" ] && APP_PATH=$(find "$path" -maxdepth 1 -name "*.app" -type d | head -1 || true)
            fi
          done

          if [ -z "$TAR_GZ" ]; then
            echo "❌ No macOS .tar.gz updater artifact found" >&2
            exit 1
          fi
          if [ -z "$APP_PATH" ]; then
            echo "❌ No .app found" >&2
            exit 1
          fi

          # Staple notarization ticket to .app (Tauri already notarized it)
          xcrun stapler staple "$APP_PATH"
          echo "✅ .app stapled"

          # 1) Collect .tar.gz (updater artifact)
          NEW_TAR_GZ="CC-Switch-${VERSION}-macOS.tar.gz"
          cp "$TAR_GZ" "release-assets/$NEW_TAR_GZ"
          [ -f "$TAR_GZ.sig" ] && cp "$TAR_GZ.sig" "release-assets/$NEW_TAR_GZ.sig" || echo ".sig for macOS not found yet"
          echo "macOS updater artifact copied: $NEW_TAR_GZ"

          # 2) Collect .app as zip
          NEW_ZIP="CC-Switch-${VERSION}-macOS.zip"
          ditto -c -k --sequesterRsrc --keepParent "$APP_PATH" "release-assets/$NEW_ZIP"
          echo "macOS zip ready: $NEW_ZIP"

          # 3) Create styled DMG with create-dmg (Tauri's built-in DMG styling doesn't work on CI)
          if [ -z "${APPLE_SIGNING_IDENTITY:-}" ]; then
            echo "❌ APPLE_SIGNING_IDENTITY is missing before DMG creation" >&2
            exit 1
          fi

          HOMEBREW_NO_AUTO_UPDATE=1 brew install create-dmg
          NEW_DMG="CC-Switch-${VERSION}-macOS.dmg"
          DMG_STAGE_DIR="$RUNNER_TEMP/dmg-stage"
          rm -rf "$DMG_STAGE_DIR"
          mkdir -p "$DMG_STAGE_DIR"
          ditto "$APP_PATH" "$DMG_STAGE_DIR/CC Switch.app"

          create-dmg \
            --volname "CC Switch" \
            --background "src-tauri/icons/dmg-background.png" \
            --window-size 660 400 \
            --window-pos 200 120 \
            --icon-size 80 \
            --icon "CC Switch.app" 180 220 \
            --hide-extension "CC Switch.app" \
            --app-drop-link 480 220 \
            --codesign "$APPLE_SIGNING_IDENTITY" \
            --no-internet-enable \
            "release-assets/$NEW_DMG" \
            "$DMG_STAGE_DIR"

          rm -rf "$DMG_STAGE_DIR"
          echo "✅ Styled DMG created: $NEW_DMG"

      - name: Notarize macOS DMG
        if: runner.os == 'macOS'
        shell: bash
        timeout-minutes: 30
        env:
          APPLE_ID: ${{ secrets.APPLE_ID }}
          APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
          APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
        run: |
          set -euo pipefail

          DMG_PATH=$(find release-assets -maxdepth 1 -name "*.dmg" -type f | head -1 || true)
          if [ -z "$DMG_PATH" ]; then
            echo "❌ No .dmg found in release-assets/ to notarize" >&2
            exit 1
          fi

          echo "=== Notarizing DMG: $DMG_PATH ==="
          max_attempts=3
          for attempt in $(seq 1 "$max_attempts"); do
            echo "=== DMG notarization attempt ${attempt}/${max_attempts} ==="
            if xcrun notarytool submit "$DMG_PATH" \
              --apple-id "$APPLE_ID" \
              --password "$APPLE_PASSWORD" \
              --team-id "$APPLE_TEAM_ID" \
              --wait; then
              echo "✅ DMG notarization succeeded"
              xcrun stapler staple "$DMG_PATH"
              echo "✅ DMG stapled"
              break
            fi

            if [ "$attempt" -eq "$max_attempts" ]; then
              echo "❌ DMG notarization failed after ${max_attempts} attempts" >&2
              exit 1
            fi

            sleep_seconds=$((attempt * 60))
            echo "⚠️ DMG notarization failed, retrying in ${sleep_seconds}s..."
            sleep "$sleep_seconds"
          done

      - name: Verify macOS code signing and notarization
        if: runner.os == 'macOS'
        shell: bash
        run: |
          set -euo pipefail

          # Verify .app (from Tauri bundle)
          APP_PATH=""
          for path in \
            "src-tauri/target/universal-apple-darwin/release/bundle/macos" \
            "src-tauri/target/aarch64-apple-darwin/release/bundle/macos" \
            "src-tauri/target/x86_64-apple-darwin/release/bundle/macos" \
            "src-tauri/target/release/bundle/macos"; do
            if [ -d "$path" ]; then
              [ -z "$APP_PATH" ] && APP_PATH=$(find "$path" -maxdepth 1 -name "*.app" -type d | head -1 || true)
            fi
          done

          if [ -z "$APP_PATH" ]; then
            echo "❌ No .app found for verification" >&2
            exit 1
          fi
          echo "=== Verifying .app: $APP_PATH ==="
          codesign --verify --deep --strict --verbose=2 "$APP_PATH"
          echo "✅ codesign verification passed"
          spctl -a -t exec -vv "$APP_PATH"
          echo "✅ spctl assessment passed"
          xcrun stapler validate "$APP_PATH"
          echo "✅ .app stapler validation passed"

          # Verify .dmg (from release-assets/, created by create-dmg + notarized)
          DMG_PATH=$(find release-assets -maxdepth 1 -name "*.dmg" -type f | head -1 || true)
          if [ -n "$DMG_PATH" ]; then
            echo "=== Verifying .dmg: $DMG_PATH ==="
            codesign --verify --verbose=2 "$DMG_PATH"
            echo "✅ .dmg codesign verification passed"
            spctl -a -t open --context context:primary-signature -vv "$DMG_PATH"
            echo "✅ .dmg spctl assessment passed"
            xcrun stapler validate "$DMG_PATH"
            echo "✅ .dmg stapler validation passed"
          else
            echo "❌ No .dmg found for verification — release would ship without verified DMG" >&2
            exit 1
          fi

      - name: Prepare Windows Assets
        if: runner.os == 'Windows'
        shell: pwsh
        env:
          WINDOWS_RELEASE_ARCH: ${{ matrix.arch || 'x86_64' }}
        run: |
          $ErrorActionPreference = 'Stop'
          New-Item -ItemType Directory -Force -Path release-assets | Out-Null
          $VERSION = $env:GITHUB_REF_NAME  # e.g., v3.5.0
          $isArm64 = $env:WINDOWS_RELEASE_ARCH -eq 'arm64'
          $targetRoot = if ($isArm64) { 'src-tauri/target/aarch64-pc-windows-msvc/release' } else { 'src-tauri/target/release' }
          $assetSuffix = if ($isArm64) { '-arm64' } else { '' }

          # 仅打包 MSI 安装器 + .sig(用于 Updater)
          $msi = Get-ChildItem -Path (Join-Path $targetRoot 'bundle/msi') -Recurse -Include *.msi -ErrorAction SilentlyContinue | Select-Object -First 1
          if ($null -eq $msi) {
            # 兜底:全局搜索 .msi
            $msi = Get-ChildItem -Path (Join-Path $targetRoot 'bundle') -Recurse -Include *.msi -ErrorAction SilentlyContinue | Select-Object -First 1
          }
          if ($null -ne $msi) {
            $dest = "CC-Switch-$VERSION-Windows$assetSuffix.msi"
            Copy-Item $msi.FullName (Join-Path release-assets $dest)
            Write-Host "Installer copied: $dest"
            $sigPath = "$($msi.FullName).sig"
            if (Test-Path $sigPath) {
              Copy-Item $sigPath (Join-Path release-assets ("$dest.sig"))
              Write-Host "Signature copied: $dest.sig"
            } elseif ($isArm64) {
              throw "Signature not found for $($msi.Name)"
            } else {
              Write-Warning "Signature not found for $($msi.Name)"
            }
          } elseif ($isArm64) {
            throw 'No Windows ARM64 MSI installer found'
          } else {
            Write-Warning 'No Windows MSI installer found'
          }

          # 绿色版(portable):仅可执行文件打 zip(不参与 Updater)
          $exeCandidates = if ($isArm64) {
            @('src-tauri/target/aarch64-pc-windows-msvc/release/cc-switch.exe')
          } else {
            @(
              'src-tauri/target/release/cc-switch.exe',
              'src-tauri/target/x86_64-pc-windows-msvc/release/cc-switch.exe'
            )
          }
          $exePath = $exeCandidates | Where-Object { Test-Path $_ } | Select-Object -First 1
          if ($null -ne $exePath) {
            $portableDir = 'release-assets/CC-Switch-Portable'
            New-Item -ItemType Directory -Force -Path $portableDir | Out-Null
            Copy-Item $exePath $portableDir
            $portableIniPath = Join-Path $portableDir 'portable.ini'
            $portableContent = if ($isArm64) {
              @(
                '# CC Switch portable ARM64 build marker',
                'portable=true',
                'arch=arm64'
              )
            } else {
              @(
                '# CC Switch portable build marker',
                'portable=true'
              )
            }
            $portableContent | Set-Content -Path $portableIniPath -Encoding UTF8
            $portableZip = "release-assets/CC-Switch-$VERSION-Windows$assetSuffix-Portable.zip"
            Compress-Archive -Path "$portableDir/*" -DestinationPath $portableZip -Force
            Remove-Item -Recurse -Force $portableDir
            Write-Host "Windows portable zip created: CC-Switch-$VERSION-Windows$assetSuffix-Portable.zip"
          } elseif ($isArm64) {
            throw 'Portable ARM64 exe not found'
          } else {
            Write-Warning 'Portable exe not found'
          }

      - name: Prepare Linux Assets
        if: runner.os == 'Linux'
        shell: bash
        run: |
          set -euxo pipefail
          mkdir -p release-assets
          VERSION="${GITHUB_REF_NAME}"  # e.g., v3.5.0
          ARCH="${{ matrix.arch || 'x86_64' }}"
          # Updater artifact: AppImage(含对应 .sig)
          APPIMAGE=$(find src-tauri/target/release/bundle -name "*.AppImage" | head -1 || true)
          if [ -n "$APPIMAGE" ]; then
            NEW_APPIMAGE="CC-Switch-${VERSION}-Linux-${ARCH}.AppImage"
            cp "$APPIMAGE" "release-assets/$NEW_APPIMAGE"
            [ -f "$APPIMAGE.sig" ] && cp "$APPIMAGE.sig" "release-assets/$NEW_APPIMAGE.sig" || echo ".sig for AppImage not found"
            echo "AppImage copied: $NEW_APPIMAGE"
          else
            echo "No AppImage found under target/release/bundle" >&2
          fi
          # 额外上传 .deb(用于手动安装,不参与 Updater)
          DEB=$(find src-tauri/target/release/bundle -name "*.deb" | head -1 || true)
          if [ -n "$DEB" ]; then
            cp "$DEB" "release-assets/CC-Switch-${VERSION}-Linux-${ARCH}.deb"
            echo "Deb package copied: CC-Switch-${VERSION}-Linux-${ARCH}.deb"
          else
            echo "No .deb found (optional)"
          fi
          # 额外上传 .rpm(用于 Fedora/RHEL/openSUSE 等,不参与 Updater)
          RPM=$(find src-tauri/target/release/bundle -name "*.rpm" | head -1 || true)
          if [ -n "$RPM" ]; then
            cp "$RPM" "release-assets/CC-Switch-${VERSION}-Linux-${ARCH}.rpm"
            echo "RPM package copied: CC-Switch-${VERSION}-Linux-${ARCH}.rpm"
          else
            echo "No .rpm found (optional)"
          fi

      - name: List prepared assets
        shell: bash
        run: |
          ls -la release-assets || true

      - name: Collect Signatures
        shell: bash
        run: |
          set -euo pipefail
          echo "Collected signatures (if any alongside artifacts):"
          ls -la release-assets/*.sig || echo "No signatures found"

      - name: Upload release artifacts to workflow
        uses: actions/upload-artifact@v7
        with:
          name: release-assets-${{ runner.os }}-${{ matrix.arch || runner.arch }}
          path: release-assets/*
          if-no-files-found: error

      - name: List generated bundles (debug)
        if: always()
        shell: bash
        run: |
          echo "Listing bundles in src-tauri/target..."
          find src-tauri/target -maxdepth 4 -type f -name "*.*" 2>/dev/null || true

      - name: Clean up Apple signing keychain
        if: runner.os == 'macOS' && always()
        shell: bash
        run: |
          if [ -n "${ORIGINAL_DEFAULT_KEYCHAIN:-}" ]; then
            security default-keychain -s "$ORIGINAL_DEFAULT_KEYCHAIN" || true
          fi
          if [ -f "$RUNNER_TEMP/build.keychain-db" ]; then
            security delete-keychain "$RUNNER_TEMP/build.keychain-db" || true
          fi

  publish-release:
    name: Publish GitHub Release
    runs-on: ubuntu-22.04
    needs: release
    permissions:
      contents: write
    steps:
      - name: Download built release artifacts
        uses: actions/download-artifact@v8
        with:
          pattern: release-assets-*
          path: release-assets
          merge-multiple: true

      - name: List downloaded release artifacts
        shell: bash
        run: |
          set -euo pipefail
          ls -la release-assets

      - name: Upload Release Assets
        uses: softprops/action-gh-release@v3
        with:
          tag_name: ${{ github.ref_name }}
          name: CC Switch ${{ github.ref_name }}
          prerelease: true
          body: |
            ## CC Switch ${{ github.ref_name }}

            🌐 **Only Official Website / 唯一官方网站 / 唯一の公式サイト**: [ccswitch.io](https://ccswitch.io)

            Claude Code 供应商切换工具

            ### 下载

            - **macOS**: `CC-Switch-${{ github.ref_name }}-macOS.dmg`(推荐)或 `CC-Switch-${{ github.ref_name }}-macOS.zip`(解压即用)
            - **Windows (x86_64)**: `CC-Switch-${{ github.ref_name }}-Windows.msi`(安装版)或 `CC-Switch-${{ github.ref_name }}-Windows-Portable.zip`(绿色版)
            - **Windows (ARM64)**: `CC-Switch-${{ github.ref_name }}-Windows-arm64.msi`(安装版)或 `CC-Switch-${{ github.ref_name }}-Windows-arm64-Portable.zip`(绿色版)
            - **Linux (x86_64)**: `CC-Switch-${{ github.ref_name }}-Linux-x86_64.AppImage` / `.deb` / `.rpm`
            - **Linux (ARM64)**: `CC-Switch-${{ github.ref_name }}-Linux-arm64.AppImage` / `.deb` / `.rpm`

            > `.tar.gz` 为 Tauri updater 自动更新专用,无需手动下载。

            ---
            macOS 版本已通过 Apple 代码签名和公证,可直接安装使用。
          files: release-assets/*
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

  assemble-latest-json:
    name: Assemble latest.json
    runs-on: ubuntu-22.04
    needs: publish-release
    permissions:
      contents: write
    steps:
      - name: Prepare GH
        run: |
          gh --version || (type -p curl >/dev/null && sudo apt-get update && sudo apt-get install -y gh || true)
        env:
          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      - name: Download all release assets
        env:
          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          set -euxo pipefail
          TAG="${GITHUB_REF_NAME}"
          mkdir -p dl
          gh release download "$TAG" --dir dl --repo "$GITHUB_REPOSITORY"
          ls -la dl || true
      - name: Generate latest.json
        env:
          REPO: ${{ github.repository }}
          TAG: ${{ github.ref_name }}
        run: |
          set -euo pipefail
          VERSION="${TAG#v}"
          PUB_DATE=$(date -u +%Y-%m-%dT%H:%M:%SZ)
          base_url="https://github.com/$REPO/releases/download/$TAG"
          # 初始化空平台映射
          mac_url=""; mac_sig=""
          win_x64_url=""; win_x64_sig=""
          win_arm64_url=""; win_arm64_sig=""
          linux_x64_url=""; linux_x64_sig=""
          linux_arm64_url=""; linux_arm64_sig=""
          shopt -s nullglob
          for sig in dl/*.sig; do
            base=${sig%.sig}
            fname=$(basename "$base")
            url="$base_url/$fname"
            sig_content=$(cat "$sig")
            case "$fname" in
              *.tar.gz)
                # 视为 macOS updater artifact
                mac_url="$url"; mac_sig="$sig_content";;
              *-Windows-arm64.msi)
                win_arm64_url="$url"; win_arm64_sig="$sig_content";;
              *-Windows.msi)
                win_x64_url="$url"; win_x64_sig="$sig_content";;
              *-Linux-arm64.AppImage|*-Linux-arm64.appimage)
                linux_arm64_url="$url"; linux_arm64_sig="$sig_content";;
              *-Linux-x86_64.AppImage|*-Linux-x86_64.appimage)
                linux_x64_url="$url"; linux_x64_sig="$sig_content";;
            esac
          done
          # 构造 JSON(仅包含存在的目标)
          tmp_json=$(mktemp)
          {
            echo '{'
            echo "  \"version\": \"$VERSION\",";
            echo "  \"notes\": \"Release $TAG\",";
            echo "  \"pub_date\": \"$PUB_DATE\",";
            echo '  "platforms": {'
            first=1
            if [ -n "$mac_url" ] && [ -n "$mac_sig" ]; then
              # 为兼容 arm64 / x64,重复写入两个键,指向同一 universal 包
              for key in darwin-aarch64 darwin-x86_64; do
                [ $first -eq 0 ] && echo ','
                echo "    \"$key\": {\"signature\": \"$mac_sig\", \"url\": \"$mac_url\"}"
                first=0
              done
            fi
            if [ -n "$win_x64_url" ] && [ -n "$win_x64_sig" ]; then
              [ $first -eq 0 ] && echo ','
              echo "    \"windows-x86_64\": {\"signature\": \"$win_x64_sig\", \"url\": \"$win_x64_url\"}"
              first=0
            fi
            if [ -n "$win_arm64_url" ] && [ -n "$win_arm64_sig" ]; then
              [ $first -eq 0 ] && echo ','
              echo "    \"windows-aarch64\": {\"signature\": \"$win_arm64_sig\", \"url\": \"$win_arm64_url\"}"
              first=0
            fi
            if [ -n "$linux_x64_url" ] && [ -n "$linux_x64_sig" ]; then
              [ $first -eq 0 ] && echo ','
              echo "    \"linux-x86_64\": {\"signature\": \"$linux_x64_sig\", \"url\": \"$linux_x64_url\"}"
              first=0
            fi
            if [ -n "$linux_arm64_url" ] && [ -n "$linux_arm64_sig" ]; then
              [ $first -eq 0 ] && echo ','
              echo "    \"linux-aarch64\": {\"signature\": \"$linux_arm64_sig\", \"url\": \"$linux_arm64_url\"}"
              first=0
            fi
            echo '  }'
            echo '}'
          } > "$tmp_json"
          echo "Generated latest.json:" && cat "$tmp_json"
          mv "$tmp_json" latest.json
      - name: Upload latest.json to release
        env:
          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          set -euxo pipefail
          gh release upload "$GITHUB_REF_NAME" latest.json --clobber --repo "$GITHUB_REPOSITORY"

```

## /.github/workflows/stale.yml

```yml path="/.github/workflows/stale.yml" 
name: Close Stale Issues

on:
  schedule:
    # Run daily at 00:00 UTC
    - cron: '0 0 * * *'
  workflow_dispatch: # Allow manual trigger

permissions:
  issues: write

jobs:
  stale:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/stale@v10
        with:
          # --- Timing ---
          days-before-stale: 60
          days-before-close: 14

          # --- Stale label ---
          stale-issue-label: 'stale'

          # --- Messages (bilingual) ---
          stale-issue-message: |
            此 issue 已超过 60 天没有活动,已被标记为 `stale`。
            如果此问题仍然存在,请回复以保持 issue 打开状态,否则将在 14 天后自动关闭。

            This issue has been automatically marked as `stale` because it has not had activity for 60 days.
            Please reply to keep it open, otherwise it will be automatically closed in 14 days.
          close-issue-message: |
            此 issue 因长时间无活动已被自动关闭。如果问题仍然存在,欢迎重新打开。

            This issue has been automatically closed due to inactivity. If the problem persists, feel free to reopen it.

          # --- Exemptions ---
          # Issues with these labels will NEVER be marked stale
          exempt-issue-labels: 'security,performance'
          # Issues with 3+ reactions are likely popular requests, exempt them
          exempt-issue-created-after: '2020-01-01'

          # --- Processing limits ---
          # Process up to 100 issues per run to avoid API rate limits
          operations-per-run: 100

          # --- Only issues, not PRs ---
          days-before-pr-stale: -1
          days-before-pr-close: -1

```

## /.github/workflows/sync-r2.yml

```yml path="/.github/workflows/sync-r2.yml" 
# Mirror release assets to Cloudflare R2 so ccswitch.io/download can serve
# them directly (dl.ccswitch.io), and mirror the Tauri updater manifest and
# artifacts so in-app updates avoid GitHub too (the updater verifies minisign
# signatures client-side, so the mirror is untrusted).
#
# Triggered on release promotion (`released` fires when a prerelease is
# flipped to a full release, or a release is published as stable directly) —
# NOT on tag push. This keeps the R2 root manifests behind the same gate as
# GitHub's /releases/latest/: while a release sits as prerelease, neither the
# download page nor the updater sees it. Additionally, a run only touches the
# root manifests (and prunes old versions) when its tag IS releases/latest —
# manual backfills of older tags restore versioned files only.
#
# Caveat (by design of tauri-plugin-updater): the updater stops at the first
# endpoint whose response parses, so a stale-but-valid R2 manifest would mask
# newer GitHub releases. That is why this sync hard-fails on the official
# repo when the R2 secrets are missing, instead of silently skipping.
#
# Required secrets: R2_ACCOUNT_ID / R2_ACCESS_KEY_ID / R2_SECRET_ACCESS_KEY
name: Sync release to R2

on:
  release:
    types: [released]
  # Manual recovery/backfill: re-sync any existing release tag.
  workflow_dispatch:
    inputs:
      tag:
        description: 'Release tag to sync (e.g. v3.18.0)'
        required: true
        type: string

permissions:
  contents: read

# latest.json / manifest.json are last-writer-wins — serialize runs and keep
# every trigger queued instead of the default replace-the-pending behavior.
concurrency:
  group: sync-r2
  cancel-in-progress: false
  queue: max

jobs:
  sync-to-r2:
    name: Sync release to R2
    runs-on: ubuntu-22.04
    env:
      R2_BUCKET: cc-switch-releases
      R2_PUBLIC_BASE_URL: https://dl.ccswitch.io
      KEEP_VERSIONS: "5"
      AWS_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
      AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
      AWS_DEFAULT_REGION: auto
      # aws-cli >= 2.23 defaults to CRC checksums that R2 rejects.
      AWS_REQUEST_CHECKSUM_CALCULATION: when_required
      AWS_RESPONSE_CHECKSUM_VALIDATION: when_required
      R2_ENDPOINT: https://${{ secrets.R2_ACCOUNT_ID }}.r2.cloudflarestorage.com
      TAG: ${{ github.event.release.tag_name || inputs.tag }}
    steps:
      - name: Check R2 secrets
        id: r2
        env:
          R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }}
        run: |
          if [ -z "$TAG" ]; then
            echo "::error::No release tag to sync."
            exit 1
          fi
          if [ -n "$R2_ACCOUNT_ID" ] && [ -n "$AWS_ACCESS_KEY_ID" ] && [ -n "$AWS_SECRET_ACCESS_KEY" ]; then
            echo "configured=true" >> "$GITHUB_OUTPUT"
          elif [ "$GITHUB_REPOSITORY" = "farion1231/cc-switch" ]; then
            # A silently stale mirror strands updater users on old versions
            # (the R2 endpoint wins as long as its manifest parses), so the
            # official repo must never skip this sync.
            echo "::error::R2 secrets (R2_ACCOUNT_ID / R2_ACCESS_KEY_ID / R2_SECRET_ACCESS_KEY) are missing on the official repo; refusing to skip the mirror sync."
            exit 1
          else
            echo "configured=false" >> "$GITHUB_OUTPUT"
            echo "R2 secrets not configured; skipping download mirror sync."
          fi

      # Only the tag that IS GitHub's releases/latest may touch the bucket-root
      # manifests or prune old versions. This keeps manual backfills of old
      # tags harmless (they only restore versioned files — otherwise the root
      # manifests would point at a version the prune step deletes right after)
      # and makes out-of-order runs self-correcting: whichever run executes,
      # only the true latest publishes the manifests.
      - name: Check whether tag is the latest stable release
        id: latest
        if: steps.r2.outputs.configured == 'true'
        env:
          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          set -euo pipefail
          # An API failure must fail the run — mapping it to "not latest"
          # would skip the root manifests on a green run, silently leaving
          # them stale (the exact failure mode this workflow exists to make
          # loud). Retry transient errors, then give up loudly.
          latest=""
          for attempt in 1 2 3 4; do
            latest=$(gh api "repos/$GITHUB_REPOSITORY/releases/latest" --jq .tag_name || true)
            if [ -n "$latest" ]; then
              break
            fi
            if [ "$attempt" -lt 4 ]; then
              sleep $((attempt * 10))
            fi
          done
          if [ -z "$latest" ]; then
            echo "::error::Could not resolve the latest stable release from GitHub after 4 attempts; failing instead of guessing."
            exit 1
          fi
          if [ "$TAG" = "$latest" ]; then
            echo "is_latest=true" >> "$GITHUB_OUTPUT"
            echo "$TAG is the latest stable release; full sync."
          else
            echo "is_latest=false" >> "$GITHUB_OUTPUT"
            echo "::warning::$TAG is not the latest stable release ($latest); syncing versioned files only — root manifests and pruning are skipped."
          fi

      - name: Checkout scripts
        if: steps.r2.outputs.configured == 'true' && steps.latest.outputs.is_latest == 'true'
        uses: actions/checkout@v6
        with:
          sparse-checkout: scripts

      - name: Download release assets
        if: steps.r2.outputs.configured == 'true'
        env:
          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          set -euo pipefail
          mkdir -p r2-assets
          gh release download "$TAG" --dir r2-assets --repo "$GITHUB_REPOSITORY"
          ls -la r2-assets

      - name: Generate download manifest
        if: steps.r2.outputs.configured == 'true' && steps.latest.outputs.is_latest == 'true'
        env:
          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          set -euo pipefail
          pub_date=$(gh release view "$TAG" --repo "$GITHUB_REPOSITORY" --json publishedAt --jq .publishedAt)
          node scripts/generate-download-manifest.mjs r2-assets "$TAG" "$R2_PUBLIC_BASE_URL" manifest.json "$pub_date"

      - name: Rewrite updater manifest for R2
        if: steps.r2.outputs.configured == 'true' && steps.latest.outputs.is_latest == 'true'
        run: |
          set -euo pipefail
          node scripts/rewrite-updater-manifest.mjs r2-assets/latest.json "$TAG" "$R2_PUBLIC_BASE_URL" latest-r2.json

      - name: Upload versioned assets to R2
        if: steps.r2.outputs.configured == 'true'
        run: |
          set -euo pipefail
          # Versioned asset paths never change — cache hard at the edge.
          # .tar.gz is the macOS updater payload; .sig files are not needed
          # (signatures are embedded in latest.json) and latest.json goes to
          # the bucket root with a short TTL instead.
          aws s3 cp r2-assets "s3://$R2_BUCKET/$TAG/" \
            --recursive \
            --exclude "*.sig" --exclude "latest.json" \
            --cache-control "public, max-age=31536000, immutable" \
            --endpoint-url "$R2_ENDPOINT"

      - name: Publish root manifests to R2
        if: steps.r2.outputs.configured == 'true' && steps.latest.outputs.is_latest == 'true'
        env:
          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          set -euo pipefail
          # Re-verify right before touching the root manifests: a newer
          # release may have been promoted while assets were downloading.
          # Skipping then is safe — the newer release's own queued run
          # publishes the newer manifests. An unresolvable API is still a
          # hard failure, never a guess.
          latest=""
          for attempt in 1 2 3 4; do
            latest=$(gh api "repos/$GITHUB_REPOSITORY/releases/latest" --jq .tag_name || true)
            if [ -n "$latest" ]; then
              break
            fi
            if [ "$attempt" -lt 4 ]; then
              sleep $((attempt * 10))
            fi
          done
          if [ -z "$latest" ]; then
            echo "::error::Could not re-verify the latest stable release before publishing root manifests; failing instead of guessing."
            exit 1
          fi
          if [ "$TAG" != "$latest" ]; then
            echo "::warning::$TAG stopped being the latest stable release mid-run ($latest is); leaving root manifests untouched."
            exit 0
          fi
          # Both manifests are replaced on every release — keep edge cache
          # short. Uploaded after the assets they reference so an aborted run
          # never leaves them pointing at missing files.
          aws s3 cp manifest.json "s3://$R2_BUCKET/manifest.json" \
            --content-type "application/json" \
            --cache-control "public, max-age=300" \
            --endpoint-url "$R2_ENDPOINT"
          aws s3 cp latest-r2.json "s3://$R2_BUCKET/latest.json" \
            --content-type "application/json" \
            --cache-control "public, max-age=300" \
            --endpoint-url "$R2_ENDPOINT"

      - name: Prune old versions
        if: steps.r2.outputs.configured == 'true' && steps.latest.outputs.is_latest == 'true'
        run: |
          set -euo pipefail
          versions=$(aws s3 ls "s3://$R2_BUCKET/" --endpoint-url "$R2_ENDPOINT" \
            | awk '$1 == "PRE" {print $2}' | tr -d '/' | grep -E '^v[0-9]' | sort -V || true)
          count=$(printf '%s\n' "$versions" | grep -c . || true)
          if [ "$count" -le "$KEEP_VERSIONS" ]; then
            echo "Nothing to prune ($count versions, keeping up to $KEEP_VERSIONS)."
            exit 0
          fi
          printf '%s\n' "$versions" | head -n "-$KEEP_VERSIONS" | while read -r old; do
            [ -n "$old" ] || continue
            echo "Pruning s3://$R2_BUCKET/$old/"
            aws s3 rm "s3://$R2_BUCKET/$old/" --recursive --endpoint-url "$R2_ENDPOINT"
          done

```

## /.github/workflows/wsl2-nightly.yml

```yml path="/.github/workflows/wsl2-nightly.yml" 
name: WSL2 Nightly

# The full backend suite takes 50+ minutes on a \\wsl.localhost 9P filesystem,
# so it runs nightly instead of per PR. The per-PR gate in ci.yml only runs the
# atomic-write contract test against the same WSL2-backed environment.
on:
  schedule:
    - cron: "23 18 * * *" # 02:23 Beijing time
  workflow_dispatch:

jobs:
  backend-windows-wsl2-full:
    name: Backend Full Suite (Windows + WSL2 home)
    runs-on: windows-2025
    timeout-minutes: 90
    permissions:
      contents: read
    steps:
      - name: Checkout
        uses: actions/checkout@v6

      - name: Setup Rust
        uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable

      - name: Setup WSL2
        uses: Vampire/setup-wsl@d1da7f2c0322a5ee4f24975344f67fc0f5baf364 # v7
        with:
          distribution: Ubuntu-24.04
          wsl-version: 2

      - name: Cache Cargo registry and build
        uses: actions/cache@v5
        with:
          path: |
            ~/.cargo/registry
            ~/.cargo/git
            src-tauri/target
          key: ${{ runner.os }}-cargo-${{ hashFiles('src-tauri/Cargo.lock') }}
          restore-keys: ${{ runner.os }}-cargo-

      - name: Create frontend dist placeholder
        shell: bash
        run: mkdir -p dist

      - name: Prepare WSL2-backed test environment
        shell: pwsh
        run: |
          wsl.exe -d Ubuntu-24.04 -- bash -lc "rm -rf /tmp/cc-switch-windows-test-root && mkdir -p /tmp/cc-switch-windows-test-root/{home,temp} && chmod -R 0777 /tmp/cc-switch-windows-test-root"
          $testRoot = "\\wsl.localhost\Ubuntu-24.04\tmp\cc-switch-windows-test-root"
          $testHome = Join-Path $testRoot "home"
          $testTemp = Join-Path $testRoot "temp"
          foreach ($path in @($testRoot, $testHome, $testTemp)) {
            if (-not (Test-Path -LiteralPath $path)) {
              throw "WSL2-backed test path is unavailable: $path"
            }
          }
          "CC_SWITCH_TEST_HOME=$testHome" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
          "CC_SWITCH_WSL_TEST_DIR=$testRoot" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
          "CC_SWITCH_WSL_TEST_TEMP=$testTemp" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

      - name: Compile backend tests with native temp
        # link.exe/mt.exe cannot create manifests when TEMP points at a WSL UNC path.
        run: cargo test --tests --manifest-path src-tauri/Cargo.toml --no-run

      - name: Run Windows-to-WSL2 filesystem contract
        shell: pwsh
        run: |
          $env:TEMP = $env:CC_SWITCH_WSL_TEST_TEMP
          $env:TMP = $env:CC_SWITCH_WSL_TEST_TEMP
          $testName = "config::tests::atomic_write_replaces_existing_wsl_unc_file"
          $testList = cargo test --tests --manifest-path src-tauri/Cargo.toml -- --ignored --list
          if ($LASTEXITCODE -ne 0) {
            exit $LASTEXITCODE
          }
          $expected = "${testName}: test"
          if ($testList -notcontains $expected) {
            throw "Expected ignored test was not discovered: $testName"
          }
          cargo test --tests --manifest-path src-tauri/Cargo.toml $testName -- --ignored --exact --nocapture
          if ($LASTEXITCODE -ne 0) {
            exit $LASTEXITCODE
          }

      - name: Run full test suite against WSL2-backed home
        shell: pwsh
        run: |
          $env:TEMP = $env:CC_SWITCH_WSL_TEST_TEMP
          $env:TMP = $env:CC_SWITCH_WSL_TEST_TEMP
          cargo test --tests --manifest-path src-tauri/Cargo.toml -- --test-threads=1

```

## /.gitignore

```gitignore path="/.gitignore" 
node_modules/
dist/
release/
.DS_Store
*.log
.env
.env.local
*.tsbuildinfo
.npmrc
CLAUDE.md
AGENTS.md
GEMINI.md
/.claude
/.codex
/.gemini
/.cc-switch
/.idea
/.vscode
vitest-report.json
nul

# Flatpak build artifacts
flatpak/cc-switch.deb
flatpak-build/
flatpak-repo/
.worktrees/
.spec-workflow/
copilot-api
.history
CODEBUDDY.md
mainWindow.js

```

## /.node-version

```node-version path="/.node-version" 
22.12.0

```

## /CODE_OF_CONDUCT.md

# Contributor Covenant Code of Conduct

> [中文版本](#贡献者公约行为准则)

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our community include:

- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
- Focusing on what is best not just for us as individuals, but for the overall community

Examples of unacceptable behavior include:

- The use of sexualized language or imagery, and sexual attention or advances of any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email address, without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.

Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at **farion1231@gmail.com**. All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series of actions.

**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder][Mozilla CoC].

For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at [https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations

---

# 贡献者公约行为准则

> [English Version](#contributor-covenant-code-of-conduct)

## 我们的承诺

身为社区成员、贡献者和领袖,我们承诺使社区参与者不受骚扰,无论其年龄、体型、可见或不可见的缺陷、族裔、性征、性别认同和表达、经验水平、教育程度、社会与经济地位、国籍、相貌、种族、种姓、肤色、宗教信仰、性倾向或性取向如何。

我们承诺以有助于建立开放、友善、多样化、包容、健康社区的方式行事和互动。

## 我们的准则

有助于为我们的社区创造积极环境的行为例子包括但不限于:

- 表现出对他人的同情和善意
- 尊重不同的主张、观点和感受
- 提出和大方接受建设性意见
- 承担责任并向受我们错误影响的人道歉
- 注重社区共同诉求,而非个人得失

不当行为例子包括:

- 使用情色化的语言或图像,及性引诱或挑逗
- 嘲弄、侮辱或诋毁性评论,以及人身或政治攻击
- 公开或私下的骚扰行为
- 未经他人明确许可,公布他人的私人信息,如物理或电子邮件地址
- 其他有理由认定为违反职业操守的不当行为

## 责任和权力

社区领袖有责任解释和落实我们所认可的行为准则,并妥善公正地对他们认为不当、威胁、冒犯或有害的任何行为采取纠正措施。

社区领袖有权力和责任删除、编辑或拒绝与本行为准则不相符的评论(comment)、提交(able)、代码、维基(wiki)编辑、议题(able)或其他贡献,并在适当时告知采取措施的理由。

## 适用范围

本行为准则适用于所有社区场合,也适用于在公共场所代表社区时的个人。

代表社区的情形包括使用官方电子邮件地址、通过官方社交媒体帐户发帖或在线上或线下活动中担任指定代表。

## 监督

辱骂、骚扰或其他不可接受的行为可通过 **farion1231@gmail.com** 向负责监督的社区领袖报告。所有投诉都将得到及时和公平的审查和调查。

所有社区领袖都有义务尊重任何事件报告者的隐私和安全。

## 处理方针

社区领袖将遵循下列社区处理方针来明确他们所认定违反本行为准则的行为的处理方式:

### 1. 纠正

**社区影响**:使用不恰当的语言或其他在社区中被认定为不符合职业道德或不受欢迎的行为。

**处理意见**:由社区领袖发出非公开的书面警告,明确说明违规行为的性质,并解释举止如何不妥。或将要求公开道歉。

### 2. 警告

**社区影响**:单个或一系列违规行为。

**处理意见**:警告并对连续性行为进行处理。在指定时间内,不得与相关人员互动,包括主动与行为准则执行者互动。这包括避免在社区场所和外部渠道中的互动。违反这些条款可能会导致临时或永久封禁。

### 3. 临时封禁

**社区影响**:严重违反社区准则,包括持续的不当行为。

**处理意见**:在指定时间内,暂时禁止与社区进行任何形式的互动或公开交流。在此期间,不得与相关人员进行公开或私下互动,包括主动与行为准则执行者互动。违反这些条款可能会导致永久封禁。

### 4. 永久封禁

**社区影响**:行为模式表现出违反社区准则,包括持续的不当行为、骚扰个人或攻击或贬低某个类别的个体。

**处理意见**:永久禁止在社区内进行任何形式的公开互动。

## 参见

本行为准则改编自 [Contributor Covenant][homepage] 2.1 版,参见 [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]。

社区处理方针灵感来源于 [Mozilla 的行为准则执行阶梯][Mozilla CoC]。

有关本行为准则的常见问题的答案,参见 [https://www.contributor-covenant.org/faq][FAQ]。其他语言翻译参见 [https://www.contributor-covenant.org/translations][translations]。

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations


## /CONTRIBUTING.md

# Contributing to CC Switch

> [中文版本](#贡献指南)

Thank you for your interest in contributing to CC Switch! Please read our [Code of Conduct](./CODE_OF_CONDUCT.md) before participating.

## How to Contribute

There are many ways to contribute:

- **Report bugs** — Found something broken? [Open a bug report](https://github.com/farion1231/cc-switch/issues/new?template=bug_report.yml).
- **Suggest features** — Have an idea? [Submit a feature request](https://github.com/farion1231/cc-switch/issues/new?template=feature_request.yml).
- **Improve docs** — Spot a typo or missing info? [Report a doc issue](https://github.com/farion1231/cc-switch/issues/new?template=doc_issue.yml).
- **Contribute code** — Fix bugs or implement features via pull requests.
- **Translate** — Help us improve translations for English, Chinese, and Japanese.

> **Security vulnerabilities**: Please do NOT use public issues. See our [Security Policy](./SECURITY.md) instead.

## Development Setup

### Prerequisites

- Node.js 18+ and pnpm 8+
- Rust 1.85+ and Cargo
- [Tauri 2.0 prerequisites](https://v2.tauri.app/start/prerequisites/)

> **pnpm version**: the exact version is pinned via the `packageManager` field
> in `package.json` (and used by CI, which sets pnpm up through Corepack).
> With Corepack enabled locally (`corepack enable`), your pnpm shim switches
> to the pinned version automatically, with a one-time download on first use;
> without Corepack, any pnpm 8+ keeps working (`package-manager-strict-version`
> defaults to off). To upgrade pnpm, edit the `packageManager` field — Dependabot
> bumps no longer cover the version.

### Quick Start

```bash
# Install dependencies
pnpm install

# Start development server with hot reload
pnpm dev
```

### Useful Commands

| Command | Description |
|---------|-------------|
| `pnpm dev` | Start dev server (hot reload) |
| `pnpm build` | Production build |
| `pnpm typecheck` | TypeScript type checking |
| `pnpm test:unit` | Run unit tests |
| `pnpm lint` | ESLint check |
| `pnpm format` | Format code (Prettier) |
| `pnpm format:check` | Check code formatting |

For Rust backend:

```bash
cd src-tauri
cargo fmt        # Format Rust code
cargo clippy     # Run linter
cargo test       # Run tests
```

## Code Style

- **Frontend**: Prettier for formatting, ESLint for linting, strict TypeScript (`pnpm typecheck`)
- **Backend**: `cargo fmt` for formatting, `cargo clippy` for linting
- **Tauri 2.0**: Command names must use camelCase

Run all checks before submitting:

```bash
pnpm typecheck && pnpm format:check && pnpm test:unit
cd src-tauri && cargo fmt --check && cargo clippy && cargo test
```

## Pull Request Guidelines

1. **Open an issue first** for new features — PRs for features that are not a good fit may be closed.
2. **Fork and branch** — Create a feature branch from `main` (e.g., `feat/my-feature` or `fix/issue-123`).
3. **Keep PRs focused** — One feature or fix per PR. Avoid unrelated changes.
4. **Follow the PR template** — Fill in the summary, related issue, and checklist.

### PR Checklist

- [ ] `pnpm typecheck` passes
- [ ] `pnpm format:check` passes
- [ ] `cargo clippy` passes (if Rust code changed)
- [ ] Updated i18n files if user-facing text changed

### Commit Convention

We use [Conventional Commits](https://www.conventionalcommits.org/):

```
feat(provider): add support for new provider
fix(tray): resolve menu not updating after switch
docs(readme): update installation instructions
ci: add format check workflow
chore(deps): update dependencies
```

## AI-Assisted Contributions

We welcome AI-assisted contributions, but **the responsibility stays with you**. AI tools lower the cost of writing code — they do not lower the cost of reviewing it. Maintainers are not obligated to clean up AI-generated output.

By submitting a PR, you agree to the following:

1. **You have read and understood your code.** You must be able to explain any line in your PR. If you cannot, it is not ready for review.
2. **You have tested it yourself.** Every change must be verified locally — not just "it looks right." Do not submit code for platforms or features you cannot test.
3. **PRs must be small and focused.** One issue, one PR. Large, sprawling, multi-topic PRs will be closed.
4. **Open an issue first.** Drive-by PRs with no prior discussion — especially AI-generated ones — may be closed without review.
5. **Maintainers may close without explanation.** PRs that appear to be unreviewed AI output — hallucinated fixes, unnecessary refactors, bulk changes with no context — may be closed at the maintainer's discretion.

**In short**: AI is a tool, not a substitute for understanding. Use it to help you contribute better, not to shift work onto maintainers.

## Internationalization (i18n)

CC Switch supports three languages. When modifying user-facing text:

1. Update **all three** locale files:
   - `src/locales/en/translation.json`
   - `src/locales/zh/translation.json`
   - `src/locales/ja/translation.json`
2. Use the `t()` function from i18next for all UI text.
3. Never hardcode user-facing strings.

## Questions?

- [Open a question](https://github.com/farion1231/cc-switch/issues/new?template=question.yml)
- [GitHub Discussions](https://github.com/farion1231/cc-switch/discussions)

---

# 贡献指南

> [English Version](#contributing-to-cc-switch)

感谢你对 CC Switch 的贡献兴趣!参与之前请阅读我们的[行为准则](./CODE_OF_CONDUCT.md)。

## 如何贡献

你可以通过多种方式参与贡献:

- **报告 Bug** — 发现问题?[提交 Bug 报告](https://github.com/farion1231/cc-switch/issues/new?template=bug_report.yml)。
- **建议功能** — 有想法?[提交功能请求](https://github.com/farion1231/cc-switch/issues/new?template=feature_request.yml)。
- **改进文档** — 发现错误或缺失?[报告文档问题](https://github.com/farion1231/cc-switch/issues/new?template=doc_issue.yml)。
- **贡献代码** — 通过 Pull Request 修复 Bug 或实现新功能。
- **翻译** — 帮助改进英文、中文和日文的翻译。

> **安全漏洞**:请不要使用公开 Issue 报告。请参阅我们的[安全策略](./SECURITY.md)。

## 开发环境搭建

### 前提条件

- Node.js 18+ 和 pnpm 8+
- Rust 1.85+ 和 Cargo
- [Tauri 2.0 开发环境](https://v2.tauri.app/start/prerequisites/)

> **pnpm 版本**:确切版本由 `package.json` 的 `packageManager` 字段固定
> (CI 通过 Corepack 按此字段安装)。本地启用 Corepack(`corepack enable`)
> 后,pnpm shim 会自动切到该版本(首次使用需一次性下载);未启用 Corepack
> 时任意 pnpm 8+ 均可正常使用(`package-manager-strict-version` 默认关闭)。
> 升级 pnpm 请直接修改 `packageManager` 字段,不再由 Dependabot 代劳。

### 快速开始

```bash
# 安装依赖
pnpm install

# 启动开发服务器(热重载)
pnpm dev
```

### 常用命令

| 命令 | 说明 |
|------|------|
| `pnpm dev` | 启动开发服务器(热重载) |
| `pnpm build` | 构建生产版本 |
| `pnpm typecheck` | TypeScript 类型检查 |
| `pnpm test:unit` | 运行单元测试 |
| `pnpm lint` | ESLint 检查 |
| `pnpm format` | 格式化代码(Prettier) |
| `pnpm format:check` | 检查代码格式 |

Rust 后端命令:

```bash
cd src-tauri
cargo fmt        # 格式化 Rust 代码
cargo clippy     # 运行 Clippy 检查
cargo test       # 运行测试
```

## 代码规范

- **前端**:使用 Prettier 格式化、ESLint 检查、严格 TypeScript(`pnpm typecheck`)
- **后端**:使用 `cargo fmt` 格式化、`cargo clippy` 检查
- **Tauri 2.0**:命令名必须使用 camelCase

提交前运行所有检查:

```bash
pnpm typecheck && pnpm format:check && pnpm test:unit
cd src-tauri && cargo fmt --check && cargo clippy && cargo test
```

## Pull Request 指南

1. **先开 Issue 讨论** — 新功能请先开 Issue,不适合项目方向的 PR 可能会被关闭。
2. **Fork 并创建分支** — 从 `main` 创建功能分支(如 `feat/my-feature` 或 `fix/issue-123`)。
3. **保持 PR 专注** — 每个 PR 只做一件事,避免无关改动。
4. **遵循 PR 模板** — 填写概述、关联 Issue 和检查清单。

### PR 检查清单

- [ ] `pnpm typecheck` 通过
- [ ] `pnpm format:check` 通过
- [ ] `cargo clippy` 通过(如修改了 Rust 代码)
- [ ] 如修改了用户可见文本,已更新国际化文件

### 提交信息规范

我们使用 [Conventional Commits](https://www.conventionalcommits.org/):

```
feat(provider): add support for new provider
fix(tray): resolve menu not updating after switch
docs(readme): update installation instructions
ci: add format check workflow
chore(deps): update dependencies
```

## AI 辅助贡献

我们欢迎 AI 辅助的贡献,但**责任始终在你身上**。AI 工具降低了写代码的成本,但并没有降低 review 的成本。维护者没有义务替你清理 AI 的产出。

提交 PR 即表示你同意以下规则:

1. **你已阅读并理解了你的代码。** 你必须能解释 PR 中的每一行。如果做不到,说明还没准备好提交 review。
2. **你已亲自测试过。** 每个改动都必须在本地验证——而不是"看起来对"。不要提交你自己无法测试的平台或功能的代码。
3. **PR 必须小而聚焦。** 一个 Issue 对应一个 PR。大而散、跨多个主题的 PR 会被直接关闭。
4. **先开 Issue 讨论。** 没有事先讨论的"路过式 PR"——尤其是 AI 生成的——可能会被直接关闭。
5. **维护者可以直接关闭。** 看起来是未经审阅的 AI 产出的 PR——虚构的修复、不必要的重构、缺乏上下文的批量改动——维护者可自行决定关闭。

**一句话总结**:AI 是工具,不是理解力的替代品。用它来帮助你更好地贡献,而不是把工作转移给维护者。

## 国际化(i18n)

CC Switch 支持三种语言。修改用户可见文本时:

1. **同时更新三个**语言文件:
   - `src/locales/en/translation.json`
   - `src/locales/zh/translation.json`
   - `src/locales/ja/translation.json`
2. 所有 UI 文本使用 i18next 的 `t()` 函数。
3. 不要硬编码用户可见的字符串。

## 有疑问?

- [提问](https://github.com/farion1231/cc-switch/issues/new?template=question.yml)
- [GitHub 讨论区](https://github.com/farion1231/cc-switch/discussions)


## /README.md

<div align="center">

# CC Switch

### The All-in-One Manager for Claude Code, Claude Desktop, Codex, Gemini CLI, Grok Build, OpenCode, OpenClaw & Hermes Agent

[![Version](https://img.shields.io/github/v/release/farion1231/cc-switch?color=blue&label=version)](https://github.com/farion1231/cc-switch/releases)
[![Platform](https://img.shields.io/badge/platform-Windows%20%7C%20macOS%20%7C%20Linux-lightgrey.svg)](https://github.com/farion1231/cc-switch/releases)
[![Built with Tauri](https://img.shields.io/badge/built%20with-Tauri%202-orange.svg)](https://tauri.app/)
[![Downloads](https://img.shields.io/github/downloads/farion1231/cc-switch/total)](https://github.com/farion1231/cc-switch/releases/latest)

<a href="https://trendshift.io/repositories/15372" target="_blank"><img src="https://trendshift.io/api/badge/repositories/15372" alt="farion1231%2Fcc-switch | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
<a href="https://www.star-history.com/#farion1231/cc-switch&Date"><picture><source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/badge?repo=farion1231/cc-switch&theme=dark" /><img alt="Star History Rank" src="https://api.star-history.com/badge?repo=farion1231/cc-switch" width="196" height="55" /></picture></a>

### 🌐 The Only Official Website: **[ccswitch.io](https://ccswitch.io)**

English | [中文](README_ZH.md) | [日本語](README_JA.md) | [Deutsch](README_DE.md) | [Changelog](CHANGELOG.md)

</div>

## ❤️Sponsor

> [Want to appear here?](mailto:farion1231@gmail.com)

<details open>
<summary>Click to collapse</summary>

[![Kimi K2.7 Code](https://gcdn.moonshot.cn/growth-cdn/sponsor/kimi-en.png)](https://platform.kimi.ai?track_id=track-20d65732f0aa45dcb1df9691a15610af&aff=cc-switch)

Kimi K3 is Moonshot AI's most capable model and the world's first open 3T-class model. With 2.8 trillion parameters, native vision, and a 1-million-token context window, K3 delivers frontier performance across long-horizon coding, knowledge work, and reasoning. CC Switch makes it easy to configure and switch to Kimi across agentic tools. **[Click here to start using Kimi](https://platform.kimi.ai?track_id=track-20d65732f0aa45dcb1df9691a15610af&aff=cc-switch)**

**New user top-up bonus**: register via [this link](https://platform.kimi.ai?track_id=track-20d65732f0aa45dcb1df9691a15610af&aff=cc-switch) and complete your first top-up to receive 10% of the amount as bonus API credit, up to CNY ¥1,000.

Doing mostly coding work? Try the **[Kimi Code subscription](https://www.kimi.com/code/?aff=cc-switch)**.

---

<table>
<tr>
<td width="180"><a href="https://www.packyapi.ai/register?aff=cc-switch"><img src="assets/partners/logos/packycode.png" alt="PackyCode" width="150"></a></td>
<td>Thanks to PackyCode for sponsoring this project! PackyCode is a reliable and efficient API relay service provider, offering relay services for Claude Code, Codex, Gemini, and more. PackyCode provides special discounts for our software users: register using <a href="https://www.packyapi.ai/register?aff=cc-switch">this link</a> and enter the "cc-switch" promo code during first recharge to get 10% off.</td>
</tr>

<tr>
<td width="180"><a href="https://zetaapi.ai/go/u117"><img src="assets/partners/logos/zetaapi-banner.png" alt="ZetaAPI" width="150"></a></td>
<td>Thanks to ZetaAPI for sponsoring this project! ZetaAPI focuses on real model fidelity, no watered-down responses, no quality degradation, and pricing as low as 35% of official rates. The platform does not mix traffic, secretly replace models with lower-quality alternatives, or use fake model routing. It supports Claude Code, Codex, Gemini, ChatGPT, and other mainstream AI models, helping users significantly reduce API costs while maintaining reliable model quality. At the same time, ZetaAPI provides enterprise-grade SLA-backed stability, standard API compatibility, one API key for multiple models, fast integration, and pay-as-you-go billing, making it suitable for AI products, coding agents, internal business tools, customer service systems, content generation, and automation workflows. If any model is verified to be inconsistent with its stated quality, ZetaAPI backs it with a 10x compensation guarantee, giving users a more stable, transparent, and trustworthy experience. Register via <a href="https://zetaapi.ai/go/u117">this link</a> and use the promo code CC-SWITCH during your first recharge to enjoy an exclusive 10% discount on your first top-up, just for CC Switch users!</td>
</tr>

<tr>
<td width="180"><a href="https://apinebula.ai/VjM74M"><img src="assets/partners/logos/apinebula_banner.png" alt="APINebula" width="150"></a></td>
<td>Thanks to APINEBULA for sponsoring this project! APINEBULA, an enterprise-grade AI aggregation platform under Galaxy Video Bureau, leverages extensive platform resources to provide developers, teams, and enterprises with stable, cost-effective access to large language model APIs. The platform integrates leading, full-powered models like Claude, GPT, and Gemini, allowing you to connect to the world's top AI models through a single API, with prices starting as low as 10% of the original cost. Designed for AI programming, Agent development, and business system integration, APINEBULA supports enterprise-grade high concurrency, formal contracts, corporate bank transfers, and invoicing services. APINEBULA provides special discounts for our software users: register using <a href="https://apinebula.ai/VjM74M">this link</a> and enter the <strong>"ccswitch"</strong> promo code during your first recharge to get <strong>10% off</strong>.</td>
</tr>

<tr>
<td width="180"><a href="https://www.aicodemirror.ai/register?invitecode=9915W3"><img src="assets/partners/logos/aicodemirror.jpg" alt="AICodeMirror" width="150"></a></td>
<td>Thanks to AICodeMirror for sponsoring this project! AICodeMirror provides official high-stability relay services for Claude Code / Codex / Gemini CLI, with enterprise-grade concurrency, fast invoicing, and 24/7 dedicated technical support.
Claude Code / Codex / Gemini official channels at 38% / 2% / 9% of original price, with extra discounts on top-ups! AICodeMirror offers special benefits for CC Switch users: register via <a href="https://www.aicodemirror.ai/register?invitecode=9915W3">this link</a> to enjoy 20% off your first top-up, and enterprise customers can get up to 25% off!</td>
</tr>

<tr>
<td width="180"><a href="https://pateway.ai/?ch=etzpm8&aff=WB6M6F67#/"><img src="assets/partners/logos/pateway.png" alt="PatewayAI" width="150"></a></td>
<td>Thanks to PatewayAI for sponsoring this project! PatewayAI is an API relay service provider built for heavy AI developers, focused on directly relaying official high-quality model APIs. It offers the full Claude lineup and the Codex series, 100% sourced from official channels — no dilution, no fakes, verification welcome. Billing is transparent and every token-level invoice can be audited line by line.
It also supports enterprise-grade concurrency and provides a dedicated management platform for enterprise customers — formal contracts and invoicing are available; visit the official website for contact details.
Register now via <a href="https://pateway.ai/?ch=etzpm8&aff=WB6M6F67#/">this link</a> to receive $3 in trial credit. Top-ups go as low as 60% of the original price, with a two-way referral bonus of up to $150!</td>
</tr>

<tr>
<td width="180"><a href="https://api.fenno.ai/register?redirect=/purchase?tab=subscription%26group=16&aff=P9MR3D3PLCNL"><img src="assets/partners/logos/fenno-banner.png" alt="Fenno.ai" width="150"></a></td>
<td>Thanks to Fenno.ai for sponsoring this project! Fenno.ai is a stable and efficient API relay service provider, currently focused on Codex relay. It is compatible with the OpenAI and Anthropic protocols and can be flexibly used from Codex, Claude Code, OpenCode, and other mainstream coding tools. It reliably supports enterprise-grade workloads of hundreds of billions of tokens per day, with corporate (B2B) settlement and invoicing for both domestic and overseas entities. Fenno.ai offers an exclusive benefit for CC Switch users: subscribe via <a href="https://api.fenno.ai/register?redirect=/purchase?tab=subscription%26group=16&aff=P9MR3D3PLCNL">this link</a> to the $1.99 Trial Plan worth $50 in credits (valid for 7 days), and earn up to 20% in referral rewards — invite more, earn more!</td>
</tr>

<tr>
<td width="180"><a href="https://runapi.host/register?aff=iOKB"><img src="assets/partners/logos/runapi.jpg" alt="RunAPI" width="150"></a></td>
<td>Thanks to RunAPI for sponsoring this project! RunAPI is a high-performance and reliable AI model API gateway — one API key gives you access to 150+ mainstream models including OpenAI, Claude, Gemini, DeepSeek, and Grok, with prices as low as 10% of the official rate and excellent stability. It works seamlessly with Claude Code, OpenClaw, and other tools. Exclusive benefit for CC Switch users: register via <a href="https://runapi.host/register?aff=iOKB">this link</a> and enjoy a 10% discount on your first top-up!</td>
</tr>

<tr>
<td width="180"><a href="https://www.shengsuanyun.com/?from=CH_4HHXMRYF"><img src="assets/partners/logos/shengsuanyun.png" alt="Shengsuanyun" width="150"></a></td>
<td>Thanks to Shengsuanyun for sponsoring this project! Shengsuanyun is a super factory serving AI Native Teams — an industrial-grade AI task parallel execution platform. Its model marketplace aggregates Claude, ChatGPT, Gemini, and other domestic and international LLM and multimedia model capabilities with direct supply. Absolutely no reverse engineering or dilution — platform-wide model SLA availability reaches 99.7%, with <a href="https://watch.shengsuanyun.com/status/shengsuanyun">monitoring dashboards</a> showing green across the board. It also offers enterprise-grade custom gateways for fine-grained team cost and permission management, smart routing, security protection, and BYOK (Bring Your Own Key) hosting. The platform charges on a pay-per-use and tokens plan (coming soon) basis, with invoicing available. Register via <a href="https://www.shengsuanyun.com/?from=CH_4HHXMRYF">this link</a> as a new user to receive ¥10 in credits plus a 10% bonus on your first top-up.</td>
</tr>

<tr>
<td width="180"><a href="https://aigocode.app/invite/CC-SWITCH"><img src="assets/partners/logos/aigocode.png" alt="AIGoCode" width="150"></a></td>
<td>Thanks to AIGoCode for sponsoring this project! AIGoCode is an all-in-one platform that integrates Claude Code, Codex, and the latest Gemini models, providing you with stable, efficient, and highly cost-effective AI coding services. The platform offers flexible subscription plans, zero risk of account suspension, direct access with no VPN required, and lightning-fast responses. AIGoCode has prepared a special benefit for CC Switch users: if you register via <a href="https://aigocode.app/invite/CC-SWITCH">this link</a>, you'll receive an extra 10% bonus credit on your first top-up!</td>
</tr>

<tr>
<td width="180"><a href="https://aicoding.inc/i/CCSWITCH"><img src="assets/partners/logos/aicoding.jpg" alt="AICoding" width="150"></a></td>
<td>Thanks to AICoding for sponsoring this project! AICoding — Global AI Model API Relay Service at Unbeatable Prices! Claude Code at 19% of original price, GPT at just 1%! Trusted by hundreds of enterprises for cost-effective AI services. Supports Claude Code, GPT, Gemini and major domestic models, with enterprise-grade high concurrency, fast invoicing, and 24/7 dedicated technical support. CC Switch users who register via <a href="https://aicoding.inc/i/CCSWITCH">this link</a> get 10% off their first top-up!</td>
</tr>

<tr>
<td width="180"><a href="https://subrouter.ai/register?aff=l3ri"><img src="assets/partners/logos/subrouter-banner.png" alt="SubRouter" width="150"></a></td>
<td>Thanks to SubRouter for sponsoring this project! SubRouter is a marketplace and smart routing platform for AI service operators. Merchants can launch operating sites, publish packages, manage users, models, and pricing, while users discover services and access reliable AI models through one unified API. Register via <a href="https://subrouter.ai/register?aff=l3ri">this link</a>!</td>
</tr>

<tr>
<td width="180"><a href="https://apikey.fun/register?aff=CCSwitch"><img src="assets/partners/logos/apikey_banner.png" alt="APIKEY.FUN" width="150"></a></td>
<td>Thanks to APIKEY.FUN for sponsoring this project! APIKEY.FUN is a professional enterprise-grade AI relay platform dedicated to providing stable, efficient, and low-cost AI model API access for enterprises and individual developers. The platform supports popular mainstream models such as Claude, OpenAI, and Gemini, with prices as low as 7% of official rates. Register through this project's <a href="https://apikey.fun/register?aff=CCSwitch">exclusive link</a> to enjoy an exclusive offer of up to <strong>permanent 5% off top-ups</strong>.</td>
</tr>

<tr>
<td width="180"><a href="https://console.apito.ai/agent/register/pQBql2buaqiX3dDS"><img src="assets/partners/logos/claudeapi.png" alt="ClaudeAPI" width="150"></a></td>
<td>This project is sponsored by <a href="https://console.apito.ai/agent/register/pQBql2buaqiX3dDS">Claude API</a>. Direct Claude API access — connect Claude Code and Agent apps in 3 minutes. New users can claim a free trial credit.Powered by official Anthropic API keys + AWS Bedrock official channels. No reverse engineering, no model degradation. Full support for Opus / Sonnet / Haiku model lineup, with official capabilities preserved including Tool Use, 1M context window, and more. Built for Claude Code power users, Agent engineers, and enterprise engineering teams. Invoicing and dedicated team support available. Click <a href="https://console.apito.ai/agent/register/pQBql2buaqiX3dDS">here</a> to register!</td>
</tr>

<tr>
<td width="180"><a href="https://code0.ai/agent/register/B2XHxGjGmRvqgznY"><img src="assets/partners/logos/code0.png" alt="code0.ai" width="150"></a></td>
<td>Thanks to <a href="https://code0.ai/agent/register/B2XHxGjGmRvqgznY">code0.ai</a> for sponsoring this project! code0.ai is an AI coding service platform built for developers, supporting Claude Code, Codex, Gemini, and other mainstream AI coding capabilities. It helps individual developers and teams use AI Agents more stably and efficiently for coding, debugging, refactoring, and automation workflows. ccswitch users can contact customer support via the <a href="https://code0.ai/agent/register/B2XHxGjGmRvqgznY">code0.ai website</a> to claim test credits and experience a reliable AI coding service.</td>
</tr>

<tr>
<td width="180"><a href="https://teamorouter.com/?utm_source=cc_switch&utm_medium=referral&utm_campaign=ai_directory"><img src="assets/partners/logos/TeamoRouter-banner.png" alt="TeamoRouter" width="150"></a></td>
<td>Thanks to TeamoRouter for sponsoring this project! TeamoRouter is an enterprise-grade Agentic LLM gateway built for developers, AI teams, and businesses. Without requiring any subscriptions, it lets you access Claude Code, Codex, Gemini CLI, OpenAI Codex, and other popular AI agents through a single unified API, while offering API pricing at discounts of up to 90%.
Unlike typical API relay services, TeamoRouter aggregates hundreds of official model providers and trusted infrastructure partners, including OpenAI, Anthropic, Vertex, Azure, and AWS bedrock. Every provider is verified for 100% Agent protocol compatibility, cache performance, and request traceability, ensuring stable quality instead of reverse-engineered or diluted endpoints. The platform delivers near-official TTFT, 99.6% SLA, enterprise-scale throughput up to 5,000 QPM, and industry-leading cache hit rates that dramatically reduce token costs for long-running agent workflows.
TeamoRouter also offers enterprise features including centralized billing, team management, BYOK, smart routing, usage analytics, dynamic provider optimization, and dedicated support. For an even simpler experience, Teamo Desktop lets you use Claude Code, Codex, Gemini CLI, and other popular AI agents with one-click setup—no API key management or manual gateway configuration required. Register via <a href="https://teamorouter.com/?utm_source=cc_switch&utm_medium=referral&utm_campaign=ai_directory">this link</a> as a new user to receive 10% off your first top-up.</td>
</tr>

<tr>
<td width="180"><a href="https://ppio.com/activity/ccswitch"><img src="assets/partners/logos/ppio-banner.png" alt="PPIO" width="150"></a></td>
<td>Thanks to PPIO for sponsoring this project! PPIO is a leading independent Agentic Cloud provider in China, co-founded in 2018 by PPTV founder Yao Xin and former PPTV chief architect Wang Wenyu. A single API key gives you access to every flagship open-source model, including DeepSeek-V4-Flash, Kimi-K3, GLM-5.2, and MiniMax-M3; the enterprise Token Plan is available at up to 40% off and supports 200 seats, and the Fusion blended model matches Fable5 at one-tenth of the price. Register via <a href="https://ppio.com/activity/ccswitch">this link</a> and complete identity verification to receive a ¥10 credit voucher — invite friends to top up and earn up to 15% cashback on their spend.</td>
</tr>

<tr>
<td width="180"><a href="https://www.newapi.ai/"><img src="assets/partners/logos/newapi-banner.png" alt="new-api" width="150"></a></td>
<td>Thanks to the open-source AI infrastructure project <a href="https://www.newapi.ai/">new-api</a> for its strong support of this project! new-api is an open-source AI infrastructure project from QuantumNous and one of the leading unified LLM access-and-distribution projects by activity and adoption, focused on helping developers, teams, and enterprises build manageable, scalable AI service platforms at lower cost. As a fellow project rooted in the open-source ecosystem, new-api hopes to sponsor and support the continued growth of more outstanding open-source projects. 🌟 Star new-api to show your support: <a href="https://github.com/QuantumNous/new-api">https://github.com/QuantumNous/new-api</a>. Website: <a href="https://www.newapi.ai/">https://www.newapi.ai/</a>.</td>
</tr>

<tr>
<td width="180"><a href="https://claudecn.ai/register?aff=HEL9"><img src="assets/partners/logos/claudecn.jpg" alt="ClaudeCN" width="150"></a></td>
<td>Thanks to ClaudeCN for sponsoring this project! ClaudeCN is an enterprise-grade AI gateway platform operated by a registered company. It delivers high-availability commercial API access to popular models including Claude, GPT, and DeepSeek, and is built around formal enterprise procurement workflows — corporate bank transfers, signed contracts, and full compliance. Register via <a href="https://claudecn.ai/register?aff=HEL9">this link</a>!</td>
</tr>

<tr>
<td width="180"><a href="https://www.byteplus.com/en/product/modelark?utm_campaign=hw&utm_content=ccswitch&utm_medium=devrel_tool_web&utm_source=OWO&utm_term=ccswitch"><img src="assets/partners/logos/byteplus.png" alt="BytePlus" width="150"></a></td>
<td>Thanks to Dola seed for sponsoring this project! Dola Seed 2.0 is a full‑modal general large model independently developed by ByteDance for the global market. Built on a unified multimodal architecture, it supports joint understanding and generation of text, images, audio, and video. It natively enables agent collaboration, with strong reasoning, long‑task execution, tool integration, and coding capabilities. It is widely applicable to smart cockpits, personal assistants, education, customer support, marketing, retail, and other scenarios. It excels in multimodal perception, end‑to‑end complex task delivery, stable interaction, and data security, and is readily accessible and deployable via the ModelArk platform.Register via <a href="https://www.byteplus.com/en/product/modelark?utm_campaign=hw&utm_content=ccswitch&utm_medium=devrel_tool_web&utm_source=OWO&utm_term=ccswitch">this link</a> to get 500,000 tokens of free inference quota per model.<a href="https://www.volcengine.com/activity/ai618?utm_campaign=hw&utm_content=hw&utm_medium=devrel_tool_web&utm_source=OWO&utm_term=ccswitch"> >>中国大陆地区的开发者请点击这里</a></td>
</tr>

<tr>
<td width="180"><a href="https://cloud.siliconflow.cn/i/YflgU2Ve"><img src="assets/partners/logos/silicon_en.jpg" alt="SiliconFlow" width="150"></a></td>
<td>Thanks to SiliconFlow for sponsoring this project! SiliconFlow is a high-performance AI infrastructure and model API platform, providing fast and reliable access to language, speech, image, and video models in one place. With pay-as-you-go billing, broad multimodal model support, high-speed inference, and enterprise-grade stability, SiliconFlow helps developers and teams build and scale AI applications more efficiently. Register via <a href="https://cloud.siliconflow.cn/i/YflgU2Ve">this link</a> and complete real-name verification to receive ¥16 in bonus credit, usable across models on the platform. SiliconFlow is also now compatible with OpenClaw, allowing users to connect a SiliconFlow API key and call major AI models for free.</td>
</tr>

<tr>
<td width="180"><a href="https://a6api.com/register?aff=AqNr"><img src="assets/partners/logos/a6-banner-en.jpg" alt="A6API" width="150"></a></td>
<td>Thanks to <a href="https://a6api.com/register?aff=AqNr">A6API</a> for sponsoring this project! A6API is a one-stop AI model API aggregation platform covering Claude, GPT, Gemini, Codex, and other mainstream models. Multiple vendors can list their supply on the platform, so the same model can be quoted competitively by several upstream providers. Smart routing automatically picks the more stable, lower-priced route available and fails over automatically, helping you reduce failed requests, cut costs, and improve stability. Whether you are an individual developer, an AI product team, or a studio, you can integrate quickly through a unified interface — compatible with all formats, with low migration cost. New users who register via <a href="https://a6api.com/register?aff=AqNr">this link</a> receive free trial credits: try it first, then use it at a low price.</td>
</tr>

<tr>
<td width="180"><a href="https://www.atlascloud.ai/coding-plan?utm_source=github&utm_campaign=cc-switch"><img src="assets/partners/logos/atlascloud_banner.png" alt="Atlas Cloud" width="150"></a></td>
<td>Atlas Cloud is a full-modal AI inference platform that gives developers a single AI API to access video generation, image generation, and LLM APIs. Instead of managing multiple vendor integrations, you connect once and get unified access to 300+ curated models across all modalities. Check out Atlas Cloud's new <a href="https://www.atlascloud.ai/coding-plan?utm_source=github&utm_campaign=cc-switch">coding plan</a> promotion for more budget-friendly API access!</td>
</tr>

<tr>
<td width="180"><a href="https://www.compshare.cn/coding-plan?ytag=GPU_YY_YX_git_cc-switch"><img src="assets/partners/logos/ucloud.png" alt="Compshare" width="150"></a></td>
<td>Thanks to Compshare for sponsoring this project! Compshare is UCloud's AI cloud platform, providing stable and comprehensive domestic and international model APIs with just one key. Featuring cost-effective monthly and per-use domestic-model Coding Plan packages, alongside stable officially-relayed overseas models. Supports Claude Code, Codex, and API access. Enterprise-grade high concurrency, 24/7 technical support, and self-service invoicing. Users who register via <a href="https://www.compshare.cn/coding-plan?ytag=GPU_YY_YX_git_cc-switch">this link</a> will receive a free 5 CNY platform trial credit!</td>
</tr>

<tr>
<td width="180"><a href="https://www.ccsub.net/register?ref=Y6Z8DXEA"><img src="assets/partners/logos/ccsub.svg" alt="CCSub" width="150"></a></td>
<td>Thanks to CCSub for sponsoring this project! CCSub is a stable, affordable AI API relay platform — your drop-in replacement for a Claude.ai subscription. One API key gives you access to Claude Opus 4.8, Sonnet, Haiku, GPT-5, Gemini, and DeepSeek at roughly 30% of direct API cost, with no VPN required from anywhere in the world. Compatible with Claude Code, Codex, Cursor, Cline, Continue, Windsurf, and all major AI coding tools. Register via <a href="https://www.ccsub.net/register?ref=Y6Z8DXEA">this link</a> and get $5 free credit on sign-up.</td>
</tr>

<tr>
<td width="180"><a href="https://www.sssaicode.com/register?ref=DCP0SM"><img src="assets/partners/logos/sssaicode.png" alt="SSSAiCode" width="150"></a></td>
<td>Thanks to SSSAiCode for sponsoring this project! SSSAiCode is a stable and reliable API relay service, dedicated to providing stable, reliable, and affordable Claude and Codex model services, with same-day fast invoicing. SSSAiCode offers a special deal for CC Switch users: register via <a href="https://www.sssaicode.com/register?ref=DCP0SM">this link</a> to enjoy $10 extra credit on every top-up!</td>
</tr>

<tr>
<td width="180"><a href="https://www.micuapi.ai/register?aff=aOYQ"><img src="assets/partners/logos/mikubanner.svg" alt="Micu" width="150"></a></td>
<td>Thanks to Micu API for sponsoring this project! Micu API is a global LLM relay service provider dedicated to delivering the best cost-performance ratio with high stability. Backed by a registered enterprise for core assurance, eliminating any risk of service discontinuation, with fast official invoicing support! We champion "zero cost to try": top up from as low as ¥1 with no minimum, and get fee-free refunds anytime! Micu API offers an exclusive deal for CC Switch users: register via <a href="https://www.micuapi.ai/register?aff=aOYQ">this link</a> and enter promo code "ccswitch" when topping up to enjoy a <strong>10% discount</strong>!</td>
</tr>

<tr>
<td width="180"><a href="https://www.rightapi.ai/register?aff=CCSWITCH"><img src="assets/partners/logos/rightcode.jpg" alt="RightCode" width="150"></a></td>
<td>Thank you to Right Code for sponsoring this project! Right Code reliably provides routing services for models such as Claude Code, Codex, and Gemini, with both pay-as-you-go and monthly subscription billing options available. Invoices are available upon top-up, and enterprise and team users can receive dedicated one-on-one support. Right Code also offers an exclusive discount for CC Switch users: register via <a href="https://www.rightapi.ai/register?aff=CCSWITCH">this link</a>, and with every top-up you will receive pay-as-you-go credit equivalent to 5% of the amount paid.</td>
</tr>

<tr>
<td width="180"><a href="https://etok.ai"><img src="assets/partners/logos/etok.png" alt="ETok" width="150"></a></td>
<td>Thanks to ETok.ai for sponsoring this project! ETok.ai is dedicated to building a one-stop AI programming tool service platform. We offer professional Claude Code packages and technical community services, with support for Google Gemini and OpenAI Codex. Through carefully designed plans and a professional tech community, we provide developers with reliable service guarantees and continuous technical support, making AI-assisted programming a true productivity tool. Click <a href="https://etok.ai">here</a> to register!</td>
</tr>

<tr>
<td width="180"><a href="https://cubence.com/signup?code=CCSWITCH&source=ccs"><img src="assets/partners/logos/cubence.png" alt="Cubence" width="150"></a></td>
<td>Thanks to Cubence for sponsoring this project! Cubence is a reliable and efficient API relay service provider, offering relay services for Claude Code, Codex, Gemini, and more with flexible billing options including pay-as-you-go and monthly plans. Cubence provides special discounts for CC Switch users: register using <a href="https://cubence.com/signup?code=CCSWITCH&source=ccs">this link</a> and enter the "CCSWITCH" promo code during recharge to get 10% off every top-up!</td>
</tr>

<tr>
<td width="180"><a href="https://crazyrouter.com/register?aff=OZcm&ref=cc-switch"><img src="assets/partners/logos/crazyrouter.png" alt="Crazyrouter" width="150"></a></td>
<td>Thanks to Crazyrouter for sponsoring this project! Crazyrouter is a high-performance AI API aggregation platform — one API key for 300+ models including Claude Code, Codex, Gemini CLI, and more. All models at 55% of official pricing with auto-failover, smart routing, and unlimited concurrency. Crazyrouter offers an exclusive deal for CC Switch users: register via <a href="https://crazyrouter.com/register?aff=OZcm&ref=cc-switch">this link</a> and contact customer support to claim <strong>$2 free credit</strong>, plus enter promo code `CCSWITCH` on your first top-up for an extra <strong>30% bonus credit</strong>! </td>
</tr>

<tr>
<td width="180"><a href="https://www.dmxapi.cn/register?aff=bUHu"><img src="assets/partners/logos/dmx-en.jpg" alt="DMXAPI" width="150"></a></td>
<td>Thanks to DMXAPI for sponsoring this project! DMXAPI provides global large model API services to 200+ enterprise users. One API key for all global models. Features include: instant invoicing, unlimited concurrency, starting from $0.15, 24/7 technical support. GPT/Claude/Gemini all at 32% off, domestic models 20-50% off, Claude Code exclusive models at 66% off! <a href="https://www.dmxapi.cn/register?aff=bUHu">Register here</a></td>
</tr>

</table>

</details>

## Why CC Switch?

Modern AI-powered coding relies on tools like Claude Code, Claude Desktop, Codex, Gemini CLI, Grok Build, OpenCode, OpenClaw, and Hermes — but each has its own configuration format. Switching API providers means manually editing JSON, TOML, or `.env` files, and there is no unified way to manage MCP and Skills across multiple tools.

**CC Switch** gives you a single desktop app to manage all supported AI tools. Instead of editing config files by hand, you get a visual interface to import providers with one click, switch between them instantly, with 50+ built-in provider presets, unified MCP and Skills management, and system tray quick switching — all backed by a reliable SQLite database with atomic writes that protect your configs from corruption.

- **One App, Eight Tools** — Manage Claude Code, Claude Desktop, Codex, Gemini CLI, Grok Build, OpenCode, OpenClaw, and Hermes from a single interface
- **No More Manual Editing** — 50+ provider presets including AWS Bedrock, NVIDIA NIM, and community relays; just pick and switch
- **Unified MCP & Skills Management** — One panel to manage MCP servers and Skills across Claude, Codex, Gemini, Grok Build, OpenCode, and Hermes with bidirectional sync
- **System Tray Quick Switch** — Switch providers instantly from the tray menu, no need to open the full app
- **Cloud Sync** — Sync provider data across devices via Dropbox, OneDrive, iCloud, or WebDAV servers
- **Cross-Platform** — Native desktop app for Windows, macOS, and Linux, built with Tauri 2
- **Built-in Utilities** — Includes various utilities for first-launch login confirmation, signature bypass, plugin extension sync, and more

## Screenshots

|                  Main Interface                   |                  Add Provider                  |
| :-----------------------------------------------: | :--------------------------------------------: |
| ![Main Interface](assets/screenshots/main-en.png) | ![Add Provider](assets/screenshots/add-en.png) |

## Features

[Full Changelog](CHANGELOG.md) | [Release Notes](docs/release-notes/v3.16.1-en.md)

### Provider Management

- **8 supported tools, 50+ presets** — Claude Code, Claude Desktop, Codex, Gemini CLI, Grok Build, OpenCode, OpenClaw, Hermes; copy your key and import with one click
- **Universal providers** — One config syncs to Claude Code, Codex, and Gemini CLI
- One-click switching, system tray quick access, drag-and-drop sorting, import/export

### Proxy & Failover

- **Local proxy with hot-switching** — Format conversion, auto-failover, circuit breaker, provider health monitoring, and request rectifier
- **App-level takeover** — Independently proxy Claude, Codex, Gemini, or Grok Build, down to individual providers

### MCP, Prompts & Skills

- **Unified MCP panel** — Manage MCP servers across Claude, Codex, Gemini, Grok Build, OpenCode, and Hermes with bidirectional sync and Deep Link import
- **Prompts** — Markdown editor with cross-app sync (CLAUDE.md / AGENTS.md / GEMINI.md) and backfill protection
- **Skills** — One-click install from GitHub repos or ZIP files, custom repository management, with symlink and file copy support

### Usage & Cost Tracking

- **Usage dashboard** — Track spending, requests, and tokens with trend charts, detailed request logs, and custom per-model pricing

### Session Manager & Workspace

- Browse, search, and restore conversation history across supported session sources
- **Workspace editor** (OpenClaw) — Edit agent files (AGENTS.md, SOUL.md, etc.) with Markdown preview

### System & Platform

- **Cloud sync** — Custom config directory (Dropbox, OneDrive, iCloud, NAS) and WebDAV server sync
- **Deep Link** (`ccswitch://`) — Import providers, MCP servers, prompts, and skills via URL
- Dark / Light / System theme, auto-launch, auto-updater, atomic writes, auto-backups, i18n (zh/zh-TW/en/ja)

## FAQ

<details>
<summary><strong>Which AI tools does CC Switch support?</strong></summary>

CC Switch supports eight tools: **Claude Code**, **Claude Desktop**, **Codex**, **Gemini CLI**, **Grok Build**, **OpenCode**, **OpenClaw**, and **Hermes**. Each tool has dedicated provider presets and configuration management.

</details>

<details>
<summary><strong>Do I need to restart the terminal after switching providers?</strong></summary>

For most tools, yes — restart your terminal or the CLI tool for changes to take effect. The exception is **Claude Code**, which currently supports hot-switching of provider data without a restart.

</details>

<details>
<summary><strong>My plugin configuration disappeared after switching providers — what happened?</strong></summary>

CC Switch provides a "Shared Config Snippet" feature to pass common data (beyond API keys and endpoints) between providers. Go to "Edit Provider" → "Shared Config Panel" → click "Extract from Current Provider" to save all common data. When creating a new provider, check "Write Shared Config" (enabled by default) to include plugin data in the new provider. All your configuration items are preserved in the default provider imported when you first launched the app.

</details>

<details>
<summary><strong>macOS installation</strong></summary>

CC Switch for macOS is code-signed and notarized by Apple. You can download and install it directly — no extra steps needed. We recommend using the `.dmg` installer.

</details>

<details>
<summary><strong>Why can't I delete the currently active provider?</strong></summary>

CC Switch follows a "minimal intrusion" design principle — even if you uninstall the app, your CLI tools will continue to work normally. The system always keeps one active configuration, because deleting all configurations would make the corresponding CLI tool unusable. If you rarely use a specific CLI tool, you can hide it in Settings. To switch back to official login, see the next question.

</details>

<details>
<summary><strong>How do I switch back to official login?</strong></summary>

Add an official provider from the preset list. After switching to it, run the Log out / Log in flow, and then you can freely switch between the official provider and third-party providers. Codex supports switching between different official providers, making it easy to switch between multiple Plus or Team accounts.

</details>

<details>
<summary><strong>Where is my data stored?</strong></summary>

- **Database**: `~/.cc-switch/cc-switch.db` (SQLite — providers, MCP, prompts, skills)
- **Local settings**: `~/.cc-switch/settings.json` (device-level UI preferences)
- **Backups**: `~/.cc-switch/backups/` (auto-rotated, keeps 10 most recent)
- **Skills**: `~/.cc-switch/skills/` (symlinked to corresponding apps by default)
- **Skill Backups**: `~/.cc-switch/skill-backups/` (created automatically before uninstall, keeps 20 most recent)

</details>

<details>
<summary><strong>Linux (Wayland + NVIDIA): clicks don't register and the window black-screens on resize</strong></summary>

The AppImage forces `GDK_BACKEND=x11` (XWayland) to avoid a historical native-Wayland crash. On newer Wayland + NVIDIA setups this can leave the web content area unclickable (the title-bar buttons still work) and black-screen on resize. Launch with the opt-in escape hatch to switch back to native Wayland:

```bash
CC_SWITCH_GDK_BACKEND=wayland ./CC-Switch-*.AppImage
```

If you launch from a desktop icon, add it to the `.desktop` `Exec=` line (e.g. `env CC_SWITCH_GDK_BACKEND=wayland /path/to/AppImage`) or set it in your session environment. The variable is generic: on tiling Wayland compositors (sway/Hyprland) where clicks don't register, try `CC_SWITCH_GDK_BACKEND=x11` instead. Leaving it unset keeps the default behavior.

</details>

## Documentation

For detailed guides on every feature, check out the **[User Manual](docs/user-manual/en/README.md)** — covering provider management, MCP/Prompts/Skills, proxy & failover, and more.

## Quick Start

### Basic Usage

1. **Add Provider**: Click "Add Provider" → Choose a preset or create custom configuration
2. **Switch Provider**:
   - Main UI: Select provider → Click "Enable"
   - System Tray: Click provider name directly (instant effect)
3. **Takes Effect**: Restart your terminal or the corresponding CLI tool to apply changes (Claude Code does not require a restart)
4. **Back to Official**: Add an "Official Login" preset, restart the CLI tool, then follow its login/OAuth flow

### MCP, Prompts, Skills & Sessions

- **MCP**: Click the "MCP" button → Add servers via templates or custom config → Toggle per-app sync
- **Prompts**: Click "Prompts" → Create presets with Markdown editor → Activate to sync to live files
- **Skills**: Click "Skills" → Browse GitHub repos → One-click install to supported apps
- **Sessions**: Click "Sessions" → Browse, search, and restore conversation history across supported session sources

> **Note**: On first launch, you can manually import existing CLI tool configs as the default provider.

## Download & Installation

### System Requirements

- **Windows**: Windows 10 and above
- **macOS**: macOS 12 (Monterey) and above
- **Linux**: Ubuntu 22.04+ / Debian 11+ / Fedora 34+ and other mainstream distributions

### Windows Users

Download the latest `CC-Switch-v{version}-Windows.msi` installer or `CC-Switch-v{version}-Windows-Portable.zip` portable version from the [Releases](../../releases) page.

### macOS Users

**Method 1: Install via Homebrew (Recommended)**

```bash
brew install --cask cc-switch
```

Update:

```bash
brew upgrade --cask cc-switch
```

**Method 2: Manual Download**

Download `CC-Switch-v{version}-macOS.dmg` (recommended) or `.zip` from the [Releases](../../releases) page.

> **Note**: CC Switch for macOS is code-signed and notarized by Apple. You can install and open it directly.

### Arch Linux Users

**Install via paru (Recommended)**

```bash
paru -S cc-switch-bin
```

### Linux Users

Download the latest Linux build from the [Releases](../../releases) page:

- `CC-Switch-v{version}-Linux.deb` (Debian/Ubuntu)
- `CC-Switch-v{version}-Linux.rpm` (Fedora/RHEL/openSUSE)
- `CC-Switch-v{version}-Linux.AppImage` (Universal)

> **Flatpak**: Not included in official releases. You can build it yourself from the `.deb` — see [`flatpak/README.md`](flatpak/README.md) for instructions.

<details>
<summary><strong>Architecture Overview</strong></summary>

### Design Principles

```
┌─────────────────────────────────────────────────────────────┐
│                    Frontend (React + TS)                    │
│  ┌─────────────┐  ┌──────────────┐  ┌──────────────────┐    │
│  │ Components  │  │    Hooks     │  │  TanStack Query  │    │
│  │   (UI)      │──│ (Bus. Logic) │──│   (Cache/Sync)   │    │
│  └─────────────┘  └──────────────┘  └──────────────────┘    │
└────────────────────────┬────────────────────────────────────┘
                         │ Tauri IPC
┌────────────────────────▼────────────────────────────────────┐
│                  Backend (Tauri + Rust)                     │
│  ┌─────────────┐  ┌──────────────┐  ┌──────────────────┐    │
│  │  Commands   │  │   Services   │  │  Models/Config   │    │
│  │ (API Layer) │──│ (Bus. Layer) │──│     (Data)       │    │
│  └─────────────┘  └──────────────┘  └──────────────────┘    │
└─────────────────────────────────────────────────────────────┘
```

**Core Design Patterns**

- **SSOT** (Single Source of Truth): All data stored in `~/.cc-switch/cc-switch.db` (SQLite)
- **Dual-layer Storage**: SQLite for syncable data, JSON for device-level settings
- **Dual-way Sync**: Write to live files on switch, backfill from live when editing active provider
- **Atomic Writes**: Temp file + rename pattern prevents config corruption
- **Concurrency Safe**: Mutex-protected database connection avoids race conditions
- **Layered Architecture**: Clear separation (Commands → Services → DAO → Database)

**Key Components**

- **ProviderService**: Provider CRUD, switching, backfill, sorting
- **McpService**: MCP server management, import/export, live file sync
- **ProxyService**: Local proxy mode with hot-switching and format conversion
- **SessionManager**: Conversation history browsing across supported session sources
- **ConfigService**: Config import/export, backup rotation
- **SpeedtestService**: API endpoint latency measurement

</details>

<details>
<summary><strong>Development Guide</strong></summary>

### Environment Requirements

- Node.js 18+
- pnpm 8+
- Rust 1.85+
- Tauri CLI 2.8+

### Development Commands

```bash
# Install dependencies
pnpm install

# Dev mode (hot reload)
pnpm dev

# Type check
pnpm typecheck

# Format code
pnpm format

# Check code format
pnpm format:check

# Run frontend unit tests
pnpm test:unit

# Run tests in watch mode (recommended for development)
pnpm test:unit:watch

# Build application
pnpm build

# Build debug version
pnpm tauri build --debug
```

### Rust Backend Development

```bash
cd src-tauri

# Format Rust code
cargo fmt

# Run clippy checks
cargo clippy

# Run backend tests
cargo test

# Run specific tests
cargo test test_name

# Run tests with test-hooks feature
cargo test --features test-hooks
```

### Testing Guide

**Frontend Testing**:

- Uses **vitest** as test framework
- Uses **MSW (Mock Service Worker)** to mock Tauri API calls
- Uses **@testing-library/react** for component testing

**Running Tests**:

```bash
# Run all tests
pnpm test:unit

# Watch mode (auto re-run)
pnpm test:unit:watch

# With coverage report
pnpm test:unit --coverage
```

### Tech Stack

**Frontend**: React 18 · TypeScript · Vite · TailwindCSS 3.4 · TanStack Query v5 · react-i18next · react-hook-form · zod · shadcn/ui · @dnd-kit

**Backend**: Tauri 2.8 · Rust · serde · tokio · thiserror · tauri-plugin-updater/process/dialog/store/log

**Testing**: vitest · MSW · @testing-library/react

</details>

<details>
<summary><strong>Project Structure</strong></summary>

```
├── src/                        # Frontend (React + TypeScript)
│   ├── components/
│   │   ├── providers/          # Provider management
│   │   ├── mcp/                # MCP panel
│   │   ├── prompts/            # Prompts management
│   │   ├── skills/             # Skills management
│   │   ├── sessions/           # Session Manager
│   │   ├── proxy/              # Proxy mode panel
│   │   ├── openclaw/           # OpenClaw config panels
│   │   ├── settings/           # Settings (Terminal/Backup/About)
│   │   ├── deeplink/           # Deep Link import
│   │   ├── env/                # Environment variable management
│   │   ├── universal/          # Cross-app configuration
│   │   ├── usage/              # Usage statistics
│   │   └── ui/                 # shadcn/ui component library
│   ├── hooks/                  # Custom hooks (business logic)
│   ├── lib/
│   │   ├── api/                # Tauri API wrapper (type-safe)
│   │   └── query/              # TanStack Query config
│   ├── locales/                # Translations (zh/zh-TW/en/ja)
│   ├── config/                 # Presets (providers/mcp)
│   └── types/                  # TypeScript definitions
├── src-tauri/                  # Backend (Rust)
│   └── src/
│       ├── commands/           # Tauri command layer (by domain)
│       ├── services/           # Business logic layer
│       ├── database/           # SQLite DAO layer
│       ├── proxy/              # Proxy module
│       ├── session_manager/    # Session management
│       ├── deeplink/           # Deep Link handling
│       └── mcp/                # MCP sync module
├── tests/                      # Frontend tests
└── assets/                     # Screenshots & partner resources
```

</details>

## Contributing

Issues and suggestions are welcome!

Before submitting PRs, please ensure:

- Pass type check: `pnpm typecheck`
- Pass format check: `pnpm format:check`
- Pass unit tests: `pnpm test:unit`

For new features, please open an issue for discussion before submitting a PR. PRs for features that are not a good fit for the project may be closed.

## Star History

[![Star History Chart](https://api.star-history.com/svg?repos=farion1231/cc-switch&type=Date)](https://www.star-history.com/#farion1231/cc-switch&Date)

## License

MIT © Jason Young


## /README_DE.md

<div align="center">

# CC Switch

### Der All-in-One-Manager für Claude Code, Claude Desktop, Codex, Gemini CLI, Grok Build, OpenCode, OpenClaw & Hermes Agent

[![Version](https://img.shields.io/github/v/release/farion1231/cc-switch?color=blue&label=version)](https://github.com/farion1231/cc-switch/releases)
[![Platform](https://img.shields.io/badge/platform-Windows%20%7C%20macOS%20%7C%20Linux-lightgrey.svg)](https://github.com/farion1231/cc-switch/releases)
[![Built with Tauri](https://img.shields.io/badge/built%20with-Tauri%202-orange.svg)](https://tauri.app/)
[![Downloads](https://img.shields.io/github/downloads/farion1231/cc-switch/total)](https://github.com/farion1231/cc-switch/releases/latest)

<a href="https://trendshift.io/repositories/15372" target="_blank"><img src="https://trendshift.io/api/badge/repositories/15372" alt="farion1231%2Fcc-switch | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
<a href="https://www.star-history.com/#farion1231/cc-switch&Date"><picture><source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/badge?repo=farion1231/cc-switch&theme=dark" /><img alt="Star History Rank" src="https://api.star-history.com/badge?repo=farion1231/cc-switch" width="196" height="55" /></picture></a>

### 🌐 Die einzige offizielle Website: **[ccswitch.io](https://ccswitch.io)**

[English](README.md) | [中文](README_ZH.md) | [日本語](README_JA.md) | Deutsch | [Changelog](CHANGELOG.md)

</div>

## ❤️Sponsoren

> [Möchten Sie hier erscheinen?](mailto:farion1231@gmail.com)

<details open>
<summary>Zum Einklappen klicken</summary>

[![Kimi K2.7 Code](https://gcdn.moonshot.cn/growth-cdn/sponsor/kimi-en.png)](https://platform.kimi.ai?track_id=track-20d65732f0aa45dcb1df9691a15610af&aff=cc-switch)

Kimi K3 ist das bislang leistungsstärkste Modell von Moonshot AI und das weltweit erste offene Modell der 3T-Klasse. Mit 2,8 Billionen Parametern, nativen visuellen Fähigkeiten und einem Kontextfenster von 1 Million Token liefert K3 Spitzenleistung bei langfristigen Programmieraufgaben, Wissensarbeit und Reasoning. Mit CC Switch lässt sich Kimi in den verschiedensten Agenten-Tools bequem konfigurieren und umschalten. **[Hier klicken, um Kimi zu nutzen](https://platform.kimi.ai?track_id=track-20d65732f0aa45dcb1df9691a15610af&aff=cc-switch)**

**Bonus für die erste Aufladung neuer Nutzer**: Registrieren Sie sich über [diesen Link](https://platform.kimi.ai?track_id=track-20d65732f0aa45dcb1df9691a15610af&aff=cc-switch) und schließen Sie Ihre erste Aufladung ab, um 10 % des Betrags als Bonus-API-Guthaben zu erhalten – bis zu CNY ¥1.000.

Hauptsächlich mit Programmierung beschäftigt? Probieren Sie das **[Kimi-Code-Abo](https://www.kimi.com/code/?aff=cc-switch)** aus!

---

<table>
<tr>
<td width="180"><a href="https://www.packyapi.ai/register?aff=cc-switch"><img src="assets/partners/logos/packycode.png" alt="PackyCode" width="150"></a></td>
<td>Danke an PackyCode für die Unterstützung dieses Projekts! PackyCode ist ein zuverlässiger und effizienter API-Relay-Anbieter, der Relay-Dienste für Claude Code, Codex, Gemini und mehr bereitstellt. PackyCode bietet Sonderrabatte für Nutzer unserer Software: Registrieren Sie sich über <a href="https://www.packyapi.ai/register?aff=cc-switch">diesen Link</a> und geben Sie beim ersten Aufladen den Gutscheincode „cc-switch" ein, um 10 % Rabatt zu erhalten.</td>
</tr>

<tr>
<td width="180"><a href="https://zetaapi.ai/go/u117"><img src="assets/partners/logos/zetaapi-banner.png" alt="ZetaAPI" width="150"></a></td>
<td>Danke an ZetaAPI für die Unterstützung dieses Projekts! ZetaAPI legt den Fokus auf echte Modelltreue — keine verwässerten Antworten, keine Qualitätsminderung — und Preise von nur 35 % der offiziellen Tarife. Die Plattform mischt keinen Traffic, ersetzt Modelle nicht heimlich durch minderwertige Alternativen und nutzt kein gefälschtes Modell-Routing. Sie unterstützt Claude Code, Codex, Gemini, ChatGPT und weitere gängige KI-Modelle und hilft Nutzern, die API-Kosten deutlich zu senken und gleichzeitig eine zuverlässige Modellqualität zu gewährleisten. Gleichzeitig bietet ZetaAPI eine SLA-gestützte Stabilität auf Unternehmensniveau, Standard-API-Kompatibilität, einen API-Key für mehrere Modelle, schnelle Integration und nutzungsbasierte Abrechnung — geeignet für KI-Produkte, Coding-Agents, interne Unternehmenstools, Kundenservice-Systeme, Content-Erstellung und Automatisierungs-Workflows. Falls bei einem Modell nachgewiesen wird, dass es nicht der angegebenen Qualität entspricht, sichert ZetaAPI dies mit einer 10-fachen Entschädigungsgarantie ab und bietet Nutzern ein stabileres, transparenteres und vertrauenswürdigeres Erlebnis. Registrieren Sie sich über <a href="https://zetaapi.ai/go/u117">diesen Link</a> und verwenden Sie bei Ihrer ersten Aufladung den Promo-Code CC-SWITCH, um als CC-Switch-Nutzer einen exklusiven Rabatt von 10 % auf Ihre erste Aufladung zu erhalten!</td>
</tr>

<tr>
<td width="180"><a href="https://apinebula.ai/VjM74M"><img src="assets/partners/logos/apinebula_banner.png" alt="APINebula" width="150"></a></td>
<td>Danke an APINEBULA für die Unterstützung dieses Projekts! APINEBULA ist eine Enterprise-KI-Aggregationsplattform unter Galaxy Video Bureau und nutzt umfangreiche Plattformressourcen, um Entwicklern, Teams und Unternehmen stabilen und kosteneffizienten Zugang zu APIs großer Sprachmodelle zu bieten. Die Plattform bündelt führende vollwertige Modelle wie Claude, GPT und Gemini. Über eine einzige API erhalten Sie Zugriff auf weltweit führende KI-Modelle, mit Preisen ab 10 % des Originalpreises. APINEBULA ist für KI-Programmierung, Agent-Entwicklung und Integration in Geschäftssysteme ausgelegt und unterstützt enterprise-grade hohe Parallelität, formale Verträge, Firmenüberweisungen und Rechnungsstellung. APINEBULA bietet Nutzern dieser Software besondere Rabatte: Registrieren Sie sich über <a href="https://apinebula.ai/VjM74M">diesen Link</a> und geben Sie beim ersten Aufladen den Aktionscode <strong>"ccswitch"</strong> ein, um <strong>10 % Rabatt</strong> zu erhalten.</td>
</tr>

<tr>
<td width="180"><a href="https://www.aicodemirror.ai/register?invitecode=9915W3"><img src="assets/partners/logos/aicodemirror.jpg" alt="AICodeMirror" width="150"></a></td>
<td>Danke an AICodeMirror für die Unterstützung dieses Projekts! AICodeMirror stellt offizielle, hochstabile Relay-Dienste für Claude Code / Codex / Gemini CLI bereit, mit unternehmensgerechter Nebenläufigkeit, schneller Rechnungsstellung und rund um die Uhr verfügbarem dediziertem technischem Support.
Offizielle Kanäle von Claude Code / Codex / Gemini zu 38 % / 2 % / 9 % des Originalpreises, mit zusätzlichen Rabatten beim Aufladen! AICodeMirror bietet besondere Vorteile für CC-Switch-Nutzer: Registrieren Sie sich über <a href="https://www.aicodemirror.ai/register?invitecode=9915W3">diesen Link</a> und erhalten Sie 20 % Rabatt auf Ihre erste Aufladung; Unternehmenskunden erhalten bis zu 25 % Rabatt!</td>
</tr>

<tr>
<td width="180"><a href="https://pateway.ai/?ch=etzpm8&aff=WB6M6F67#/"><img src="assets/partners/logos/pateway.png" alt="PatewayAI" width="150"></a></td>
<td>Danke an PatewayAI für die Unterstützung dieses Projekts! PatewayAI ist ein API-Relay-Anbieter für anspruchsvolle KI-Entwickler, der sich auf das direkte Relayen offizieller hochwertiger Modell-APIs konzentriert. Er bietet die komplette Claude-Reihe und die Codex-Serie, zu 100 % aus offiziellen Kanälen bezogen — keine Verwässerung, keine Fälschungen, Überprüfung ausdrücklich erwünscht. Die Abrechnung ist transparent, und jede Rechnung auf Token-Ebene lässt sich Zeile für Zeile prüfen.
Er unterstützt zudem unternehmensgerechte Nebenläufigkeit und stellt Unternehmenskunden eine dedizierte Verwaltungsplattform bereit — formelle Verträge und Rechnungsstellung sind verfügbar; Kontaktdaten finden Sie auf der offiziellen Website.
Registrieren Sie sich jetzt über <a href="https://pateway.ai/?ch=etzpm8&aff=WB6M6F67#/">diesen Link</a> und erhalten Sie ein Testguthaben von 3 $. Aufladungen sind ab 60 % des Originalpreises möglich, mit einem beidseitigen Empfehlungsbonus von bis zu 150 $!</td>
</tr>

<tr>
<td width="180"><a href="https://api.fenno.ai/register?redirect=/purchase?tab=subscription%26group=16&aff=P9MR3D3PLCNL"><img src="assets/partners/logos/fenno-banner.png" alt="Fenno.ai" width="150"></a></td>
<td>Danke an Fenno.ai für die Unterstützung dieses Projekts! Fenno.ai ist ein stabiler und effizienter API-Relay-Dienstleister, der sich derzeit hauptsächlich auf Codex-Relay konzentriert. Er ist mit den OpenAI- und Anthropic-Protokollen kompatibel und lässt sich flexibel mit Codex, Claude Code, OpenCode und anderen gängigen Coding-Tools nutzen. Er unterstützt zuverlässig Workloads auf Unternehmensniveau von Hunderten Milliarden Tokens pro Tag und bietet B2B-Abrechnung sowie Rechnungsstellung für Unternehmen im In- und Ausland. Fenno.ai bietet einen exklusiven Vorteil für CC-Switch-Nutzer: Abonnieren Sie über <a href="https://api.fenno.ai/register?redirect=/purchase?tab=subscription%26group=16&aff=P9MR3D3PLCNL">diesen Link</a> den $1,99-Trial-Plan im Wert von $50 Guthaben (7 Tage gültig) und erhalten Sie bis zu 20% Empfehlungsprämien — je mehr Einladungen, desto mehr Belohnung!</td>
</tr>

<tr>
<td width="180"><a href="https://runapi.host/register?aff=iOKB"><img src="assets/partners/logos/runapi.jpg" alt="RunAPI" width="150"></a></td>
<td>Danke an RunAPI für die Unterstützung dieses Projekts! RunAPI ist ein leistungsstarkes und zuverlässiges KI-Modell-API-Gateway — ein API-Schlüssel gibt Ihnen Zugriff auf mehr als 150 gängige Modelle, darunter OpenAI, Claude, Gemini, DeepSeek und Grok, zu Preisen ab 10 % des offiziellen Tarifs und mit ausgezeichneter Stabilität. Es arbeitet nahtlos mit Claude Code, OpenClaw und weiteren Werkzeugen zusammen. Exklusiver Vorteil für CC-Switch-Nutzer: Registrieren Sie sich über <a href="https://runapi.host/register?aff=iOKB">diesen Link</a> und erhalten Sie 10 % Rabatt auf Ihre erste Aufladung!</td>
</tr>

<tr>
<td width="180"><a href="https://www.shengsuanyun.com/?from=CH_4HHXMRYF"><img src="assets/partners/logos/shengsuanyun.png" alt="Shengsuanyun" width="150"></a></td>
<td>Danke an Shengsuanyun für die Unterstützung dieses Projekts! Shengsuanyun ist eine Superfabrik für KI-native Teams — eine Plattform zur parallelen Ausführung von KI-Aufgaben in industrieller Qualität. Ihr Modellmarktplatz bündelt die Fähigkeiten von Claude, ChatGPT, Gemini und weiteren in- und ausländischen LLM- und Multimedia-Modellen mit Direktbezug. Absolut kein Reverse Engineering und keine Verwässerung — die plattformweite Modell-SLA-Verfügbarkeit erreicht 99,7 %, und die <a href="https://watch.shengsuanyun.com/status/shengsuanyun">Monitoring-Dashboards</a> zeigen durchgehend grün an. Es bietet außerdem unternehmensgerechte, anpassbare Gateways für fein abgestufte Kosten- und Berechtigungsverwaltung im Team, intelligentes Routing, Sicherheitsschutz und BYOK-Hosting (Bring Your Own Key). Die Plattform rechnet nach Nutzung sowie über einen Token-Plan (in Kürze verfügbar) ab, und Rechnungsstellung ist möglich. Registrieren Sie sich über <a href="https://www.shengsuanyun.com/?from=CH_4HHXMRYF">diesen Link</a> als Neukunde und erhalten Sie ein Guthaben von ¥10 sowie 10 % Bonus auf Ihre erste Aufladung.</td>
</tr>

<tr>
<td width="180"><a href="https://aigocode.app/invite/CC-SWITCH"><img src="assets/partners/logos/aigocode.png" alt="AIGoCode" width="150"></a></td>
<td>Danke an AIGoCode für die Unterstützung dieses Projekts! AIGoCode ist eine All-in-One-Plattform, die Claude Code, Codex und die neuesten Gemini-Modelle integriert und Ihnen stabile, effiziente und äußerst kostengünstige KI-Coding-Dienste bietet. Die Plattform stellt flexible Abonnementpläne bereit, birgt kein Risiko einer Kontosperrung, ermöglicht Direktzugriff ohne VPN und reagiert blitzschnell. AIGoCode hat ein besonderes Angebot für CC-Switch-Nutzer vorbereitet: Wenn Sie sich über <a href="https://aigocode.app/invite/CC-SWITCH">diesen Link</a> registrieren, erhalten Sie bei Ihrer ersten Aufladung zusätzliche 10 % Bonusguthaben!</td>
</tr>

<tr>
<td width="180"><a href="https://aicoding.inc/i/CCSWITCH"><img src="assets/partners/logos/aicoding.jpg" alt="AICoding" width="150"></a></td>
<td>Danke an AICoding für die Unterstützung dieses Projekts! AICoding — globaler AI-Modell-API-Relay-Dienst zu unschlagbaren Preisen! Claude Code für 19 % des Originalpreises, GPT für nur 1 %! Hunderte Unternehmen vertrauen auf diese kostengünstigen KI-Dienste. Unterstützt Claude Code, GPT, Gemini und führende chinesische Modelle — mit hoher Parallelität auf Unternehmensniveau, schneller Rechnungsstellung und persönlichem technischem Support rund um die Uhr. CC-Switch-Nutzer, die sich über <a href="https://aicoding.inc/i/CCSWITCH">diesen Link</a> registrieren, erhalten 10 % Rabatt auf ihre erste Aufladung!</td>
</tr>

<tr>
<td width="180"><a href="https://subrouter.ai/register?aff=l3ri"><img src="assets/partners/logos/subrouter-banner.png" alt="SubRouter" width="150"></a></td>
<td>Danke an SubRouter für die Unterstützung dieses Projekts! SubRouter ist ein Marktplatz und eine intelligente Routing-Plattform für Betreiber von KI-Diensten. Händler können eigene Betriebsseiten starten, Pakete veröffentlichen sowie Nutzer, Modelle und Preise verwalten, während Nutzer im Marktplatz Dienste entdecken und über eine einzige einheitliche API zuverlässige und effiziente Modellaufrufe nutzen. Registrieren Sie sich über <a href="https://subrouter.ai/register?aff=l3ri">diesen Link</a>!</td>
</tr>

<tr>
<td width="180"><a href="https://apikey.fun/register?aff=CCSwitch"><img src="assets/partners/logos/apikey_banner.png" alt="APIKEY.FUN" width="150"></a></td>
<td>Danke an APIKEY.FUN für die Unterstützung dieses Projekts! APIKEY.FUN ist eine professionelle KI-Relay-Plattform auf Enterprise-Niveau, die Unternehmen und einzelnen Entwicklern stabilen, effizienten und kostengünstigen Zugriff auf KI-Modell-APIs bietet. Die Plattform unterstützt beliebte Mainstream-Modelle wie Claude, OpenAI und Gemini, mit Preisen ab 7 % der offiziellen Tarife. Wer sich über den <a href="https://apikey.fun/register?aff=CCSwitch">exklusiven Link</a> dieses Projekts registriert, kann ein exklusives Angebot von bis zu <strong>dauerhaft 5 % Rabatt auf Aufladungen</strong> erhalten.</td>
</tr>

<tr>
<td width="180"><a href="https://console.apito.ai/agent/register/pQBql2buaqiX3dDS"><img src="assets/partners/logos/claudeapi.png" alt="ClaudeAPI" width="150"></a></td>
<td>Dieses Projekt wird von <a href="https://console.apito.ai/agent/register/pQBql2buaqiX3dDS">Claude API</a> gesponsert. Direkter Claude-API-Zugriff — verbinden Sie Claude Code und Agent-Apps in 3 Minuten. Neukunden können ein kostenloses Testguthaben einlösen. Betrieben mit offiziellen Anthropic-API-Schlüsseln + offiziellen AWS-Bedrock-Kanälen. Kein Reverse Engineering, keine Modellverschlechterung. Volle Unterstützung der Modellreihe Opus / Sonnet / Haiku, mit erhaltenen offiziellen Fähigkeiten einschließlich Tool Use, 1M-Kontextfenster und mehr. Entwickelt für Claude-Code-Power-User, Agent-Ingenieure und technische Unternehmensteams. Rechnungsstellung und dedizierter Team-Support verfügbar. Klicken Sie <a href="https://console.apito.ai/agent/register/pQBql2buaqiX3dDS">hier</a>, um sich zu registrieren!</td>
</tr>

<tr>
<td width="180"><a href="https://code0.ai/agent/register/B2XHxGjGmRvqgznY"><img src="assets/partners/logos/code0.png" alt="code0.ai" width="150"></a></td>
<td>Vielen Dank an <a href="https://code0.ai/agent/register/B2XHxGjGmRvqgznY">code0.ai</a> für die Unterstützung dieses Projekts! code0.ai ist eine für Entwickler entwickelte AI-Coding-Service-Plattform, die Claude Code, Codex, Gemini und weitere gängige AI-Coding-Funktionen unterstützt. Sie hilft einzelnen Entwicklern und Teams, AI-Agents stabiler und effizienter für Programmierung, Debugging, Refactoring und Automatisierungs-Workflows zu nutzen. ccswitch-Nutzer können über die <a href="https://code0.ai/agent/register/B2XHxGjGmRvqgznY">code0.ai-Website</a> den Kundensupport kontaktieren, um Testguthaben zu erhalten und einen zuverlässigen AI-Coding-Service zu erleben.</td>
</tr>

<tr>
<td width="180"><a href="https://teamorouter.com/?utm_source=cc_switch&utm_medium=referral&utm_campaign=ai_directory"><img src="assets/partners/logos/TeamoRouter-banner.png" alt="TeamoRouter" width="150"></a></td>
<td>Danke an TeamoRouter für die Unterstützung dieses Projekts! TeamoRouter ist ein Agentic-LLM-Gateway in Enterprise-Qualität, das für Entwickler, KI-Teams und Unternehmen entwickelt wurde. Ganz ohne Abonnement können Sie über eine einzige einheitliche API auf Claude Code, Codex, Gemini CLI, OpenAI Codex und weitere beliebte KI-Agenten zugreifen — bei API-Preisen mit Rabatten von bis zu 90 %.
Anders als typische API-Relay-Dienste bündelt TeamoRouter Hunderte offizieller Modellanbieter und vertrauenswürdiger Infrastrukturpartner, darunter OpenAI, Anthropic, Vertex, Azure und AWS Bedrock. Jeder Anbieter wird auf 100%ige Kompatibilität mit dem Agent-Protokoll, Cache-Performance und Nachverfolgbarkeit von Anfragen geprüft und liefert so stabile Qualität statt reverse-engineerter oder verwässerter Endpunkte. Die Plattform bietet nahezu offizielle TTFT, 99,6 % SLA, Durchsatz in Unternehmensgröße von bis zu 5.000 QPM und branchenführende Cache-Trefferquoten, die die Token-Kosten für langlaufende Agent-Workflows drastisch senken.
TeamoRouter bietet außerdem Enterprise-Funktionen wie zentrale Abrechnung, Team-Verwaltung, BYOK, intelligentes Routing, Nutzungsanalysen, dynamische Anbieter-Optimierung und dedizierten Support. Für ein noch einfacheres Erlebnis können Sie mit Teamo Desktop Claude Code, Codex, Gemini CLI und weitere beliebte KI-Agenten per Ein-Klick-Einrichtung nutzen — ohne Verwaltung von API-Schlüsseln oder manuelle Gateway-Konfiguration. Registrieren Sie sich als neuer Nutzer über <a href="https://teamorouter.com/?utm_source=cc_switch&utm_medium=referral&utm_campaign=ai_directory">diesen Link</a> und erhalten Sie 10 % Rabatt auf Ihre erste Aufladung.</td>
</tr>

<tr>
<td width="180"><a href="https://ppio.com/activity/ccswitch"><img src="assets/partners/logos/ppio-banner.png" alt="PPIO" width="150"></a></td>
<td>Danke an PPIO für die Unterstützung dieses Projekts! PPIO ist ein führender unabhängiger Agentic-Cloud-Anbieter in China, 2018 gegründet von PPTV-Gründer Yao Xin und dem früheren PPTV-Chefarchitekten Wang Wenyu. Mit einem einzigen API-Schlüssel erhalten Sie Zugriff auf sämtliche führenden Open-Source-Modelle, darunter DeepSeek-V4-Flash, Kimi-K3, GLM-5.2 und MiniMax-M3; der Token Plan für Unternehmen ist mit bis zu 40 % Rabatt und bis zu 200 Sitzplätzen verfügbar, und das Fusion-Modell erreicht das Niveau von Fable5 zu einem Zehntel des Preises. Registrieren Sie sich über <a href="https://ppio.com/activity/ccswitch">diesen Link</a> und schließen Sie die Identitätsprüfung ab, um einen Gutschein über ¥10 zu erhalten. Wer Freunde einlädt, erhält bis zu 15 % Cashback auf deren Aufladungen.</td>
</tr>

<tr>
<td width="180"><a href="https://www.newapi.ai/"><img src="assets/partners/logos/newapi-banner.png" alt="new-api" width="150"></a></td>
<td>Vielen Dank an das Open-Source-KI-Infrastrukturprojekt <a href="https://www.newapi.ai/">new-api</a> für die tatkräftige Unterstützung dieses Projekts! new-api ist ein Open-Source-KI-Infrastrukturprojekt von QuantumNous und eines der nach Aktivität und Verbreitung führenden Projekte für den einheitlichen Zugang zu und die Verteilung von LLMs, das sich darauf konzentriert, Entwicklern, Teams und Unternehmen beim Aufbau verwaltbarer und skalierbarer KI-Serviceplattformen zu geringeren Kosten zu helfen. Als ein ebenfalls im Open-Source-Ökosystem verwurzeltes Projekt möchte new-api durch Sponsoring die kontinuierliche Weiterentwicklung weiterer herausragender Open-Source-Projekte unterstützen. 🌟 Unterstützen Sie new-api mit einem Star: <a href="https://github.com/QuantumNous/new-api">https://github.com/QuantumNous/new-api</a>. Website: <a href="https://www.newapi.ai/">https://www.newapi.ai/</a>.</td>
</tr>

<tr>
<td width="180"><a href="https://claudecn.ai/register?aff=HEL9"><img src="assets/partners/logos/claudecn.jpg" alt="ClaudeCN" width="150"></a></td>
<td>Danke an ClaudeCN für die Unterstützung dieses Projekts! ClaudeCN ist eine unternehmensgerechte KI-Gateway-Plattform, die von einem eingetragenen Unternehmen betrieben wird. Sie bietet hochverfügbaren kommerziellen API-Zugriff auf beliebte Modelle wie Claude, GPT und DeepSeek und ist auf formelle Unternehmensbeschaffungsprozesse ausgerichtet — Banküberweisungen von Firmen, unterzeichnete Verträge und volle Compliance. Registrieren Sie sich über <a href="https://claudecn.ai/register?aff=HEL9">diesen Link</a>!</td>
</tr>

<tr>
<td width="180"><a href="https://www.byteplus.com/en/product/modelark?utm_campaign=hw&utm_content=ccswitch&utm_medium=devrel_tool_web&utm_source=OWO&utm_term=ccswitch"><img src="assets/partners/logos/byteplus.png" alt="BytePlus" width="150"></a></td>
<td>Danke an Dola seed für die Unterstützung dieses Projekts! Dola Seed 2.0 ist ein voll-modales Allzweck-Großmodell, das von ByteDance eigenständig für den globalen Markt entwickelt wurde. Aufbauend auf einer einheitlichen multimodalen Architektur unterstützt es das gemeinsame Verstehen und Generieren von Text, Bildern, Audio und Video. Es ermöglicht von Haus aus die Zusammenarbeit von Agenten und verfügt über starke Fähigkeiten in den Bereichen Schlussfolgern, Ausführung langer Aufgaben, Werkzeugintegration und Programmierung. Es ist breit einsetzbar — etwa für intelligente Cockpits, persönliche Assistenten, Bildung, Kundensupport, Marketing, Einzelhandel und weitere Szenarien. Es überzeugt bei multimodaler Wahrnehmung, der Ende-zu-Ende-Bewältigung komplexer Aufgaben, stabiler Interaktion und Datensicherheit und ist über die ModelArk-Plattform einfach zugänglich und bereitstellbar. Registrieren Sie sich über <a href="https://www.byteplus.com/en/product/modelark?utm_campaign=hw&utm_content=ccswitch&utm_medium=devrel_tool_web&utm_source=OWO&utm_term=ccswitch">diesen Link</a> und erhalten Sie pro Modell ein kostenloses Inferenzkontingent von 500.000 Token.<a href="https://www.volcengine.com/activity/ai618?utm_campaign=hw&utm_content=hw&utm_medium=devrel_tool_web&utm_source=OWO&utm_term=ccswitch"> >>中国大陆地区的开发者请点击这里</a></td>
</tr>

<tr>
<td width="180"><a href="https://cloud.siliconflow.cn/i/YflgU2Ve"><img src="assets/partners/logos/silicon_en.jpg" alt="SiliconFlow" width="150"></a></td>
<td>Danke an SiliconFlow für die Unterstützung dieses Projekts! SiliconFlow ist eine leistungsstarke KI-Infrastruktur- und Modell-API-Plattform, die schnellen und zuverlässigen Zugriff auf Sprach-, Audio-, Bild- und Videomodelle an einem Ort bietet. Mit nutzungsbasierter Abrechnung, breiter Unterstützung multimodaler Modelle, Hochgeschwindigkeitsinferenz und unternehmensgerechter Stabilität hilft SiliconFlow Entwicklern und Teams, KI-Anwendungen effizienter zu erstellen und zu skalieren. Registrieren Sie sich über <a href="https://cloud.siliconflow.cn/i/YflgU2Ve">diesen Link</a> und schließen Sie die Identitätsverifizierung ab, um ein Bonusguthaben von ¥16 zu erhalten, das für alle Modelle der Plattform nutzbar ist. SiliconFlow ist zudem nun mit OpenClaw kompatibel, sodass Nutzer einen SiliconFlow-API-Schlüssel verbinden und große KI-Modelle kostenlos aufrufen können.</td>
</tr>

<tr>
<td width="180"><a href="https://a6api.com/register?aff=AqNr"><img src="assets/partners/logos/a6-banner-en.jpg" alt="A6API" width="150"></a></td>
<td>Vielen Dank an <a href="https://a6api.com/register?aff=AqNr">A6API</a> für die Unterstützung dieses Projekts! A6API ist eine All-in-one-Aggregationsplattform für KI-Modell-APIs und deckt Claude, GPT, Gemini, Codex und weitere gängige Modelle ab. Mehrere Anbieter können ihr Angebot einstellen, sodass dasselbe Modell von verschiedenen Upstream-Anbietern im Preiswettbewerb bereitgestellt wird. Intelligentes Routing wählt automatisch die stabilere und günstigere verfügbare Route und schaltet bei Fehlern automatisch um – das reduziert fehlgeschlagene Anfragen, senkt die Kosten und erhöht die Stabilität. Ob einzelne Entwickler, KI-Produktteams oder Studios: Die Anbindung erfolgt schnell über eine einheitliche Schnittstelle, kompatibel mit allen Formaten und mit geringem Migrationsaufwand. Neue Nutzer erhalten bei der Registrierung über <a href="https://a6api.com/register?aff=AqNr">diesen Link</a> kostenloses Testguthaben – erst testen, dann günstig loslegen.</td>
</tr>

<tr>
<td width="180"><a href="https://www.atlascloud.ai/coding-plan?utm_source=github&utm_campaign=cc-switch"><img src="assets/partners/logos/atlascloud_banner.png" alt="Atlas Cloud" width="150"></a></td>
<td>Atlas Cloud ist eine vollmodale KI-Inferenzplattform, die Entwicklern über eine einzige KI-API Zugriff auf Videogenerierung, Bildgenerierung und LLM-APIs bietet. Statt mehrere Anbieterintegrationen zu verwalten, verbinden Sie sich einmal und erhalten einheitlichen Zugriff auf mehr als 300 kuratierte Modelle über alle Modalitäten hinweg. Sehen Sie sich die neue <a href="https://www.atlascloud.ai/coding-plan?utm_source=github&utm_campaign=cc-switch">Coding-Plan</a>-Aktion von Atlas Cloud für kostengünstigeren API-Zugang an!</td>
</tr>

<tr>
<td width="180"><a href="https://www.compshare.cn/coding-plan?ytag=GPU_YY_YX_git_cc-switch"><img src="assets/partners/logos/ucloud.png" alt="Compshare" width="150"></a></td>
<td>Danke an Compshare für die Unterstützung dieses Projekts! Compshare ist die KI-Cloud-Plattform von UCloud, die mit nur einem Schlüssel stabile und umfassende in- und ausländische Modell-APIs bereitstellt. Sie bietet kostengünstige Coding-Plan-Pakete für inländische Modelle mit monatlicher und nutzungsbasierter Abrechnung sowie stabile, offiziell gerelayte ausländische Modelle. Unterstützt Claude Code, Codex und API-Zugriff. Unternehmensgerechte hohe Nebenläufigkeit, technischer Support rund um die Uhr und Self-Service-Rechnungsstellung. Wer sich über <a href="https://www.compshare.cn/coding-plan?ytag=GPU_YY_YX_git_cc-switch">diesen Link</a> registriert, erhält ein kostenloses Plattform-Testguthaben von 5 CNY!</td>
</tr>

<tr>
<td width="180"><a href="https://www.ccsub.net/register?ref=Y6Z8DXEA"><img src="assets/partners/logos/ccsub.svg" alt="CCSub" width="150"></a></td>
<td>Danke an CCSub für die Unterstützung dieses Projekts! CCSub ist eine zuverlässige und kostengünstige AI-API-Relay-Plattform — Ihr direkter Ersatz für ein Claude.ai-Abonnement. Mit einem einzigen API-Schlüssel erhalten Sie Zugriff auf Claude Opus 4.8, Sonnet, Haiku, GPT-5, Gemini und DeepSeek zu etwa 30 % der Kosten der direkten API-Nutzung — ohne VPN, weltweit nutzbar. Kompatibel mit Claude Code, Codex, Cursor, Cline, Continue, Windsurf und allen gängigen AI-Coding-Tools. Registrieren Sie sich über <a href="https://www.ccsub.net/register?ref=Y6Z8DXEA">diesen Link</a> und erhalten Sie $5 Startguthaben bei der Anmeldung.</td>
</tr>

<tr>
<td width="180"><a href="https://www.sssaicode.com/register?ref=DCP0SM"><img src="assets/partners/logos/sssaicode.png" alt="SSSAiCode" width="150"></a></td>
<td>Danke an SSSAiCode für die Unterstützung dieses Projekts! SSSAiCode ist ein stabiler und zuverlässiger API-Relay-Dienst, der sich der Bereitstellung stabiler, zuverlässiger und erschwinglicher Claude- und Codex-Modelldienste widmet, mit schneller Rechnungsstellung am selben Tag. SSSAiCode bietet ein besonderes Angebot für CC-Switch-Nutzer: Registrieren Sie sich über <a href="https://www.sssaicode.com/register?ref=DCP0SM">diesen Link</a> und erhalten Sie bei jeder Aufladung 10 $ zusätzliches Guthaben!</td>
</tr>

<tr>
<td width="180"><a href="https://www.micuapi.ai/register?aff=aOYQ"><img src="assets/partners/logos/mikubanner.svg" alt="Micu" width="150"></a></td>
<td>Danke an Micu API für die Unterstützung dieses Projekts! Micu API ist ein globaler LLM-Relay-Anbieter, der sich der Bereitstellung des besten Preis-Leistungs-Verhältnisses bei hoher Stabilität widmet. Gestützt auf ein eingetragenes Unternehmen als Kernabsicherung wird jedes Risiko einer Diensteinstellung ausgeschlossen, mit schneller offizieller Rechnungsstellung! Wir stehen für „kostenloses Ausprobieren": Aufladungen sind schon ab ¥1 ohne Mindestbetrag möglich, und gebührenfreie Rückerstattungen sind jederzeit möglich! Micu API bietet ein exklusives Angebot für CC-Switch-Nutzer: Registrieren Sie sich über <a href="https://www.micuapi.ai/register?aff=aOYQ">diesen Link</a> und geben Sie beim Aufladen den Gutscheincode „ccswitch" ein, um <strong>10 % Rabatt</strong> zu erhalten!</td>
</tr>

<tr>
<td width="180"><a href="https://www.rightapi.ai/register?aff=CCSWITCH"><img src="assets/partners/logos/rightcode.jpg" alt="RightCode" width="150"></a></td>
<td>Danke an Right Code für die Unterstützung dieses Projekts! Right Code stellt zuverlässig Routing-Dienste für Modelle wie Claude Code, Codex und Gemini bereit, wahlweise mit nutzungsbasierter Abrechnung oder monatlichem Abonnement. Rechnungen sind beim Aufladen verfügbar, und Unternehmens- sowie Teamkunden erhalten dedizierten Einzelsupport. Right Code bietet außerdem einen exklusiven Rabatt für CC-Switch-Nutzer: Registrieren Sie sich über <a href="https://www.rightapi.ai/register?aff=CCSWITCH">diesen Link</a> und erhalten Sie bei jeder Aufladung nutzungsbasiertes Guthaben in Höhe von 5 % des gezahlten Betrags.</td>
</tr>

<tr>
<td width="180"><a href="https://etok.ai"><img src="assets/partners/logos/etok.png" alt="ETok" width="150"></a></td>
<td>Danke an ETok.ai für die Unterstützung dieses Projekts! ETok.ai widmet sich dem Aufbau einer Komplettlösung für KI-Programmierwerkzeuge. Wir bieten professionelle Claude-Code-Pakete und Dienste einer technischen Community, mit Unterstützung für Google Gemini und OpenAI Codex. Durch sorgfältig gestaltete Pläne und eine professionelle Tech-Community geben wir Entwicklern verlässliche Servicegarantien und kontinuierlichen technischen Support an die Hand und machen KI-gestützte Programmierung zu einem echten Produktivitätswerkzeug. Klicken Sie <a href="https://etok.ai">hier</a>, um sich zu registrieren!</td>
</tr>

<tr>
<td width="180"><a href="https://cubence.com/signup?code=CCSWITCH&source=ccs"><img src="assets/partners/logos/cubence.png" alt="Cubence" width="150"></a></td>
<td>Danke an Cubence für die Unterstützung dieses Projekts! Cubence ist ein zuverlässiger und effizienter API-Relay-Anbieter, der Relay-Dienste für Claude Code, Codex, Gemini und mehr mit flexiblen Abrechnungsoptionen einschließlich nutzungsbasierter und monatlicher Pläne bereitstellt. Cubence bietet Sonderrabatte für CC-Switch-Nutzer: Registrieren Sie sich über <a href="https://cubence.com/signup?code=CCSWITCH&source=ccs">diesen Link</a> und geben Sie beim Aufladen den Gutscheincode „CCSWITCH" ein, um bei jeder Aufladung 10 % Rabatt zu erhalten!</td>
</tr>

<tr>
<td width="180"><a href="https://crazyrouter.com/register?aff=OZcm&ref=cc-switch"><img src="assets/partners/logos/crazyrouter.png" alt="Crazyrouter" width="150"></a></td>
<td>Danke an Crazyrouter für die Unterstützung dieses Projekts! Crazyrouter ist eine leistungsstarke KI-API-Aggregationsplattform — ein API-Schlüssel für mehr als 300 Modelle, darunter Claude Code, Codex, Gemini CLI und weitere. Alle Modelle zu 55 % des offiziellen Preises, mit automatischem Failover, intelligentem Routing und unbegrenzter Nebenläufigkeit. Crazyrouter bietet ein exklusives Angebot für CC-Switch-Nutzer: Registrieren Sie sich über <a href="https://crazyrouter.com/register?aff=OZcm&ref=cc-switch">diesen Link</a> und kontaktieren Sie den Kundensupport, um <strong>2 $ Gratisguthaben</strong> zu erhalten; geben Sie zusätzlich bei Ihrer ersten Aufladung den Gutscheincode `CCSWITCH` ein, um <strong>30 % Bonusguthaben</strong> zu bekommen! </td>
</tr>

<tr>
<td width="180"><a href="https://www.dmxapi.cn/register?aff=bUHu"><img src="assets/partners/logos/dmx-en.jpg" alt="DMXAPI" width="150"></a></td>
<td>Danke an DMXAPI für die Unterstützung dieses Projekts! DMXAPI stellt mehr als 200 Unternehmenskunden globale Großmodell-API-Dienste bereit. Ein API-Schlüssel für alle Modelle weltweit. Zu den Funktionen gehören: sofortige Rechnungsstellung, unbegrenzte Nebenläufigkeit, ab 0,15 $, technischer Support rund um die Uhr. GPT/Claude/Gemini durchgehend zu 32 % Rabatt, inländische Modelle 20–50 % Rabatt, exklusive Claude-Code-Modelle zu 66 % Rabatt! <a href="https://www.dmxapi.cn/register?aff=bUHu">Hier registrieren</a></td>
</tr>

</table>

</details>

## Warum CC Switch?

Modernes KI-gestütztes Programmieren stützt sich auf Werkzeuge wie Claude Code, Claude Desktop, Codex, Gemini CLI, Grok Build, OpenCode, OpenClaw und Hermes — doch jedes hat sein eigenes Konfigurationsformat. Der Wechsel des API-Anbieters bedeutet, JSON-, TOML- oder `.env`-Dateien von Hand zu bearbeiten, und es gibt keine einheitliche Möglichkeit, MCP und Skills über mehrere Werkzeuge hinweg zu verwalten.

**CC Switch** gibt Ihnen eine einzige Desktop-App, um alle unterstützten KI-Werkzeuge zu verwalten. Statt Konfigurationsdateien von Hand zu bearbeiten, erhalten Sie eine visuelle Oberfläche, um Anbieter mit einem Klick zu importieren und sofort zwischen ihnen zu wechseln — mit 50+ integrierten Anbieter-Presets, einheitlicher MCP- und Skills-Verwaltung und schnellem Umschalten über das System-Tray. Das Ganze gestützt auf eine zuverlässige SQLite-Datenbank mit atomaren Schreibvorgängen, die Ihre Konfigurationen vor Beschädigung schützen.

- **Eine App, acht Werkzeuge** — Verwalten Sie Claude Code, Claude Desktop, Codex, Gemini CLI, Grok Build, OpenCode, OpenClaw und Hermes über eine einzige Oberfläche
- **Kein manuelles Bearbeiten mehr** — 50+ Anbieter-Presets einschließlich AWS Bedrock, NVIDIA NIM und Community-Relays; einfach auswählen und umschalten
- **Einheitliche MCP- & Skills-Verwaltung** — Ein Panel zur Verwaltung von MCP-Servern und Skills für Claude, Codex, Gemini, Grok Build, OpenCode und Hermes mit bidirektionaler Synchronisierung
- **Schnellumschaltung über System-Tray** — Wechseln Sie Anbieter sofort über das Tray-Menü, ohne die vollständige App öffnen zu müssen
- **Cloud-Synchronisierung** — Synchronisieren Sie Anbieterdaten geräteübergreifend über Dropbox, OneDrive, iCloud oder WebDAV-Server
- **Plattformübergreifend** — Native Desktop-App für Windows, macOS und Linux, gebaut mit Tauri 2
- **Integrierte Hilfsprogramme** — Enthält diverse Hilfsprogramme für die Login-Bestätigung beim Erststart, das Umgehen von Signaturen, die Synchronisierung von Plugin-Erweiterungen und mehr

## Screenshots

|                  Hauptoberfläche                   |                  Anbieter hinzufügen                  |
| :-----------------------------------------------: | :--------------------------------------------: |
| ![Hauptoberfläche](assets/screenshots/main-en.png) | ![Anbieter hinzufügen](assets/screenshots/add-en.png) |

## Funktionen

[Vollständiges Changelog](CHANGELOG.md) | [Release Notes](docs/release-notes/v3.16.1-en.md)

### Anbieterverwaltung

- **8 unterstützte Werkzeuge, 50+ Presets** — Claude Code, Claude Desktop, Codex, Gemini CLI, Grok Build, OpenCode, OpenClaw, Hermes; Schlüssel kopieren und mit einem Klick importieren
- **Universelle Anbieter** — Eine Konfiguration synchronisiert sich mit Claude Code, Codex und Gemini CLI
- Umschaltung mit einem Klick, Schnellzugriff über System-Tray, Sortierung per Drag-and-drop, Import/Export

### Proxy & Failover

- **Lokaler Proxy mit Hot-Switching** — Formatkonvertierung, automatisches Failover, Circuit Breaker, Anbieter-Health-Monitoring und Request-Rectifier
- **Übernahme auf App-Ebene** — Claude, Codex, Gemini oder Grok Build unabhängig über den Proxy leiten, bis hinunter auf einzelne Anbieter

### MCP, Prompts & Skills

- **Einheitliches MCP-Panel** — Verwalten Sie MCP-Server für Claude, Codex, Gemini, Grok Build, OpenCode und Hermes mit bidirektionaler Synchronisierung und Deep-Link-Import
- **Prompts** — Markdown-Editor mit App-übergreifender Synchronisierung (CLAUDE.md / AGENTS.md / GEMINI.md) und Backfill-Schutz
- **Skills** — Installation mit einem Klick aus GitHub-Repositorys oder ZIP-Dateien, Verwaltung eigener Repositorys, mit Unterstützung für Symlinks und Dateikopien

### Nutzungs- & Kostenverfolgung

- **Nutzungs-Dashboard** — Verfolgen Sie Ausgaben, Anfragen und Token mit Trenddiagrammen, detaillierten Anfrageprotokollen und eigener Preisgestaltung pro Modell

### Session Manager & Workspace

- Gesprächsverlauf aus unterstützten Sitzungsquellen durchsuchen, suchen und wiederherstellen
- **Workspace-Editor** (OpenClaw) — Bearbeiten Sie Agent-Dateien (AGENTS.md, SOUL.md usw.) mit Markdown-Vorschau

### System & Plattform

- **Cloud-Synchronisierung** — Eigenes Konfigurationsverzeichnis (Dropbox, OneDrive, iCloud, NAS) und WebDAV-Server-Synchronisierung
- **Deep Link** (`ccswitch://`) — Importieren Sie Anbieter, MCP-Server, Prompts und Skills per URL
- Dunkles / Helles / System-Theme, automatischer Start, automatischer Updater, atomare Schreibvorgänge, automatische Backups, i18n (zh/zh-TW/en/ja)

## FAQ

<details>
<summary><strong>Welche KI-Werkzeuge unterstützt CC Switch?</strong></summary>

CC Switch unterstützt acht Werkzeuge: **Claude Code**, **Claude Desktop**, **Codex**, **Gemini CLI**, **Grok Build**, **OpenCode**, **OpenClaw** und **Hermes**. Jedes Werkzeug verfügt über dedizierte Anbieter-Presets und Konfigurationsverwaltung.

</details>

<details>
<summary><strong>Muss ich das Terminal nach einem Anbieterwechsel neu starten?</strong></summary>

Bei den meisten Werkzeugen ja — starten Sie Ihr Terminal oder das CLI-Werkzeug neu, damit die Änderungen wirksam werden. Die Ausnahme ist **Claude Code**, das derzeit das Hot-Switching von Anbieterdaten ohne Neustart unterstützt.

</details>

<details>
<summary><strong>Meine Plugin-Konfiguration ist nach einem Anbieterwechsel verschwunden — was ist passiert?</strong></summary>

CC Switch bietet eine Funktion „Gemeinsames Konfigurations-Snippet", um gemeinsame Daten (über API-Schlüssel und Endpunkte hinaus) zwischen Anbietern weiterzugeben. Gehen Sie zu „Anbieter bearbeiten" → „Panel für gemeinsame Konfiguration" → klicken Sie auf „Aus aktuellem Anbieter extrahieren", um alle gemeinsamen Daten zu speichern. Aktivieren Sie beim Anlegen eines neuen Anbieters die Option „Gemeinsame Konfiguration schreiben" (standardmäßig aktiviert), um die Plugin-Daten in den neuen Anbieter aufzunehmen. Alle Ihre Konfigurationspunkte bleiben im Standardanbieter erhalten, der beim ersten Start der App importiert wurde.

</details>

<details>
<summary><strong>Installation unter macOS</strong></summary>

CC Switch für macOS ist von Apple code-signiert und notarisiert. Sie können es direkt herunterladen und installieren — es sind keine zusätzlichen Schritte erforderlich. Wir empfehlen die Verwendung des `.dmg`-Installationsprogramms.

</details>

<details>
<summary><strong>Warum kann ich den aktuell aktiven Anbieter nicht löschen?</strong></summary>

CC Switch folgt dem Designprinzip der „minimalen Eingriffstiefe" — selbst wenn Sie die App deinstallieren, funktionieren Ihre CLI-Werkzeuge weiterhin normal. Das System behält immer eine aktive Konfiguration bei, da das Löschen aller Konfigurationen das entsprechende CLI-Werkzeug unbrauchbar machen würde. Wenn Sie ein bestimmtes CLI-Werkzeug selten verwenden, können Sie es in den Einstellungen ausblenden. Wie Sie zurück zum offiziellen Login wechseln, erfahren Sie in der nächsten Frage.

</details>

<details>
<summary><strong>Wie wechsle ich zurück zum offiziellen Login?</strong></summary>

Fügen Sie einen offiziellen Anbieter aus der Preset-Liste hinzu. Führen Sie nach dem Wechsel den Abmelde-/Anmelde-Vorgang aus; anschließend können Sie frei zwischen dem offiziellen Anbieter und Drittanbietern wechseln. Codex unterstützt den Wechsel zwischen verschiedenen offiziellen Anbietern, was das Umschalten zwischen mehreren Plus- oder Team-Konten erleichtert.

</details>

<details>
<summary><strong>Wo werden meine Daten gespeichert?</strong></summary>

- **Datenbank**: `~/.cc-switch/cc-switch.db` (SQLite — Anbieter, MCP, Prompts, Skills)
- **Lokale Einstellungen**: `~/.cc-switch/settings.json` (gerätebezogene UI-Einstellungen)
- **Backups**: `~/.cc-switch/backups/` (automatisch rotiert, behält die 10 neuesten)
- **Skills**: `~/.cc-switch/skills/` (standardmäßig per Symlink mit den entsprechenden Apps verbunden)
- **Skill-Backups**: `~/.cc-switch/skill-backups/` (vor der Deinstallation automatisch erstellt, behält die 20 neuesten)

</details>

<details>
<summary><strong>Linux (Wayland + NVIDIA): Klicks im Webinhalt reagieren nicht, schwarzer Bildschirm beim Größenändern</strong></summary>

Das AppImage erzwingt `GDK_BACKEND=x11` (XWayland), um einen historischen nativen Wayland-Absturz zu vermeiden. Auf neueren Wayland-+-NVIDIA-Systemen kann das dazu führen, dass der Webinhalt nicht anklickbar ist (die Titelleisten-Schaltflächen funktionieren weiterhin) und das Fenster beim Größenändern schwarz wird. Starten Sie mit dem optionalen Notausgang, um zu nativem Wayland zu wechseln:

```bash
CC_SWITCH_GDK_BACKEND=wayland ./CC-Switch-*.AppImage
```

Wenn Sie über ein Desktop-Symbol starten, fügen Sie es der `Exec=`-Zeile der `.desktop`-Datei hinzu (z. B. `env CC_SWITCH_GDK_BACKEND=wayland /pfad/zum/AppImage`) oder setzen Sie es in Ihrer Sitzungsumgebung. Die Variable ist generisch: Auf Tiling-Wayland-Compositors (sway/Hyprland), bei denen Klicks nicht reagieren, versuchen Sie umgekehrt `CC_SWITCH_GDK_BACKEND=x11`. Bleibt sie ungesetzt, bleibt das Standardverhalten erhalten.

</details>

## Dokumentation

Ausführliche Anleitungen zu jeder Funktion finden Sie im **[Benutzerhandbuch](docs/user-manual/en/README.md)** — es deckt Anbieterverwaltung, MCP/Prompts/Skills, Proxy & Failover und mehr ab.

## Schnellstart

### Grundlegende Verwendung

1. **Anbieter hinzufügen**: Klicken Sie auf „Add Provider" → Wählen Sie ein Preset oder erstellen Sie eine eigene Konfiguration
2. **Anbieter wechseln**:
   - Hauptoberfläche: Anbieter auswählen → auf „Enable" klicken
   - System-Tray: Anbietername direkt anklicken (sofort wirksam)
3. **Wirksam werden**: Starten Sie Ihr Terminal oder das entsprechende CLI-Werkzeug neu, um die Änderungen anzuwenden (Claude Code erfordert keinen Neustart)
4. **Zurück zum Offiziellen**: Fügen Sie ein „Official Login"-Preset hinzu, starten Sie das CLI-Werkzeug neu und folgen Sie dann seinem Login-/OAuth-Vorgang

### MCP, Prompts, Skills & Sessions

- **MCP**: Klicken Sie auf die Schaltfläche „MCP" → Server über Vorlagen oder eigene Konfiguration hinzufügen → Synchronisierung pro App umschalten
- **Prompts**: Klicken Sie auf „Prompts" → Presets mit dem Markdown-Editor erstellen → Aktivieren, um mit den Live-Dateien zu synchronisieren
- **Skills**: Klicken Sie auf „Skills" → GitHub-Repositorys durchsuchen → mit einem Klick in unterstützte Apps installieren
- **Sessions**: Klicken Sie auf „Sessions" → Gesprächsverlauf aus unterstützten Sitzungsquellen durchsuchen, suchen und wiederherstellen

> **Hinweis**: Beim Erststart können Sie bestehende CLI-Werkzeug-Konfigurationen manuell als Standardanbieter importieren.

## Download & Installation

### Systemanforderungen

- **Windows**: Windows 10 und höher
- **macOS**: macOS 12 (Monterey) und höher
- **Linux**: Ubuntu 22.04+ / Debian 11+ / Fedora 34+ und andere gängige Distributionen

### Windows-Nutzer

Laden Sie das neueste Installationsprogramm `CC-Switch-v{version}-Windows.msi` oder die portable Version `CC-Switch-v{version}-Windows-Portable.zip` von der Seite [Releases](../../releases) herunter.

### macOS-Nutzer

**Methode 1: Installation über Homebrew (empfohlen)**

```bash
brew install --cask cc-switch
```

Aktualisieren:

```bash
brew upgrade --cask cc-switch
```

**Methode 2: Manueller Download**

Laden Sie `CC-Switch-v{version}-macOS.dmg` (empfohlen) oder `.zip` von der Seite [Releases](../../releases) herunter.

> **Hinweis**: CC Switch für macOS ist von Apple code-signiert und notarisiert. Sie können es direkt installieren und öffnen.

### Arch-Linux-Nutzer

**Installation über paru (empfohlen)**

```bash
paru -S cc-switch-bin
```

### Linux-Nutzer

Laden Sie den neuesten Linux-Build von der Seite [Releases](../../releases) herunter:

- `CC-Switch-v{version}-Linux.deb` (Debian/Ubuntu)
- `CC-Switch-v{version}-Linux.rpm` (Fedora/RHEL/openSUSE)
- `CC-Switch-v{version}-Linux.AppImage` (universell)

> **Flatpak**: Nicht in den offiziellen Releases enthalten. Sie können es selbst aus dem `.deb` bauen — eine Anleitung finden Sie unter [`flatpak/README.md`](flatpak/README.md).

<details>
<summary><strong>Architekturüberblick</strong></summary>

### Designprinzipien

```
┌─────────────────────────────────────────────────────────────┐
│                    Frontend (React + TS)                    │
│  ┌─────────────┐  ┌──────────────┐  ┌──────────────────┐    │
│  │ Components  │  │    Hooks     │  │  TanStack Query  │    │
│  │   (UI)      │──│ (Bus. Logic) │──│   (Cache/Sync)   │    │
│  └─────────────┘  └──────────────┘  └──────────────────┘    │
└────────────────────────┬────────────────────────────────────┘
                         │ Tauri IPC
┌────────────────────────▼────────────────────────────────────┐
│                  Backend (Tauri + Rust)                     │
│  ┌─────────────┐  ┌──────────────┐  ┌──────────────────┐    │
│  │  Commands   │  │   Services   │  │  Models/Config   │    │
│  │ (API Layer) │──│ (Bus. Layer) │──│     (Data)       │    │
│  └─────────────┘  └──────────────┘  └──────────────────┘    │
└─────────────────────────────────────────────────────────────┘
```

**Kern-Designmuster**

- **SSOT** (Single Source of Truth): Alle Daten werden in `~/.cc-switch/cc-switch.db` (SQLite) gespeichert
- **Zweischichtiger Speicher**: SQLite für synchronisierbare Daten, JSON für gerätebezogene Einstellungen
- **Bidirektionale Synchronisierung**: Schreiben in Live-Dateien beim Umschalten, Backfill aus den Live-Dateien beim Bearbeiten des aktiven Anbieters
- **Atomare Schreibvorgänge**: Das Muster aus temporärer Datei + Umbenennen verhindert die Beschädigung von Konfigurationen
- **Nebenläufigkeitssicher**: Eine durch Mutex geschützte Datenbankverbindung vermeidet Race Conditions
- **Geschichtete Architektur**: Klare Trennung (Commands → Services → DAO → Database)

**Schlüsselkomponenten**

- **ProviderService**: Anbieter-CRUD, Umschaltung, Backfill, Sortierung
- **McpService**: Verwaltung von MCP-Servern, Import/Export, Synchronisierung von Live-Dateien
- **ProxyService**: Lokaler Proxy-Modus mit Hot-Switching und Formatkonvertierung
- **SessionManager**: Durchsuchen des Gesprächsverlaufs über alle unterstützten Apps hinweg
- **ConfigService**: Konfigurations-Import/-Export, Backup-Rotation
- **SpeedtestService**: Messung der Latenz von API-Endpunkten

</details>

<details>
<summary><strong>Entwicklungsleitfaden</strong></summary>

### Umgebungsanforderungen

- Node.js 18+
- pnpm 8+
- Rust 1.85+
- Tauri CLI 2.8+

### Entwicklungsbefehle

```bash
# Abhängigkeiten installieren
pnpm install

# Entwicklungsmodus (Hot Reload)
pnpm dev

# Typprüfung
pnpm typecheck

# Code formatieren
pnpm format

# Codeformatierung prüfen
pnpm format:check

# Frontend-Unit-Tests ausführen
pnpm test:unit

# Tests im Watch-Modus ausführen (für die Entwicklung empfohlen)
pnpm test:unit:watch

# Anwendung bauen
pnpm build

# Debug-Version bauen
pnpm tauri build --debug
```

### Entwicklung des Rust-Backends

```bash
cd src-tauri

# Rust-Code formatieren
cargo fmt

# Clippy-Prüfungen ausführen
cargo clippy

# Backend-Tests ausführen
cargo test

# Bestimmte Tests ausführen
cargo test test_name

# Tests mit dem Feature test-hooks ausführen
cargo test --features test-hooks
```

### Testleitfaden

**Frontend-Tests**:

- Verwendet **vitest** als Test-Framework
- Verwendet **MSW (Mock Service Worker)**, um Tauri-API-Aufrufe zu mocken
- Verwendet **@testing-library/react** für Komponententests

**Tests ausführen**:

```bash
# Alle Tests ausführen
pnpm test:unit

# Watch-Modus (automatische erneute Ausführung)
pnpm test:unit:watch

# Mit Coverage-Bericht
pnpm test:unit --coverage
```

### Tech-Stack

**Frontend**: React 18 · TypeScript · Vite · TailwindCSS 3.4 · TanStack Query v5 · react-i18next · react-hook-form · zod · shadcn/ui · @dnd-kit

**Backend**: Tauri 2.8 · Rust · serde · tokio · thiserror · tauri-plugin-updater/process/dialog/store/log

**Testing**: vitest · MSW · @testing-library/react

</details>

<details>
<summary><strong>Projektstruktur</strong></summary>

```
├── src/                        # Frontend (React + TypeScript)
│   ├── components/
│   │   ├── providers/          # Anbieterverwaltung
│   │   ├── mcp/                # MCP-Panel
│   │   ├── prompts/            # Prompts-Verwaltung
│   │   ├── skills/             # Skills-Verwaltung
│   │   ├── sessions/           # Session Manager
│   │   ├── proxy/              # Proxy-Modus-Panel
│   │   ├── openclaw/           # OpenClaw-Konfigurationspanels
│   │   ├── settings/           # Einstellungen (Terminal/Backup/About)
│   │   ├── deeplink/           # Deep-Link-Import
│   │   ├── env/                # Verwaltung von Umgebungsvariablen
│   │   ├── universal/          # App-übergreifende Konfiguration
│   │   ├── usage/              # Nutzungsstatistik
│   │   └── ui/                 # shadcn/ui-Komponentenbibliothek
│   ├── hooks/                  # Eigene Hooks (Geschäftslogik)
│   ├── lib/
│   │   ├── api/                # Tauri-API-Wrapper (typsicher)
│   │   └── query/              # TanStack-Query-Konfiguration
│   ├── locales/                # Übersetzungen (zh/zh-TW/en/ja)
│   ├── config/                 # Presets (providers/mcp)
│   └── types/                  # TypeScript-Definitionen
├── src-tauri/                  # Backend (Rust)
│   └── src/
│       ├── commands/           # Tauri-Befehlsschicht (nach Domäne)
│       ├── services/           # Geschäftslogikschicht
│       ├── database/           # SQLite-DAO-Schicht
│       ├── proxy/              # Proxy-Modul
│       ├── session_manager/    # Sitzungsverwaltung
│       ├── deeplink/           # Deep-Link-Verarbeitung
│       └── mcp/                # MCP-Synchronisierungsmodul
├── tests/                      # Frontend-Tests
└── assets/                     # Screenshots & Partnerressourcen
```

</details>

## Mitwirken

Issues und Vorschläge sind willkommen!

Bitte stellen Sie vor dem Einreichen von PRs Folgendes sicher:

- Typprüfung besteht: `pnpm typecheck`
- Formatprüfung besteht: `pnpm format:check`
- Unit-Tests bestehen: `pnpm test:unit`

Eröffnen Sie für neue Funktionen bitte vor dem Einreichen eines PR ein Issue zur Diskussion. PRs für Funktionen, die nicht gut zum Projekt passen, können geschlossen werden.

## Star History

[![Star History Chart](https://api.star-history.com/svg?repos=farion1231/cc-switch&type=Date)](https://www.star-history.com/#farion1231/cc-switch&Date)

## Lizenz

MIT © Jason Young


## /README_JA.md

<div align="center">

# CC Switch

### Claude Code、Claude Desktop、Codex、Gemini CLI、Grok Build、OpenCode、OpenClaw、Hermes Agent のオールインワン管理ツール

[![Version](https://img.shields.io/github/v/release/farion1231/cc-switch?color=blue&label=version)](https://github.com/farion1231/cc-switch/releases)
[![Platform](https://img.shields.io/badge/platform-Windows%20%7C%20macOS%20%7C%20Linux-lightgrey.svg)](https://github.com/farion1231/cc-switch/releases)
[![Built with Tauri](https://img.shields.io/badge/built%20with-Tauri%202-orange.svg)](https://tauri.app/)
[![Downloads](https://img.shields.io/github/downloads/farion1231/cc-switch/total)](https://github.com/farion1231/cc-switch/releases/latest)

<a href="https://trendshift.io/repositories/15372" target="_blank"><img src="https://trendshift.io/api/badge/repositories/15372" alt="farion1231%2Fcc-switch | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
<a href="https://www.star-history.com/#farion1231/cc-switch&Date"><picture><source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/badge?repo=farion1231/cc-switch&theme=dark" /><img alt="Star History Rank" src="https://api.star-history.com/badge?repo=farion1231/cc-switch" width="196" height="55" /></picture></a>

### 🌐 唯一の公式サイト:**[ccswitch.io](https://ccswitch.io)**

[English](README.md) | [中文](README_ZH.md) | 日本語 | [Deutsch](README_DE.md) | [Changelog](CHANGELOG.md)

</div>

## ❤️スポンサー

> [ここに掲載しませんか?](mailto:farion1231@gmail.com)

<details open>
<summary>クリックで折りたたむ</summary>

[![Kimi K2.7 Code](https://gcdn.moonshot.cn/growth-cdn/sponsor/kimi-en.png)](https://platform.kimi.ai?track_id=track-20d65732f0aa45dcb1df9691a15610af&aff=cc-switch)

Kimi K3 は Moonshot AI がこれまでに開発した中で最も高性能なモデルであり、世界初のオープンソース 3T クラスモデルです。2.8 兆パラメータ、ネイティブな視覚能力、100 万トークンのコンテキストウィンドウを備え、長期にわたるコーディング、ナレッジワーク、推論タスクにおいてフロンティア級の性能を発揮します。CC Switch を使えば、さまざまなエージェントツールで Kimi を手軽に設定・切り替えできます。**[ここをクリックして Kimi を使い始める](https://platform.kimi.ai?track_id=track-20d65732f0aa45dcb1df9691a15610af&aff=cc-switch)**

**新規ユーザー初回チャージ特典**:[こちらのリンク](https://platform.kimi.ai?track_id=track-20d65732f0aa45dcb1df9691a15610af&aff=cc-switch)から登録し、初回チャージに成功すると、チャージ金額の 10%(最大 CNY ¥1,000)が API クレジットとして進呈されます。

コーディング作業がメインですか?**[Kimi Code サブスクリプション](https://www.kimi.com/code/?aff=cc-switch)** をぜひお試しください!

---

<table>
<tr>
<td width="180"><a href="https://www.packyapi.ai/register?aff=cc-switch"><img src="assets/partners/logos/packycode.png" alt="PackyCode" width="150"></a></td>
<td>PackyCode のご支援に感謝します!PackyCode は Claude Code、Codex、Gemini などのリレーサービスを提供する信頼性の高い API 中継プラットフォームです。本ソフト利用者向けに特別割引があります:<a href="https://www.packyapi.ai/register?aff=cc-switch">このリンク</a>で登録し、チャージ時に「cc-switch」クーポンを入力すると 10% オフになります。</td>
</tr>

<tr>
<td width="180"><a href="https://zetaapi.ai/go/u117"><img src="assets/partners/logos/zetaapi-banner.png" alt="ZetaAPI" width="150"></a></td>
<td>本プロジェクトをご支援いただいている ZetaAPI に感謝します!ZetaAPI は、モデル品質の忠実性、水増しなし、性能劣化なし、公式価格の 35% から利用できる低価格を主な特徴としています。プラットフォームはトラフィックの混在、低品質モデルへの密かな切り替え、虚偽のモデルルーティングを行わず、Claude Code、Codex、Gemini、ChatGPT などの主要 AI モデルに対応しており、モデル品質を維持しながら API 利用コストを大幅に削減できます。同時に、ZetaAPI はエンタープライズ級の SLA 安定性保証、標準 API 互換、1つの Key による複数モデル接続、迅速な導入、従量課金などの機能を提供し、AI プロダクト、コード生成、企業内ツール、カスタマーサポート、コンテンツ生成、自動化ワークフローなどの用途に適しています。万が一、モデル品質が表記内容と一致しないことが確認された場合、ZetaAPI は 10 倍補償保証を提供し、ユーザーがより安定して、透明性高く、安心して利用できる環境を実現します。<a href="https://zetaapi.ai/go/u117">こちらのリンク</a>から登録し、初回チャージ時にプロモコード CC-SWITCH を使用すると、CC Switch ユーザー限定の初回チャージ 10% オフ特典をご利用いただけます!</td>
</tr>

<tr>
<td width="180"><a href="https://apinebula.ai/VjM74M"><img src="assets/partners/logos/apinebula_banner.png" alt="APINebula" width="150"></a></td>
<td>本プロジェクトは「APINEBULA」のスポンサーシップにより運営されています!APINEBULA は、「銀河録像局」傘下のエンタープライズ向け AI 統合プラットフォームです。大手の豊富なリソースを背景に、開発者、チーム、そして企業ユーザーの皆様へ、安定性とコストパフォーマンスに優れた大規模言語モデル(LLM)の API 連携サービスを提供しています。Claude、GPT、Gemini をはじめとする世界中の主要なフルスペック(満血)モデルを 1 つの API に集約。世界トップクラスの AI モデルを、<strong>最大 90% OFF(元の価格の 1 割〜)</strong>という圧倒的な低価格でご利用いただけます。また、企業向けの高度な並行処理(高コンカレンシー)、正式な契約締結、法人口座振り込み、請求書・領収書発行など、ビジネス利用に必要なサポートも万全です。AI プログラミング、AI エージェント開発、業務システムへの統合など、様々なシーンに最適です。<a href="https://apinebula.ai/VjM74M">こちらのリンク</a>から登録し、チャージ時にプロモコード <strong>「ccswitch」を入力すると、さらに 10% OFF</strong> の割引特典が適用されます!</td>
</tr>

<tr>
<td width="180"><a href="https://www.aicodemirror.ai/register?invitecode=9915W3"><img src="assets/partners/logos/aicodemirror.jpg" alt="AICodeMirror" width="150"></a></td>
<td>AICodeMirror のご支援に感謝します!AICodeMirror は Claude Code / Codex / Gemini CLI の公式高安定リレーサービスを提供しており、エンタープライズ級の同時接続、迅速な請求書発行、24時間年中無休の専用テクニカルサポートを備えています。
Claude Code / Codex / Gemini 公式チャンネルが最安で元価格の 38% / 2% / 9%、チャージ時にはさらに割引!AICodeMirror は CC Switch ユーザー向けに特別特典を用意:<a href="https://www.aicodemirror.ai/register?invitecode=9915W3">このリンク</a>から登録すると初回チャージ 20% オフ、法人のお客様は最大 25% オフ!</td>
</tr>

<tr>
<td width="180"><a href="https://pateway.ai/?ch=etzpm8&aff=WB6M6F67#/"><img src="assets/partners/logos/pateway.png" alt="PatewayAI" width="150"></a></td>
<td>PatewayAI のご支援に感謝します!PatewayAI はヘビーな AI 開発者向けに、公式直結の高品質モデル API 中継サービスを専門に提供するプロバイダーです。Claude シリーズ全モデルおよび Codex シリーズに対応し、100% 公式ソースから直接提供。混ぜ物・水増しは一切なく、検証も歓迎します。課金は透明で、トークン単位の請求書を 1 件ずつ照合可能です。
エンタープライズ級の高同時接続にも対応し、法人のお客様には専用の管理プラットフォームを提供。正式契約および請求書発行に対応しており、詳細は公式サイトの連絡先よりお問い合わせください。
現在、<a href="https://pateway.ai/?ch=etzpm8&aff=WB6M6F67#/">このリンク</a>からご登録いただくと $3 のトライアルクレジットを進呈。チャージは最安で元価格の 60%、友達紹介は双方にボーナスが付与され、紹介報酬は最大 $150!</td>
</tr>

<tr>
<td width="180"><a href="https://api.fenno.ai/register?redirect=/purchase?tab=subscription%26group=16&aff=P9MR3D3PLCNL"><img src="assets/partners/logos/fenno-banner.png" alt="Fenno.ai" width="150"></a></td>
<td>Fenno.ai のご支援に感謝します!Fenno.ai は安定かつ高効率な API 中継サービスプロバイダーで、現在は主に Codex の中継を提供しています。OpenAI および Anthropic プロトコルに対応し、Codex・Claude Code・OpenCode などの主要なコーディングツールから柔軟に利用できます。1 日あたり数千億トークンというエンタープライズ級の呼び出し需要を安定して支え、国内外の法人による B2B 決済・請求書発行に対応しています。Fenno.ai は CC Switch 利用者限定の特典を用意しています:<a href="https://api.fenno.ai/register?redirect=/purchase?tab=subscription%26group=16&aff=P9MR3D3PLCNL">こちらのリンク</a>から 1.99 ドルで 50 ドル相当の Trial プラン(有効期間 7 日間)を購入でき、友達紹介で最大 20% の特典がもらえます。紹介すればするほどお得です!</td>
</tr>

<tr>
<td width="180"><a href="https://runapi.host/register?aff=iOKB"><img src="assets/partners/logos/runapi.jpg" alt="RunAPI" width="150"></a></td>
<td>本プロジェクトのスポンサーである RunAPI に感謝いたします!RunAPI は高効率で安定した AI モデル API ゲートウェイです。一つの API Key で、OpenAI、Claude、Gemini、DeepSeek、Grok など 150 種類以上の主要モデルにアクセス可能。料金は公式価格の最大 10%、安定性にも優れ、Claude Code や OpenClaw などのツールとシームレスに連携できます。CC Switch ユーザー限定特典:<a href="https://runapi.host/register?aff=iOKB">こちらのリンク</a>から登録し、初回チャージで 10% オフの割引をお楽しみいただけます!</td>
</tr>

<tr>
<td width="180"><a href="https://www.shengsuanyun.com/?from=CH_4HHXMRYF"><img src="assets/partners/logos/shengsuanyun.png" alt="Shengsuanyun" width="150"></a></td>
<td>胜算雲(Shengsuanyun)のご支援に感謝します!胜算雲は AI ネイティブチーム向けのスーパーファクトリーであり、産業グレードの AI タスク並列実行プラットフォームです。モデルマーケットプレイスでは Claude、ChatGPT、Gemini をはじめとする国内外の LLM およびマルチメディアモデルの計算リソースを集約・直接提供。リバースエンジニアリングや品質低下は一切なく、プラットフォーム全体のモデル SLA 可用性は 99.7% に達し、<a href="https://watch.shengsuanyun.com/status/shengsuanyun">監視ダッシュボード</a>は常時グリーン表示です。さらにエンタープライズ向けカスタムゲートウェイを提供し、チームのきめ細かなコスト・権限管理、スマートルーティング、セキュリティ保護、BYOK(自社キー持ち込み)ホスティングを実現します。従量課金およびトークンプラン(近日公開)対応で、請求書発行にも対応。<a href="https://www.shengsuanyun.com/?from=CH_4HHXMRYF">このリンク</a>から新規登録すると 10 元分のクレジットと初回チャージ 10% ボーナスが付与されます。</td>
</tr>

<tr>
<td width="180"><a href="https://aigocode.app/invite/CC-SWITCH"><img src="assets/partners/logos/aigocode.png" alt="AIGoCode" width="150"></a></td>
<td>本プロジェクトは AIGoCode のスポンサー提供でお届けしています。AIGoCode は、Claude Code・Codex・最新の Gemini モデルを統合したオールインワンのAIコーディングプラットフォームで、安定性・高速性・コストパフォーマンスに優れた開発サービスを提供します。柔軟なサブスクリプションプランを備え、レスポンスも非常に高速です。さらに、CC Switch ユーザー向けの特典として、<a href="https://aigocode.app/invite/CC-SWITCH">このリンク</a>から登録すると、初回チャージ時に10%分のボーナスクレジットが付与されます!</td>
</tr>

<tr>
<td width="180"><a href="https://aicoding.inc/i/CCSWITCH"><img src="assets/partners/logos/aicoding.jpg" alt="AICoding" width="150"></a></td>
<td>AICoding のご支援に感謝します!AICoding —— グローバル AI モデル API 超お得な中継サービス!Claude Code 81% オフ、GPT 99% オフ!数百社の企業に高コストパフォーマンスの AI サービスを提供。Claude Code、GPT、Gemini および国内主要モデルに対応、エンタープライズ級の高同時接続、迅速な請求書発行、24 時間年中無休の専属テクニカルサポート。<a href="https://aicoding.inc/i/CCSWITCH">こちらのリンク</a>から登録した CC Switch ユーザーは、初回チャージ 10% オフ!</td>
</tr>

<tr>
<td width="180"><a href="https://subrouter.ai/register?aff=l3ri"><img src="assets/partners/logos/subrouter-banner.png" alt="SubRouter" width="150"></a></td>
<td>本プロジェクトをご支援いただいている SubRouter に感謝します!SubRouter は、AI サービス事業者向けのマーケットプレイス兼スマートルーティングプラットフォームです。事業者は独立した運営サイトを立ち上げ、プランを公開し、ユーザー・モデル・価格を管理でき、ユーザーはマーケットでサービスを見つけ、統一された API を通じて安定かつ高効率なモデル呼び出しを利用できます。<a href="https://subrouter.ai/register?aff=l3ri">こちらのリンク</a>から登録してください!</td>
</tr>

<tr>
<td width="180"><a href="https://apikey.fun/register?aff=CCSwitch"><img src="assets/partners/logos/apikey_banner.png" alt="APIKEY.FUN" width="150"></a></td>
<td>APIKEY.FUN のご支援に感謝します!APIKEY.FUN は、企業および個人開発者向けに安定・高効率・低コストな AI モデル API 接続サービスを提供する、プロフェッショナルなエンタープライズ級 AI リレープラットフォームです。Claude、OpenAI、Gemini などの主要人気モデルに対応し、料金は公式価格の 7% から利用できます。本プロジェクトの<a href="https://apikey.fun/register?aff=CCSwitch">専用リンク</a>から登録すると、最大で<strong>チャージ永久 5% オフ</strong>の特別優待も受けられます。</td>
</tr>

<tr>
<td width="180"><a href="https://console.apito.ai/agent/register/pQBql2buaqiX3dDS"><img src="assets/partners/logos/claudeapi.png" alt="ClaudeAPI" width="150"></a></td>
<td>本プロジェクトは <a href="https://console.apito.ai/agent/register/pQBql2buaqiX3dDS">Claude API</a> がスポンサーです。Claude API 直結 — わずか 3 分で Claude Code や Agent アプリに接続可能。新規ユーザーにはテストクレジットを提供しています。Anthropic 公式キーおよび AWS Bedrock 公式チャネルに基づいており、リバースエンジニアリングや性能劣化はありません。Opus / Sonnet / Haiku の全モデルラインナップをサポートし、Tool Use や 1M コンテキストなどの公式機能をすべて保持しています。Claude Code ヘビーユーザー、Agent エンジニア、企業技術チームに最適です。請求書発行およびチーム対応が可能です。<a href="https://console.apito.ai/agent/register/pQBql2buaqiX3dDS">こちら</a>から登録してください!</td>
</tr>

<tr>
<td width="180"><a href="https://code0.ai/agent/register/B2XHxGjGmRvqgznY"><img src="assets/partners/logos/code0.png" alt="code0.ai" width="150"></a></td>
<td>本プロジェクトをご支援いただいている <a href="https://code0.ai/agent/register/B2XHxGjGmRvqgznY">code0.ai</a> に感謝します!code0.ai は開発者向けの AI コーディングサービスプラットフォームで、Claude Code、Codex、Gemini などの主要な AI コーディング機能に対応しています。個人開発者やチームが、コーディング、デバッグ、リファクタリング、自動化ワークフローで AI Agent をより安定かつ効率的に活用できるよう支援します。ccswitch ユーザーは <a href="https://code0.ai/agent/register/B2XHxGjGmRvqgznY">code0.ai 公式サイト</a> からカスタマーサポートに連絡することで、テストクレジットを受け取り、信頼性の高い AI コーディングサービスを体験できます。</td>
</tr>

<tr>
<td width="180"><a href="https://teamorouter.com/?utm_source=cc_switch&utm_medium=referral&utm_campaign=ai_directory"><img src="assets/partners/logos/TeamoRouter-banner.png" alt="TeamoRouter" width="150"></a></td>
<td>このプロジェクトをご支援いただいている TeamoRouter に感謝します!TeamoRouter は、開発者、AI チーム、企業向けに構築されたエンタープライズグレードの Agentic LLM ゲートウェイです。サブスクリプション不要で、単一の統合 API を通じて Claude Code、Codex、Gemini CLI、OpenAI Codex、その他の人気 AI エージェントにアクセスでき、API 料金は最大 90% オフで利用できます。
一般的な API リレーサービスとは異なり、TeamoRouter は OpenAI、Anthropic、Vertex、Azure、AWS Bedrock など、数百の公式モデルプロバイダーと信頼できるインフラパートナーを集約しています。各プロバイダーは、Agent プロトコルとの 100% 互換性、キャッシュ性能、リクエストの追跡可能性について検証されており、リバースエンジニアリングされたものや品質が薄められたエンドポイントではなく、安定した品質を提供します。プラットフォームは公式に近い TTFT、99.6% の SLA、最大 5,000 QPM のエンタープライズ規模のスループット、そして業界トップクラスのキャッシュヒット率を提供し、長時間稼働するエージェントワークフローのトークンコストを大幅に削減します。
TeamoRouter は、集中請求、チーム管理、BYOK、スマートルーティング、利用状況分析、動的なプロバイダー最適化、専任サポートなどのエンタープライズ機能も提供しています。さらにシンプルな体験を求める場合は、Teamo Desktop を使うことで、Claude Code、Codex、Gemini CLI、その他の人気 AI エージェントをワンクリックで利用できます。API キー管理や手動のゲートウェイ設定は不要です。新規ユーザーとして<a href="https://teamorouter.com/?utm_source=cc_switch&utm_medium=referral&utm_campaign=ai_directory">こちらのリンク</a>から登録すると、初回チャージが 10% オフになります。</td>
</tr>

<tr>
<td width="180"><a href="https://ppio.com/activity/ccswitch"><img src="assets/partners/logos/ppio-banner.png" alt="PPIO" width="150"></a></td>
<td>本プロジェクトをご支援いただいている PPIO に感謝します!PPIO は中国有数の独立系 Agentic Cloud プロバイダーで、PPTV 創業者の姚欣氏と元 PPTV チーフアーキテクトの王聞宇氏が 2018 年に共同設立しました。API キー 1 つで DeepSeek-V4-Flash、Kimi-K3、GLM-5.2、MiniMax-M3 など、すべての主要なオープンソースモデルを利用できます。法人向け Token Plan は最大 40% オフで、200 席まで対応。Fusion 融合モデルは 1/10 の価格で Fable5 に匹敵します。<a href="https://ppio.com/activity/ccswitch">こちらのリンク</a>から登録し実名認証を完了すると、¥10 のクーポンがもらえます。友人を招待してチャージしてもらうと、最大 15% のキャッシュバックも獲得できます。</td>
</tr>

<tr>
<td width="180"><a href="https://www.newapi.ai/"><img src="assets/partners/logos/newapi-banner.png" alt="new-api" width="150"></a></td>
<td>オープンソースの AI インフラプロジェクト <a href="https://www.newapi.ai/">new-api</a> による本プロジェクトへの多大なご支援に感謝します!new-api は QuantumNous(锟腾科技)が開発したオープンソースの AI インフラプロジェクトであり、活発さと利用規模の面でリードする LLM 統合アクセス・配信プロジェクトの一つで、開発者・チーム・企業がより低コストで管理・拡張可能な AI サービスプラットフォームを構築できるよう支援することに注力しています。同じくオープンソースエコシステムに根ざすプロジェクトとして、new-api はスポンサーシップを通じて、より多くの優れたオープンソースプロジェクトの継続的な発展を支援したいと考えています。🌟 new-api への Star で応援をお願いします:<a href="https://github.com/QuantumNous/new-api">https://github.com/QuantumNous/new-api</a>。公式サイト:<a href="https://www.newapi.ai/">https://www.newapi.ai/</a>。</td>
</tr>

<tr>
<td width="180"><a href="https://claudecn.ai/register?aff=HEL9"><img src="assets/partners/logos/claudecn.jpg" alt="ClaudeCN" width="150"></a></td>
<td>本プロジェクトのスポンサーである ClaudeCN に感謝いたします!ClaudeCN は、実体のある企業によって運営されるエンタープライズ向け AI ゲートウェイプラットフォームです。Claude、GPT、DeepSeek など主要モデルへの高可用な商用 API アクセスを提供し、企業の調達プロセスにも対応 — 法人振込や正式契約に対応し、コンプライアンス面でも安心してご利用いただけます。<a href="https://claudecn.ai/register?aff=HEL9">こちら</a>からご登録ください!</td>
</tr>

<tr>
<td width="180"><a href="https://www.byteplus.com/en/product/modelark?utm_campaign=hw&utm_content=ccswitch&utm_medium=devrel_tool_web&utm_source=OWO&utm_term=ccswitch"><img src="assets/partners/logos/byteplus.png" alt="BytePlus" width="150"></a></td>
<td>Dola seed のご支援に感謝します!Dola Seed 2.0 は ByteDance がグローバル市場向けに独自開発したフルモーダル汎用大規模モデルです。統一されたマルチモーダルアーキテクチャを基盤に、テキスト・画像・音声・動画の統合的な理解と生成をサポートします。エージェント連携をネイティブに実現し、強力な推論、長時間タスクの実行、ツール統合、コーディング能力を備えています。スマートコックピット、パーソナルアシスタント、教育、カスタマーサポート、マーケティング、リテールなど幅広いシナリオに適用可能で、マルチモーダル認識、エンドツーエンドの複雑なタスク遂行、安定したインタラクション、データセキュリティに優れ、ModelArk プラットフォームを通じて手軽に利用・デプロイできます。<a href="https://www.byteplus.com/en/product/modelark?utm_campaign=hw&utm_content=ccswitch&utm_medium=devrel_tool_web&utm_source=OWO&utm_term=ccswitch">このリンク</a>からご登録いただくと、モデルごとに 500,000 トークンの無料推論クォータを進呈します。<a href="https://www.volcengine.com/activity/ai618?utm_campaign=hw&utm_content=hw&utm_medium=devrel_tool_web&utm_source=OWO&utm_term=ccswitch"> >>中国大陆地区的开发者请点击这里</a></td>
</tr>

<tr>
<td width="180"><a href="https://cloud.siliconflow.cn/i/YflgU2Ve"><img src="assets/partners/logos/silicon_en.jpg" alt="SiliconFlow" width="150"></a></td>
<td>SiliconFlow のご支援に感謝します!SiliconFlow は高性能 AI インフラストラクチャおよびモデル API プラットフォームで、言語・音声・画像・動画モデルへの高速かつ信頼性の高いアクセスをワンストップで提供します。従量課金制、豊富なマルチモーダルモデル対応、高速推論、エンタープライズグレードの安定性を備え、開発者やチームがより効率的に AI アプリケーションを構築・拡張できるようサポートします。<a href="https://cloud.siliconflow.cn/i/YflgU2Ve">このリンク</a>から登録し、本人確認を完了すると、プラットフォーム内の全モデルで利用可能な ¥16 のボーナスクレジットが付与されます。SiliconFlow は OpenClaw にも対応しており、SiliconFlow の API キーを接続することで主要な AI モデルを無料で呼び出すことができます。</td>
</tr>

<tr>
<td width="180"><a href="https://a6api.com/register?aff=AqNr"><img src="assets/partners/logos/a6-banner-en.jpg" alt="A6API" width="150"></a></td>
<td>本プロジェクトをご支援いただいている <a href="https://a6api.com/register?aff=AqNr">A6API</a> に感謝します!A6API は、Claude、GPT、Gemini、Codex などの主要モデルを網羅するワンストップの AI モデル API アグリゲーションプラットフォームです。複数のベンダーが出品でき、同じモデルを複数の上流プロバイダーが競争価格で提供します。スマートルーティングにより、より安定して安価な利用可能ルートを自動で選択し、失敗時には自動で切り替えるため、リクエストの失敗を減らし、コストを抑え、安定性を高められます。個人開発者でも、AI プロダクトチームでも、スタジオでも、統一されたインターフェースからすぐに接続でき、あらゆるフォーマットに対応、移行コストも低く抑えられます。<a href="https://a6api.com/register?aff=AqNr">こちらのリンク</a> から新規登録すると無料の体験クレジットがもらえます。まず試してから、低価格で使い始められます。</td>
</tr>

<tr>
<td width="180"><a href="https://www.atlascloud.ai/coding-plan?utm_source=github&utm_campaign=cc-switch"><img src="assets/partners/logos/atlascloud_banner.png" alt="Atlas Cloud" width="150"></a></td>
<td>Atlas Cloud は、1 つの API で動画・画像生成や LLM(大規模言語モデル)を利用できる全モーダル対応の AI 推論プラットフォームです。複数のベンダーを個別に管理する手間を省き、一度の接続で 300 以上の厳選されたマルチモーダルモデルにアクセスできます。より低コストで API を利用できる、開発者向けの新しい<a href="https://www.atlascloud.ai/coding-plan?utm_source=github&utm_campaign=cc-switch">「コーディングプラン」</a>プロモーションをぜひチェックしてください!</td>
</tr>

<tr>
<td width="180"><a href="https://www.compshare.cn/coding-plan?ytag=GPU_YY_YX_git_cc-switch"><img src="assets/partners/logos/ucloud.png" alt="Compshare" width="150"></a></td>
<td>Compshare のご支援に感謝します!Compshare は UCloud 傘下の AI クラウドプラットフォームで、国内外の安定した包括的なモデル API を 1 つのキーだけで利用可能。月額・都度課金のコストパフォーマンスに優れた国内モデル Coding Plan パッケージを提供し、公式リレーによる安定した海外モデルも利用できます。Claude Code、Codex および API アクセスに対応。エンタープライズ級の高同時接続、24 時間年中無休のテクニカルサポート、セルフサービス請求書発行に対応。<a href="https://www.compshare.cn/coding-plan?ytag=GPU_YY_YX_git_cc-switch">こちらのリンク</a>から登録すると、無料で 5 元分のプラットフォーム体験クレジットがもらえます!</td>
</tr>

<tr>
<td width="180"><a href="https://www.ccsub.net/register?ref=Y6Z8DXEA"><img src="assets/partners/logos/ccsub.svg" alt="CCSub" width="150"></a></td>
<td>CCSub のご支援に感謝します!CCSub は安定した低価格の AI API リレープラットフォームで、Claude Code 公式サブスクリプションの強力な代替です。1 つの API キーで Claude Opus 4.8、Sonnet 4.6、Haiku 4.5、GPT-5、Gemini、DeepSeek の全モデルを公式直接利用の約 1/3 のコストでご利用いただけます。VPN 不要で世界中から直接接続可能。Claude Code、Codex、Cursor、Cline、Continue、Windsurf など主要な AI コーディングツールすべてに対応しています。<a href="https://www.ccsub.net/register?ref=Y6Z8DXEA">こちらのリンク</a>から登録すると $5 の無料クレジットがもらえます。</td>
</tr>

<tr>
<td width="180"><a href="https://www.sssaicode.com/register?ref=DCP0SM"><img src="assets/partners/logos/sssaicode.png" alt="SSSAiCode" width="150"></a></td>
<td>SSSAiCode のご支援に感謝します!SSSAiCode は安定性と信頼性に優れた API 中継サービスで、安定的で信頼性が高く、手頃な価格の Claude・Codex モデルサービスを提供しています。当日の迅速な請求書発行をサポート。CC Switch ユーザー向けの特別特典:<a href="https://www.sssaicode.com/register?ref=DCP0SM">こちらのリンク</a>から登録すると、毎回のチャージで $10 の追加ボーナスを受けられます!</td>
</tr>

<tr>
<td width="180"><a href="https://www.micuapi.ai/register?aff=aOYQ"><img src="assets/partners/logos/mikubanner.svg" alt="Micu" width="150"></a></td>
<td>Micu API のご支援に感謝します!Micu API は、最高のコストパフォーマンスと高い安定性を追求するグローバル大規模言語モデル中継サービスプロバイダーです。法人企業がバックアップしており、サービス停止のリスクを排除、迅速な正規請求書発行に対応!「試行コストゼロ」をモットーに、最低 1 元からチャージ可能で手数料無料、いつでも返金可能!CC Switch ユーザー向けの限定特典:<a href="https://www.micuapi.ai/register?aff=aOYQ">こちらのリンク</a>から登録し、チャージ時にプロモコード「ccswitch」を入力すると <strong>10% 割引</strong> が適用されます!</td>
</tr>

<tr>
<td width="180"><a href="https://www.rightapi.ai/register?aff=CCSWITCH"><img src="assets/partners/logos/rightcode.jpg" alt="RightCode" width="150"></a></td>
<td>本プロジェクトへのご支援として、Right Code にご協賛いただき誠にありがとうございます。Right Code は、Claude Code、Codex、Gemini などのモデル向け中継サービスを安定して提供しており、従量課金と月額プランの 2 つの料金体系から選択できます。チャージ後に請求書の発行が可能で、法人・チームのお客様には専任担当による個別対応も行っています。さらに、CC Switch ユーザー向けの特別優待として、<a href="https://www.rightapi.ai/register?aff=CCSWITCH">こちらのリンク</a>から登録すると、チャージのたびに実際の支払額の 5% 相当の従量課金クレジットが付与されます。</td>
</tr>

<tr>
<td width="180"><a href="https://etok.ai"><img src="assets/partners/logos/etok.png" alt="ETok" width="150"></a></td>
<td>ETok.ai のご支援に感謝します!ETok.ai はワンストップ AI プログラミングツールサービスプラットフォームの構築に取り組んでいます。Claude Code のプロフェッショナルプランと技術コミュニティサービスを提供し、Google Gemini や OpenAI Codex にも対応しています。丁寧に設計されたプランと専門的な技術コミュニティを通じて、開発者に安定したサービス保証と継続的な技術サポートを提供し、AI アシストプログラミングを真の生産性ツールにします。<a href="https://etok.ai">こちら</a>から登録してください!</td>
</tr>

<tr>
<td width="180"><a href="https://cubence.com/signup?code=CCSWITCH&source=ccs"><img src="assets/partners/logos/cubence.png" alt="Cubence" width="150"></a></td>
<td>Cubence のご支援に感謝します!Cubence は Claude Code、Codex、Gemini などのリレーサービスを提供する信頼性の高い API 中継プラットフォームで、従量課金や月額プランなど柔軟な料金体系を提供しています。CC Switch ユーザー向けの特別割引:<a href="https://cubence.com/signup?code=CCSWITCH&source=ccs">このリンク</a>で登録し、チャージ時に「CCSWITCH」クーポンを入力すると、毎回 10% オフになります!</td>
</tr>

<tr>
<td width="180"><a href="https://crazyrouter.com/register?aff=OZcm&ref=cc-switch"><img src="assets/partners/logos/crazyrouter.png" alt="Crazyrouter" width="150"></a></td>
<td>Crazyrouter のご支援に感謝します!Crazyrouter は高性能 AI API アグリゲーションプラットフォームです。1 つの API キーで Claude Code、Codex、Gemini CLI など 300 以上のモデルにアクセス可能。全モデルが公式価格の 55% で利用でき、自動フェイルオーバー、スマートルーティング、無制限同時接続に対応。CC Switch ユーザー向けの限定特典:<a href="https://crazyrouter.com/register?aff=OZcm&ref=cc-switch">こちらのリンク</a>から登録後、カスタマーサポートまでご連絡いただくと <strong>$2 の無料クレジット</strong> を受け取れます。さらに初回チャージ時にプロモコード `CCSWITCH` を入力すると <strong>30% のボーナスクレジット</strong> が追加されます!</td>
</tr>

<tr>
<td width="180"><a href="https://www.dmxapi.cn/register?aff=bUHu"><img src="assets/partners/logos/dmx-en.jpg" alt="DMXAPI" width="150"></a></td>
<td>DMXAPI のご支援に感謝します!DMXAPI は 200 社以上の企業ユーザーにグローバル大規模モデル API サービスを提供しています。1 つの API キーで全世界のモデルにアクセス可能。即時請求書発行、同時接続数無制限、最低 $0.15 から、24 時間年中無休のテクニカルサポート。GPT/Claude/Gemini が全て 32% オフ、国内モデルは 20〜50% オフ、Claude Code 専用モデルは 66% オフ実施中!<a href="https://www.dmxapi.cn/register?aff=bUHu">登録はこちら</a></td>
</tr>

</table>

</details>

## CC Switch を選ぶ理由

最新の AI コーディングは Claude Code、Claude Desktop、Codex、Gemini CLI、Grok Build、OpenCode、OpenClaw、Hermes などのツールに依存していますが、各ツールの設定形式はバラバラです。API プロバイダを切り替えるたびに JSON、TOML、`.env` ファイルを手動で編集する必要があり、複数ツール間で MCP や Skills を統一的に管理する手段もありません。

**CC Switch** は、対応する AI ツールを 1 つのデスクトップアプリで一元管理できます。設定ファイルを手作業で編集する代わりに、ワンクリックでプロバイダをインポートし、瞬時に切り替えられるビジュアルインターフェースを提供します。50 以上の組み込みプリセット、統一 MCP・Skills 管理、システムトレイからの即時切り替え機能を搭載。すべてはアトミック書き込みによる信頼性の高い SQLite データベースに支えられており、設定の破損を防ぎます。

- **1 つのアプリで 8 つのツール** -- Claude Code、Claude Desktop、Codex、Gemini CLI、Grok Build、OpenCode、OpenClaw、Hermes を単一インターフェースで管理
- **手動編集は不要** -- AWS Bedrock、NVIDIA NIM、コミュニティリレーなど 50 以上のプロバイダプリセットを内蔵。選んで切り替えるだけ
- **統一 MCP・Skills 管理** -- 1 つのパネルで Claude、Codex、Gemini、Grok Build、OpenCode、Hermes の MCP サーバーと Skills を双方向同期で管理
- **システムトレイでクイック切り替え** -- トレイメニューから即座にプロバイダを切り替え。アプリを開く必要なし
- **クラウド同期** -- Dropbox、OneDrive、iCloud、または WebDAV サーバー経由でデバイス間のプロバイダデータを同期
- **クロスプラットフォーム** -- Tauri 2 で構築された Windows、macOS、Linux 対応のネイティブデスクトップアプリ
- **便利ツール内蔵** -- 初回起動時のログイン確認、署名バイパス、プラグイン拡張の同期など、さまざまなユーティリティを搭載

## スクリーンショット

|                  メイン画面                   |                  プロバイダ追加                  |
| :-------------------------------------------: | :----------------------------------------------: |
| ![メイン画面](assets/screenshots/main-ja.png) | ![プロバイダ追加](assets/screenshots/add-ja.png) |

## 特長

[完全な更新履歴](CHANGELOG.md) | [リリースノート](docs/release-notes/v3.16.1-ja.md)

### プロバイダ管理

- **8 つの対応ツール、50 以上のプリセット** -- Claude Code、Claude Desktop、Codex、Gemini CLI、Grok Build、OpenCode、OpenClaw、Hermes。キーをコピーしてワンクリックでインポート
- **ユニバーサルプロバイダ** -- 1 つの設定を Claude Code、Codex、Gemini CLI に同期
- ワンクリック切り替え、システムトレイクイックアクセス、ドラッグ&ドロップ並び替え、インポート/エクスポート

### プロキシ & フェイルオーバー

- **ローカルプロキシのホットスイッチ** -- フォーマット変換、自動フェイルオーバー、サーキットブレーカー、プロバイダヘルスモニタリング、リクエストレクティファイア
- **アプリレベルのテイクオーバー** -- Claude、Codex、Gemini、Grok Build を個別にプロキシ経由でルーティング、プロバイダ単位で設定可能

### MCP、Prompts & Skills

- **統一 MCP パネル** -- Claude、Codex、Gemini、Grok Build、OpenCode、Hermes の MCP サーバーを管理、双方向同期、Deep Link インポート対応
- **Prompts** -- Markdown エディタ、クロスアプリ同期(CLAUDE.md / AGENTS.md / GEMINI.md)、バックフィル保護
- **Skills** -- GitHub リポジトリまたは ZIP ファイルからワンクリックインストール、カスタムリポジトリ管理、シンボリックリンクとファイルコピーに対応

### 使用量 & コストトラッキング

- **使用量ダッシュボード** -- プロバイダ横断で支出・リクエスト数・トークン使用量を追跡、トレンドチャート、詳細リクエストログ、カスタムモデル価格設定

### Session Manager & ワークスペース

- 対応するセッションソースの会話履歴を閲覧・検索・復元
- **ワークスペースエディタ**(OpenClaw)-- エージェントファイル(AGENTS.md、SOUL.md など)を Markdown プレビュー付きで編集

### システム & プラットフォーム

- **クラウド同期** -- カスタム設定ディレクトリ(Dropbox、OneDrive、iCloud、NAS)および WebDAV サーバー同期
- **Deep Link** (`ccswitch://`) -- URL 経由でプロバイダ、MCP サーバー、Prompts、Skills をワンクリックインポート
- ダーク / ライト / システムテーマ、自動起動、自動アップデーター、アトミック書き込み、自動バックアップ、多言語対応(簡体中文/繁體中文/英/日)

## よくある質問

<details>
<summary><strong>CC Switch はどの AI ツールに対応していますか?</strong></summary>

CC Switch は **Claude Code**、**Claude Desktop**、**Codex**、**Gemini CLI**、**Grok Build**、**OpenCode**、**OpenClaw**、**Hermes** の 8 つのツールに対応しています。各ツールに専用のプロバイダプリセットと設定管理が用意されています。

</details>

<details>
<summary><strong>プロバイダを切り替えた後、ターミナルの再起動は必要ですか?</strong></summary>

ほとんどのツールでは、はい。変更を反映するにはターミナルまたは CLI ツールを再起動してください。ただし **Claude Code** は例外で、現在プロバイダデータのホットスイッチに対応しており、再起動は不要です。

</details>

<details>
<summary><strong>プロバイダを切り替えた後、プラグイン設定が消えてしまいました。どうすればよいですか?</strong></summary>

CC Switch には「共有設定スニペット」機能があり、APIキーやエンドポイント以外の共通データをプロバイダ間で引き継ぐことができます。「プロバイダ編集」→「共有設定パネル」→「現在のプロバイダから抽出」をクリックして、すべての共通データを保存してください。新しいプロバイダを作成する際に「共有設定を適用」にチェック(デフォルトで有効)を入れれば、プラグインなどのデータが新しいプロバイダ設定に含まれます。すべての設定項目は、アプリ初回起動時にインポートされたデフォルトプロバイダに保存されており、失われることはありません。

</details>

<details>
<summary><strong>macOS のインストールについて</strong></summary>

CC Switch の macOS 版は Apple によるコード署名と公証が完了しています。直接ダウンロードしてインストールできます — 追加の手順は不要です。`.dmg` インストーラの使用を推奨します。

</details>

<details>
<summary><strong>現在アクティブなプロバイダを削除できないのはなぜですか?</strong></summary>

CC Switch は「最小限の介入」という設計原則に従っています。アプリをアンインストールしても、CLI ツールは正常に動作し続けます。すべての設定を削除すると対応する CLI ツールが使用できなくなるため、システムは常にアクティブな設定を 1 つ保持します。特定の CLI ツールをあまり使用しない場合は、設定で非表示にできます。公式ログインに戻す方法は、次の質問をご覧ください。

</details>

<details>
<summary><strong>公式ログインに戻すにはどうすればよいですか?</strong></summary>

プリセットリストから公式プロバイダを追加してください。切り替え後、ログアウト/ログインのフローを実行すれば、以降は公式プロバイダとサードパーティプロバイダを自由に切り替えられます。Codex では異なる公式プロバイダ間の切り替えに対応しており、複数の Plus アカウントや Team アカウントの切り替えに便利です。

</details>

<details>
<summary><strong>データはどこに保存されますか?</strong></summary>

- **データベース**: `~/.cc-switch/cc-switch.db`(SQLite -- プロバイダ、MCP、Prompts、Skills)
- **ローカル設定**: `~/.cc-switch/settings.json`(デバイスレベルの UI 設定)
- **バックアップ**: `~/.cc-switch/backups/`(自動ローテーション、最新 10 件を保持)
- **Skills**: `~/.cc-switch/skills/`(デフォルトでシンボリックリンクにより対応アプリに接続)
- **Skill バックアップ**: `~/.cc-switch/skill-backups/`(アンインストール前に自動作成、最新 20 件を保持)

</details>

<details>
<summary><strong>Linux(Wayland + NVIDIA):Web コンテンツがクリックできない・リサイズで黒画面になる</strong></summary>

AppImage は過去のネイティブ Wayland クラッシュを避けるため `GDK_BACKEND=x11`(XWayland)を強制します。新しい Wayland + NVIDIA 環境ではこれが原因で Web コンテンツ領域がクリックできなくなり(タイトルバーのボタンは動作します)、リサイズ時に黒画面になることがあります。内蔵のエスケープハッチでネイティブ Wayland に戻せます:

```bash
CC_SWITCH_GDK_BACKEND=wayland ./CC-Switch-*.AppImage
```

デスクトップアイコンから起動する場合は、`.desktop` の `Exec=` 行に追記するか(例:`env CC_SWITCH_GDK_BACKEND=wayland /path/to/AppImage`)、セッション環境で設定してください。この変数は汎用です:タイル型 Wayland コンポジタ(sway/Hyprland)でクリックが効かない場合は、逆に `CC_SWITCH_GDK_BACKEND=x11` を試してください。未設定の場合は既定の動作のままです。

</details>

## ドキュメント

各機能の詳しい使い方については、**[ユーザーマニュアル](docs/user-manual/ja/README.md)** をご覧ください。プロバイダ管理、MCP/Prompts/Skills、プロキシとフェイルオーバーなど、すべての機能を網羅しています。

## クイックスタート

### 基本的な使い方

1. **プロバイダ追加**: 「Add Provider」をクリック → プリセットを選ぶかカスタム設定を作成
2. **プロバイダ切り替え**:
   - メイン UI: プロバイダを選択 → 「Enable」をクリック
   - システムトレイ: プロバイダ名をクリック(即時反映)
3. **反映**: ターミナルまたは対応する CLI ツールを再起動して適用(Claude Code は再起動不要)
4. **公式設定に戻す**: 「Official Login」プリセットを追加し、CLI ツールを再起動してログイン/OAuth フローを実行

### MCP、Prompts、Skills & Sessions

- **MCP**: 「MCP」ボタンをクリック → テンプレートまたはカスタム設定でサーバーを追加 → アプリごとの同期をトグルで切り替え
- **Prompts**: 「Prompts」をクリック → Markdown エディタでプリセットを作成 → 有効化してライブファイルに同期
- **Skills**: 「Skills」をクリック → GitHub リポジトリを閲覧 → 対応アプリへワンクリックでインストール
- **Sessions**: 「Sessions」をクリック → 対応するセッションソースの会話履歴を閲覧・検索・復元

> **補足**: 初回起動時に、既存の CLI ツール設定を手動でインポートしてデフォルトプロバイダとして使用できます。

## ダウンロード & インストール

### システム要件

- **Windows**: Windows 10 以上
- **macOS**: macOS 12 (Monterey) 以上
- **Linux**: Ubuntu 22.04+ / Debian 11+ / Fedora 34+ など主要ディストリビューション

### Windows ユーザー

[Releases](../../releases) ページから最新版の `CC-Switch-v{version}-Windows.msi` インストーラー、またはポータブル版 `CC-Switch-v{version}-Windows-Portable.zip` をダウンロード。

### macOS ユーザー

**方法 1: Homebrew でインストール(推奨)**

```bash
brew install --cask cc-switch
```

アップデート:

```bash
brew upgrade --cask cc-switch
```

**方法 2: 手動ダウンロード**

[Releases](../../releases) から `CC-Switch-v{version}-macOS.zip` をダウンロードして展開。

> **注意**: 開発者アカウント未登録のため、初回起動時に「開発元を確認できません」と表示される場合があります。一度閉じてから「システム設定」→「プライバシーとセキュリティ」→「このまま開く」をクリックしてください。以降は通常通り起動できます。

### Arch Linux ユーザー

**paru でインストール(推奨)**

```bash
paru -S cc-switch-bin
```

### Linux ユーザー

[Releases](../../releases) から最新版の Linux ビルドをダウンロード:

- `CC-Switch-v{version}-Linux.deb`(Debian/Ubuntu)
- `CC-Switch-v{version}-Linux.rpm`(Fedora/RHEL/openSUSE)
- `CC-Switch-v{version}-Linux.AppImage`(汎用)

> **Flatpak**:公式リリースには含まれていません。`.deb` から自分でビルドできます — 手順は [`flatpak/README.md`](flatpak/README.md) を参照してください。

<details>
<summary><strong>アーキテクチャ概要</strong></summary>

### 設計原則

```
┌─────────────────────────────────────────────────────────────┐
│                    Frontend (React + TS)                    │
│  ┌─────────────┐  ┌──────────────┐  ┌──────────────────┐    │
│  │ Components  │  │    Hooks     │  │  TanStack Query  │    │
│  │   (UI)      │──│ (Bus. Logic) │──│   (Cache/Sync)   │    │
│  └─────────────┘  └──────────────┘  └──────────────────┘    │
└────────────────────────┬────────────────────────────────────┘
                         │ Tauri IPC
┌────────────────────────▼────────────────────────────────────┐
│                  Backend (Tauri + Rust)                     │
│  ┌─────────────┐  ┌──────────────┐  ┌──────────────────┐    │
│  │  Commands   │  │   Services   │  │  Models/Config   │    │
│  │ (API Layer) │──│ (Bus. Layer) │──│     (Data)       │    │
│  └─────────────┘  └──────────────┘  └──────────────────┘    │
└─────────────────────────────────────────────────────────────┘
```

**コア設計パターン**

- **SSOT** (Single Source of Truth): すべてのデータを `~/.cc-switch/cc-switch.db`(SQLite)に集約
- **二層ストレージ**: 同期データは SQLite、デバイスデータは JSON
- **双方向同期**: 切り替え時はライブファイルへ書き込み、編集時はアクティブプロバイダから逆同期
- **アトミック書き込み**: 一時ファイル + rename パターンで設定破損を防止
- **並行安全**: Mutex で保護された DB 接続でレースコンディションを防止
- **レイヤードアーキテクチャ**: Commands → Services → DAO → Database を明確に分離

**主要コンポーネント**

- **ProviderService**: プロバイダの CRUD、切り替え、バックフィル、ソート
- **McpService**: MCP サーバー管理、インポート/エクスポート、ライブファイル同期
- **ProxyService**: ローカル Proxy モードのホットスイッチとフォーマット変換
- **SessionManager**: 対応する全アプリの会話履歴閲覧
- **ConfigService**: 設定のインポート/エクスポート、バックアップローテーション
- **SpeedtestService**: API エンドポイントの遅延計測

</details>

<details>
<summary><strong>開発ガイド</strong></summary>

### 開発環境

- Node.js 18+
- pnpm 8+
- Rust 1.85+
- Tauri CLI 2.8+

### 開発コマンド

```bash
# 依存関係をインストール
pnpm install

# ホットリロード付き開発モード
pnpm dev

# 型チェック
pnpm typecheck

# コード整形
pnpm format

# フォーマット検証
pnpm format:check

# フロントエンド単体テスト
pnpm test:unit

# ウォッチモード(開発に推奨)
pnpm test:unit:watch

# アプリをビルド
pnpm build

# デバッグビルド
pnpm tauri build --debug
```

### Rust バックエンド開発

```bash
cd src-tauri

# Rust コード整形
cargo fmt

# clippy チェック
cargo clippy

# バックエンドテスト
cargo test

# 特定テストのみ実行
cargo test test_name

# test-hooks フィーチャー付きでテスト
cargo test --features test-hooks
```

### テストガイド

**フロントエンドテスト**:

- テストフレームワークに **vitest** を使用
- **MSW (Mock Service Worker)** で Tauri API 呼び出しをモック
- コンポーネントテストに **@testing-library/react** を採用

**テスト実行**:

```bash
# 全テストを実行
pnpm test:unit

# ウォッチモード(自動再実行)
pnpm test:unit:watch

# カバレッジレポート付き
pnpm test:unit --coverage
```

### 技術スタック

**フロントエンド**: React 18 · TypeScript · Vite · TailwindCSS 3.4 · TanStack Query v5 · react-i18next · react-hook-form · zod · shadcn/ui · @dnd-kit

**バックエンド**: Tauri 2.8 · Rust · serde · tokio · thiserror · tauri-plugin-updater/process/dialog/store/log

**テスト**: vitest · MSW · @testing-library/react

</details>

<details>
<summary><strong>プロジェクト構成</strong></summary>

```
├── src/                        # フロントエンド (React + TypeScript)
│   ├── components/
│   │   ├── providers/          # プロバイダ管理
│   │   ├── mcp/                # MCP パネル
│   │   ├── prompts/            # Prompts 管理
│   │   ├── skills/             # Skills 管理
│   │   ├── sessions/           # Session Manager
│   │   ├── proxy/              # Proxy モードパネル
│   │   ├── openclaw/           # OpenClaw 設定パネル
│   │   ├── settings/           # 設定 (Terminal/Backup/About)
│   │   ├── deeplink/           # Deep Link インポート
│   │   ├── env/                # 環境変数管理
│   │   ├── universal/          # クロスアプリ設定
│   │   ├── usage/              # 使用量統計
│   │   └── ui/                 # shadcn/ui コンポーネントライブラリ
│   ├── hooks/                  # カスタムフック(ビジネスロジック)
│   ├── lib/
│   │   ├── api/                # Tauri API ラッパー(型安全)
│   │   └── query/              # TanStack Query 設定
│   ├── locales/                # 翻訳 (zh/zh-TW/en/ja)
│   ├── config/                 # プリセット (providers/mcp)
│   └── types/                  # TypeScript 型定義
├── src-tauri/                  # バックエンド (Rust)
│   └── src/
│       ├── commands/           # Tauri コマンド層(ドメイン別)
│       ├── services/           # ビジネスロジック層
│       ├── database/           # SQLite DAO 層
│       ├── proxy/              # Proxy モジュール
│       ├── session_manager/    # セッション管理
│       ├── deeplink/           # Deep Link 処理
│       └── mcp/                # MCP 同期モジュール
├── tests/                      # フロントエンドテスト
└── assets/                     # スクリーンショット & パートナーリソース
```

</details>

## 貢献

Issue や提案を歓迎します!

PR を送る前に以下をご確認ください:

- 型チェック: `pnpm typecheck`
- フォーマットチェック: `pnpm format:check`
- 単体テスト: `pnpm test:unit`

新機能の場合は、PR を送る前に Issue でディスカッションしてください。プロジェクトに合わない機能の PR はクローズされる場合があります。

## Star History

[![Star History Chart](https://api.star-history.com/svg?repos=farion1231/cc-switch&type=Date)](https://www.star-history.com/#farion1231/cc-switch&Date)

## ライセンス

MIT © Jason Young


## /README_ZH.md

<div align="center">

# CC Switch

### Claude Code、Claude Desktop、Codex、Gemini CLI、Grok Build、OpenCode、OpenClaw 和 Hermes Agent 的全方位管理工具

[![Version](https://img.shields.io/github/v/release/farion1231/cc-switch?color=blue&label=version)](https://github.com/farion1231/cc-switch/releases)
[![Platform](https://img.shields.io/badge/platform-Windows%20%7C%20macOS%20%7C%20Linux-lightgrey.svg)](https://github.com/farion1231/cc-switch/releases)
[![Built with Tauri](https://img.shields.io/badge/built%20with-Tauri%202-orange.svg)](https://tauri.app/)
[![Downloads](https://img.shields.io/github/downloads/farion1231/cc-switch/total)](https://github.com/farion1231/cc-switch/releases/latest)

<a href="https://trendshift.io/repositories/15372" target="_blank"><img src="https://trendshift.io/api/badge/repositories/15372" alt="farion1231%2Fcc-switch | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
<a href="https://www.star-history.com/#farion1231/cc-switch&Date"><picture><source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/badge?repo=farion1231/cc-switch&theme=dark" /><img alt="Star History Rank" src="https://api.star-history.com/badge?repo=farion1231/cc-switch" width="196" height="55" /></picture></a>

### 🌐 唯一官方网站:**[ccswitch.io](https://ccswitch.io)**

[English](README.md) | 中文 | [日本語](README_JA.md) | [Deutsch](README_DE.md) | [更新日志](CHANGELOG.md)

</div>

## ❤️赞助商

> [想出现在这里?](mailto:farion1231@gmail.com)

<details open>
<summary>点击折叠</summary>

[![Kimi K2.7 Code](https://gcdn.moonshot.cn/growth-cdn/sponsor/kimi-zh.png)](https://platform.kimi.com?track_id=track-6840233b42274ab4bcfd283e2bdd2aee&aff=cc-switch)

Kimi K3 是 Moonshot AI 迄今能力最强的模型,也是全球首个开源 3T 级模型。K3 拥有 2.8T 参数、原生视觉能力与 100 万 Token 上下文,在长程编码、知识工作和推理任务中展现前沿性能。使用 CC Switch,可以在各类 Agent 工具中便捷配置和切换 Kimi。**[点击此处开始使用 Kimi](https://platform.kimi.com?track_id=track-6840233b42274ab4bcfd283e2bdd2aee&aff=cc-switch)**

**新用户首充福利**:通过[此链接](https://platform.kimi.com?track_id=track-6840233b42274ab4bcfd283e2bdd2aee&aff=cc-switch)注册并首次成功充值,即可获赠充值金额 10% 的 API 额度,最高赠送 ¥1000。

主要进行编程工作?可以试试 **[Kimi Code 订阅](https://www.kimi.com/code/?aff=cc-switch)**。

---

<table>
<tr>
<td width="180"><a href="https://www.packyapi.ai/register?aff=cc-switch"><img src="assets/partners/logos/packycode.png" alt="PackyCode" width="150"></a></td>
<td>感谢 PackyCode 赞助了本项目!PackyCode 是一家稳定、高效的API中转服务商,提供 Claude Code、Codex、Gemini 等多种中转服务。PackyCode 为本软件的用户提供了特别优惠,使用<a href="https://www.packyapi.ai/register?aff=cc-switch">此链接</a>注册并在充值时填写"cc-switch"优惠码,首次充值可以享受9折优惠!</td>
</tr>

<tr>
<td width="180"><a href="https://zetaapi.ai/go/u117"><img src="assets/partners/logos/zetaapi-banner.png" alt="ZetaAPI" width="150"></a></td>
<td>感谢 ZetaAPI 赞助本项目!ZetaAPI 主打模型不掺水、保真不降智、价格低至官方价 35 折,平台不混量、不暗中替换低质量模型、不做虚假路由,支持 Claude Code、Codex、Gemini、ChatGPT 等主流模型接入,帮助用户在保证模型质量的同时大幅降低 API 使用成本。同时,ZetaAPI 提供企业级 SLA 稳定性保障、标准接口兼容、一个 Key 接入多模型、快速集成、按量计费等能力,适用于 AI 产品、代码生成、企业内部工具、客服系统、内容生产和自动化流程等场景。若经验证发现模型质量与标称不符,ZetaAPI 承诺假一赔十,让用户用得更稳定、更透明、更放心。通过<a href="https://zetaapi.ai/go/u117">此链接</a>注册,并在首次充值时使用优惠码 CC-SWITCH,即可享受 CC Switch 用户专属的首次充值九折优惠!</td>
</tr>

<tr>
<td width="180"><a href="https://apinebula.ai/VjM74M"><img src="assets/partners/logos/apinebula_banner.png" alt="APINebula" width="150"></a></td>
<td>感谢 APINEBULA 赞助本项目!APINEBULA 是银河录像局旗下的企业级 AI 聚合平台,背靠大平台资源,面向开发者、团队与企业用户提供稳定、高性价比的大模型 API 接入服务。平台聚合 Claude、GPT、Gemini 等主流满血模型,一个接口,接入全球顶尖 AI 大模型,各大模型价格低至 1 折起,支持企业级高并发、正式合同、对公打款与开票服务,适合 AI 编程、Agent 开发、业务系统集成等多种场景!使用<a href="https://apinebula.ai/VjM74M">此链接</a>注册并在充值时填写 <strong>"ccswitch"</strong> 优惠码可享<strong>九折优惠</strong>!</td>
</tr>

<tr>
<td width="180"><a href="https://www.aicodemirror.ai/register?invitecode=9915W3"><img src="assets/partners/logos/aicodemirror.jpg" alt="AICodeMirror" width="150"></a></td>
<td>感谢 AICodeMirror 赞助了本项目!AICodeMirror 提供 Claude Code / Codex / Gemini CLI 官方高稳定中转服务,支持企业级高并发、极速开票、7×24 专属技术支持。
Claude Code / Codex / Gemini 官方渠道低至 3.8 / 0.2 / 0.9 折,充值更有折上折!AICodeMirror 为 CCSwitch 的用户提供了特别福利,通过<a href="https://www.aicodemirror.ai/register?invitecode=9915W3">此链接</a>注册的用户,可享受首充8折,企业客户最高可享 7.5 折!</td>
</tr>

<tr>
<td width="180"><a href="https://pateway.ai/?ch=etzpm8&aff=WB6M6F67#/"><img src="assets/partners/logos/pateway.png" alt="PatewayAI" width="150"></a></td>
<td>感谢 PatewayAI 赞助了本项目!PatewayAI 是一家面向重度 AI 开发者、专注官方直连高品质模型 API 中转服务商。提供 Claude 全系列与 Codex 系列模型,100% 官方源直供,不掺假不注水,欢迎检验。计费透明,Token 级账单可逐笔核验。
同时支持企业级高并发,并为企业客户提供了专业的管理平台,企业客户可签订正式合同并开具发票,更多详情进入官网获取联系方式。
现在通过<a href="https://pateway.ai/?ch=etzpm8&aff=WB6M6F67#/">此链接</a>注册即送 $3 试用额度,用户充值低至 6 折,邀请好友双向赠送,邀请奖励可达 $150!</td>
</tr>

<tr>
<td width="180"><a href="https://api.fenno.ai/register?redirect=/purchase?tab=subscription%26group=16&aff=P9MR3D3PLCNL"><img src="assets/partners/logos/fenno-banner.png" alt="Fenno.ai" width="150"></a></td>
<td>感谢 Fenno.ai 赞助了本项目!Fenno.ai 是一家稳定、高效的 API 中转服务商,目前主要提供 Codex 中转服务,兼容 OpenAI 及 Anthropic 协议,可灵活接入 Codex、Claude Code、OpenCode 等主流编程工具,可稳定支撑千亿 Token/日的企业级调用需求,支持国内及海外主体公对公结算、开票。Fenno.ai 为 CC Switch 的用户提供了专属福利:通过<a href="https://api.fenno.ai/register?redirect=/purchase?tab=subscription%26group=16&aff=P9MR3D3PLCNL">此链接</a>即可订阅 1.99 刀/50 刀额度的 Trial 计划(有效期 7 天),邀请好友最高可享 20% 奖励,多邀多得!</td>
</tr>

<tr>
<td width="180"><a href="https://runapi.host/register?aff=iOKB"><img src="assets/partners/logos/runapi.jpg" alt="RunAPI" width="150"></a></td>
<td>感谢 RunAPI 赞助本项目!RunAPI 是高效稳定的 AI 模型 API 中转平台,一个 API Key 即可访问 OpenAI、Claude、Gemini、DeepSeek、Grok 等 150+ 主流模型,低至 1 折,极其稳定,可以无缝兼容 Claude Code、OpenClaw 等工具。RunAPI为CC switch的用户提供了特别福利,使用<a href="https://runapi.host/register?aff=iOKB">此链接</a>注册并首次充值即可享受10%的优惠折扣!</td>
</tr>

<tr>
<td width="180"><a href="https://www.shengsuanyun.com/?from=CH_4HHXMRYF"><img src="assets/partners/logos/shengsuanyun.png" alt="Shengsuanyun" width="150"></a></td>
<td>感谢胜算云赞助了本项目!胜算云是专为AI Native Teams服务的超级工厂,工业级AI任务并行执行平台,模型商城集采直供聚合接入了Claude、Chatgpt、Gemini等海内外LLM及图片视频多媒体模型算力,绝无逆向掺水、全站模型SLA可用性高达99.7%、<a href="https://watch.shengsuanyun.com/status/shengsuanyun">监测接口</a>日常全绿。更有企业级专属定制网关,实现团队精细化成本与权限管控,智能路由+安全防护+BYOK企业自带密钥托管。平台按量及tokens plan(即将上线)计费,可开票,使用<a href="https://www.shengsuanyun.com/?from=CH_4HHXMRYF">此链接</a>注册新用户可获10元模力及首充10%赠送。</td>
</tr>

<tr>
<td width="180"><a href="https://aigocode.app/invite/CC-SWITCH"><img src="assets/partners/logos/aigocode.png" alt="AIGoCode" width="150"></a></td>
<td>感谢 AIGoCode 赞助了本项目!AIGoCode 是一个集成了 Claude Code、Codex 以及 Gemini 最新模型的一站式平台,为你提供稳定、高效且高性价比的AI编程服务。本站提供灵活的订阅计划,零封号风险,国内直连,无需魔法,极速响应。AIGoCode 为 CC Switch 的用户提供了特别福利,通过<a href="https://aigocode.app/invite/CC-SWITCH">此链接</a>注册的用户首次充值可以获得额外10%奖励额度!</td>
</tr>

<tr>
<td width="180"><a href="https://aicoding.inc/i/CCSWITCH"><img src="assets/partners/logos/aicoding.jpg" alt="AICoding" width="150"></a></td>
<td>感谢 AICoding 赞助了本项目!AICoding —— 全球大模型 API 超值中转服务!Claude Code 1.9 折,GPT 0.1 折,已为数百家企业提供高性价比 AI 服务。支持 Claude Code、GPT、Gemini 及国内主流模型,企业级高并发、极速开票、7×24 专属技术支持,通过<a href="https://aicoding.inc/i/CCSWITCH">此链接</a> 注册的 CC Switch 用户,首充可享受九折优惠!</td>
</tr>

<tr>
<td width="180"><a href="https://subrouter.ai/register?aff=l3ri"><img src="assets/partners/logos/subrouter-banner.png" alt="SubRouter" width="150"></a></td>
<td>感谢 SubRouter 赞助本项目!SubRouter 是面向 AI 服务经营者的公开市场与智能路由平台。商家可快速开通独立经营站,发布套餐、管理用户与模型价格;用户可在市场发现服务,并通过统一 API 获得稳定高效的模型调用。通过<a href="https://subrouter.ai/register?aff=l3ri">此链接</a>注册!</td>
</tr>

<tr>
<td width="180"><a href="https://apikey.fun/register?aff=CCSwitch"><img src="assets/partners/logos/apikey_banner.png" alt="APIKEY.FUN" width="150"></a></td>
<td>感谢 APIKEY.FUN 赞助本项目!APIKEY.FUN 是一家专业的企业级 AI 中转站,致力于为企业和个人开发者提供稳定、高效、低成本的 AI 模型 API 接入服务。平台支持 Claude、OpenAI、Gemini 等主流热门模型,价格低至官方原价的 7%。通过本项目<a href="https://apikey.fun/register?aff=CCSwitch">专属链接</a>注册,还可享受最高 <strong>充值永久 95 折</strong> 专属优惠。</td>
</tr>

<tr>
<td width="180"><a href="https://console.apito.ai/agent/register/pQBql2buaqiX3dDS"><img src="assets/partners/logos/claudeapi.png" alt="ClaudeAPI" width="150"></a></td>
<td>本项目由 <a href="https://console.apito.ai/agent/register/pQBql2buaqiX3dDS">Claude API</a> 赞助。Claude API 直连,三分钟接入 Claude Code 与 Agent 应用 新用户可领取测试额度。基于 Anthropic 官方 Key + AWS Bedrock 官方渠道,非逆向、非降智,支持 Opus / Sonnet / Haiku 全系列模型,保留 Tool Use、1M 上下文等官方能力。适合 Claude Code 深度用户、Agent 工程师与企业技术团队,支持开票和团队对接。点击<a href="https://console.apito.ai/agent/register/pQBql2buaqiX3dDS">这里</a>注册!</td>
</tr>

<tr>
<td width="180"><a href="https://code0.ai/agent/register/B2XHxGjGmRvqgznY"><img src="assets/partners/logos/code0.png" alt="code0.ai" width="150"></a></td>
<td>感谢 <a href="https://code0.ai/agent/register/B2XHxGjGmRvqgznY">code0.ai</a> 赞助本项目!code0.ai 是专为开发者打造的 AI 编程服务平台,支持 Claude Code、Codex、Gemini 等主流 AI 编程能力,帮助个人开发者和团队更稳定、更高效地使用 AI Agent 完成代码开发、调试与自动化任务。ccswitch 用户可通过 <a href="https://code0.ai/agent/register/B2XHxGjGmRvqgznY">code0.ai 官网</a> 联系客服领取测试额度,体验高效稳定的 AI 编程服务!</td>
</tr>

<tr>
<td width="180"><a href="https://teamorouter.com/zh?utm_source=cc_switch&utm_medium=referral&utm_campaign=ai_directory"><img src="assets/partners/logos/TeamoRouter-banner.png" alt="TeamoRouter" width="150"></a></td>
<td>感谢 TeamoRouter 赞助本项目!TeamoRouter 是一款面向开发者、AI 团队和企业的企业级 Agentic LLM 网关。无需任何订阅,你就可以通过一个统一 API 访问 Claude Code、Codex、Gemini CLI、OpenAI Codex 以及其他热门 AI Agent,同时享受最高可达 90% 折扣的 API 价格。
不同于常见的 API 中转服务,TeamoRouter 聚合了数百家官方模型提供商和可信基础设施合作伙伴,包括 OpenAI、Anthropic、Vertex、Azure 和 AWS Bedrock。每个提供商都经过验证,确保 100% 兼容 Agent 协议,并具备可靠的缓存性能和请求可追踪性,从而提供稳定质量,而不是反向工程或缩水后的接口。平台提供接近官方水平的 TTFT、99.6% SLA、最高 5,000 QPM 的企业级吞吐量,以及行业领先的缓存命中率,可大幅降低长时间运行的 Agent 工作流中的 token 成本。
TeamoRouter 还提供企业级功能,包括集中账单、团队管理、BYOK、智能路由、用量分析、动态提供商优化和专属支持。为了获得更简单的使用体验,Teamo Desktop 支持你一键使用 Claude Code、Codex、Gemini CLI 和其他热门 AI Agent,无需管理 API Key,也无需手动配置网关。新用户通过<a href="https://teamorouter.com/zh?utm_source=cc_switch&utm_medium=referral&utm_campaign=ai_directory">此链接</a>注册,首次充值可享受 10% 折扣。</td>
</tr>

<tr>
<td width="180"><a href="https://ppio.com/activity/ccswitch"><img src="assets/partners/logos/ppio-banner.png" alt="PPIO" width="150"></a></td>
<td>感谢 PPIO 赞助了本项目!PPIO 是国内领先的独立 Agentic Cloud 服务商,由 PPTV 创始人姚欣和前 PPTV 首席架构师王闻宇于 2018 年联合创立。PPIO 支持一个 API key 调用 DeepSeek-V4-Flash、Kimi-K3、GLM-5.2、MiniMax-M3 等所有旗舰开源模型;企业 Token Plan 最低 6 折接入,支持 200 席位;Fusion 融合模型以 1/10 的价格比肩 Fable5。通过<a href="https://ppio.com/activity/ccswitch">此链接</a>注册并完成实名认证,即可获得 ¥10 元代金券,邀请好友充值还可获得最高 15% 充值返利。</td>
</tr>

<tr>
<td width="180"><a href="https://www.newapi.ai/"><img src="assets/partners/logos/newapi-banner.png" alt="new-api" width="150"></a></td>
<td>感谢开源 AI 基础设施项目 <a href="https://www.newapi.ai/">new-api</a> 对本项目的鼎力支持!new-api 是由 QuantumNous(锟腾科技)推出的开源 AI 基础设施项目,也是活跃度与使用规模领先的大模型统一接入与分发项目之一,专注于帮助开发者、团队和企业以更低成本构建可管理、可扩展的 AI 服务平台。作为同样扎根开源生态的项目,new-api 希望通过赞助支持更多优秀开源项目持续发展。🌟 欢迎 Star 支持 new-api:<a href="https://github.com/QuantumNous/new-api">https://github.com/QuantumNous/new-api</a>,官网:<a href="https://www.newapi.ai/">https://www.newapi.ai/</a>。</td>
</tr>

<tr>
<td width="180"><a href="https://claudecn.ai/register?aff=HEL9"><img src="assets/partners/logos/claudecn.jpg" alt="ClaudeCN" width="150"></a></td>
<td>感谢 ClaudeCN 赞助本项目!ClaudeCN 由是一家实体企业运营的企业级AI中转平台。平台可提供高可用性的商用API服务,提供Claude、GPT、Deepseek等热门模型,支持企业采购流程,可对公打款、签约,服务合规有保障。点击<a href="https://claudecn.ai/register?aff=HEL9">此链接</a>注册!</td>
</tr>

<tr>
<td width="180"><a href="https://www.volcengine.com/activity/ai618?utm_campaign=hw&utm_content=hw&utm_medium=devrel_tool_web&utm_source=OWO&utm_term=ccswitch"><img src="assets/partners/logos/huoshan.png" alt="HuoShan" width="150"></a></td>
<td>感谢火山方舟 Agent Plan 模型赞助了本项目!方舟 Agent Plan 模型订阅套餐集成了包含 Doubao-Seed、Doubao-Seedance、Doubao-Seedream 等在内的字节跳动自研 SOTA 级模型,覆盖文本、代码、图像、视频等多模态任务。最新支持 MiniMax-M3、DeepSeek-V4 系列、GLM-5.1、Doubao-Seed-2.0 系列、Kimi-K2.6 等模型,工具不限。超全模态模型与 Harness 升级一步到位,深度支持 Agent 框架与 AI 编程工具。一次订阅,可以为不同任务切换合适的 AI 引擎。方舟 Coding Plan 为 CC Switch 的用户提供了专属福利:通过<a href="https://www.volcengine.com/activity/ai618?utm_campaign=hw&utm_content=hw&utm_medium=devrel_tool_web&utm_source=OWO&utm_term=ccswitch">此链接</a>订阅方舟 Coding Plan,新客户首两个月享 2.5 折优惠,再用专属邀请码 6J6FV5N2 领取奖励叠加 9.5 折,低至 9.4 元/月!<a href="https://www.byteplus.com/en/product/modelark?utm_campaign=hw&utm_content=ccswitch&utm_medium=devrel_tool_web&utm_source=OWO&utm_term=ccswitch">>>For developers outside Mainland China, please click here</a></td>
</tr>

<tr>
<td width="180"><a href="https://cloud.siliconflow.cn/i/YflgU2Ve"><img src="assets/partners/logos/silicon_zh.jpg" alt="SiliconFlow" width="150"></a></td>
<td>感谢硅基流动赞助了本项目!硅基流动是一个高性能 AI 基础设施与模型 API 平台,一站式提供语言、语音、图像、视频等多模态模型的快速、可靠访问。平台支持按量计费、丰富的多模态模型选择、高速推理和企业级稳定性,帮助开发者和团队更高效地构建和扩展 AI 应用。通过<a href="https://cloud.siliconflow.cn/i/YflgU2Ve">此链接</a>注册并完成实名认证,即可获得 ¥16 奖励金,可在平台内跨模型使用。硅基流动现已兼容 OpenClaw,用户可接入硅基流动 API Key 免费调用主流 AI 模型。</td>
</tr>

<tr>
<td width="180"><a href="https://a6api.com/register?aff=AqNr"><img src="assets/partners/logos/a6-banner-zh.jpg" alt="A6API" width="150"></a></td>
<td>感谢 <a href="https://a6api.com/register?aff=AqNr">A6API</a> 赞助本项目!A6API 是一站式 AI 模型 API 聚合平台,覆盖 Claude、GPT、Gemini、Codex 等主流模型,支持多商家入驻供货,同一个模型可由多个上游商家竞争报价。平台通过智能路由自动优选更稳定、更低价的可用线路,并支持失败自动切换,帮助用户减少请求失败、降低调用成本、提升使用稳定性。无论你是开发者、AI 产品团队还是工作室,都可以通过统一接口快速接入,兼容所有格式,迁移成本低,使用更省心。新用户通过 <a href="https://a6api.com/register?aff=AqNr">此链接</a> 注册即可获得免费体验额度,先试再用,低价开用。</td>
</tr>

<tr>
<td width="180"><a href="https://www.atlascloud.ai/coding-plan?utm_source=github&utm_campaign=cc-switch"><img src="assets/partners/logos/atlascloud_banner.png" alt="Atlas Cloud" width="150"></a></td>
<td>Atlas Cloud 是一个全模态 AI 推理平台,通过单一 API 为开发者提供视频生成、图像生成及 LLM 接入。免去繁琐的多供应商对接,一次连接即可调用 300+ 款全模态精选模型。立即查看 Atlas Cloud 全新<a href="https://www.atlascloud.ai/coding-plan?utm_source=github&utm_campaign=cc-switch">“编程计划”</a>优惠,获取更具性价比的 API 接入!</td>
</tr>

<tr>
<td width="180"><a href="https://www.compshare.cn/coding-plan?ytag=GPU_YY_YX_git_cc-switch"><img src="assets/partners/logos/ucloud.png" alt="优云智算" width="150"></a></td>
<td>感谢优云智算赞助了本项目!优云智算是UCloud旗下AI云平台,提供稳定、全面的国内外模型API,仅一个key即可调用。主打包月、按次的高性价比 国模Coding Plan套餐,同时提供官转稳定海外模型。支持接入 Claude Code、Codex 及 API 调用。支持企业高并发、7*24技术支持、自助开票。通过<a href="https://www.compshare.cn/coding-plan?ytag=GPU_YY_YX_git_cc-switch">此链接</a>注册的用户,可得免费5元平台体验金!</td>
</tr>

<tr>
<td width="180"><a href="https://www.ccsub.net/register?ref=Y6Z8DXEA"><img src="assets/partners/logos/ccsub.svg" alt="CCSub" width="150"></a></td>
<td>感谢 CCSub 赞助本项目!CCSub 是稳定、实惠的 AI API 中转平台,是 Claude Code 官方订阅的超强平替。一个 API Key 即可调用 Claude Opus 4.8、Sonnet 4.6、Haiku 4.5、GPT-5、Gemini、DeepSeek 全系列模型,价格约为官方直连的 1/3,全球直连无需梯子。兼容 Claude Code、Codex、Cursor、Cline、Continue、Windsurf 等所有主流 AI 编程工具。通过<a href="https://www.ccsub.net/register?ref=Y6Z8DXEA">此链接</a>注册即送 $5 体验额度!</td>
</tr>

<tr>
<td width="180"><a href="https://www.sssaicode.com/register?ref=DCP0SM"><img src="assets/partners/logos/sssaicode.png" alt="SSSAiCode" width="150"></a></td>
<td>感谢 SSSAiCode 赞助了本项目!SSSAiCode 是一家稳定可靠的API中转站,致力于提供稳定、可靠、平价的Claude、CodeX模型服务,支持当日快速开票,SSSAiCode为本软件的用户提供特别优惠,使用<a href="https://www.sssaicode.com/register?ref=DCP0SM">此链接</a>注册每次充值均可享受10$的额外奖励!</td>
</tr>

<tr>
<td width="180"><a href="https://www.micuapi.ai/register?aff=aOYQ"><img src="assets/partners/logos/mikubanner.svg" alt="Micu" width="150"></a></td>
<td>感谢 米醋API 赞助了本项目!米醋API 是一家致力于提供极致性价比与高稳定性的全球大模型中转服务商。米醋API 背后有实体企业做核心保障,杜绝跑路风险,支持极速正规开票!我们主打“试错零成本”:1 元起充低门槛,0 手续费随时退款!米醋API 为本软件的用户提供了特别优惠,使用<a href="https://www.micuapi.ai/register?aff=aOYQ">此链接</a>注册并在充值时填写"ccswitch"优惠码可享九折优惠!</td>
</tr>

<tr>
<td width="180"><a href="https://www.rightapi.ai/register?aff=CCSWITCH"><img src="assets/partners/logos/rightcode.jpg" alt="RightCode" width="150"></a></td>
<td>感谢 Right Code 赞助了本项目!Right Code 稳定提供 Claude Code、Codex、Gemini 等模型的中转服务,并可选按量、包月两种计费模式。充值即可开票,企业、团队用户一对一对接。同时为 CC Switch 的用户提供了特别优惠:通过<a href="https://www.rightapi.ai/register?aff=CCSWITCH">此链接</a>注册,每次充值均可获得实付金额5%的按量额度!</td>
</tr>

<tr>
<td width="180"><a href="https://etok.ai"><img src="assets/partners/logos/etok.png" alt="ETok" width="150"></a></td>
<td>感谢 ETok.ai 赞助了本项目!ETok.ai 致力于打造一站式 AI 编程工具服务平台。我们提供 Claude Code 专业套餐及技术社群服务,同时支持 Google Gemini 和 OpenAI Codex。通过精心设计的套餐方案和专业的技术社群,为开发者提供稳定的服务保障和持续的技术支持,让 AI 辅助编程真正成为开发者的生产力工具。点击<a href="https://etok.ai">这里</a>注册!</td>
</tr>

<tr>
<td width="180"><a href="https://cubence.com/signup?code=CCSWITCH&source=ccs"><img src="assets/partners/logos/cubence.png" alt="Cubence" width="150"></a></td>
<td>感谢 Cubence 赞助本项目!Cubence 是一家可靠高效的 API 中继服务提供商,提供对 Claude Code、Codex、Gemini 等模型的中继服务,并提供按量、包月等灵活的计费方式。Cubence 为 CC Switch 的用户提供了特别优惠:使用 <a href="https://cubence.com/signup?code=CCSWITCH&source=ccs">此链接</a> 注册,并在充值时输入 "CCSWITCH" 优惠码,每次充值均可享受九折优惠!</td>
</tr>

<tr>
<td width="180"><a href="https://crazyrouter.com/register?aff=OZcm&ref=cc-switch"><img src="assets/partners/logos/crazyrouter.png" alt="Crazyrouter" width="150"></a></td>
<td>感谢 Crazyrouter 赞助了本项目!Crazyrouter 是一个高性能 AI API 聚合平台——一个 API Key 即可访问 300+ 模型,包括 Claude Code、Codex、Gemini CLI 等。全部模型低至官方定价的 55%,支持自动故障转移、智能路由和无限并发。Crazyrouter 为 CC Switch 用户提供了专属优惠:通过<a href="https://crazyrouter.com/register?aff=OZcm&ref=cc-switch">此链接</a>注册后联系客服即可领取 <strong>$2 免费额度</strong>,首次充值时输入优惠码 `CCSWITCH` 还可获得额外 <strong>30% 奖励额度</strong>!</td>
</tr>

<tr>
<td width="180"><a href="https://www.dmxapi.cn/register?aff=bUHu"><img src="assets/partners/logos/dmx-zh.jpeg" alt="DMXAPI" width="150"></a></td>
<td>感谢 DMXAPI(大模型API)赞助了本项目! DMXAPI,一个Key用全球大模型。
为200多家企业用户提供全球大模型API服务。· 充值即开票 ·当天开票 ·并发不限制  ·1元起充 ·  7x24 在线技术辅导,GPT/Claude/Gemini全部6.8折,国内模型5~8折,Claude Code 专属模型3.4折进行中!<a href="https://www.dmxapi.cn/register?aff=bUHu">点击这里注册</a></td>
</tr>

</table>

</details>

## 为什么选择 CC Switch?

现代 AI 编程依赖于 Claude Code、Claude Desktop、Codex、Gemini CLI、Grok Build、OpenCode、OpenClaw 和 Hermes 等工具——但每个工具都有自己的配置格式。切换 API 供应商意味着手动编辑 JSON、TOML 或 `.env` 文件,而在多个工具之间缺乏一个统一管理 MCP, SKILLS 的方式。

**CC Switch** 为你提供一个桌面应用来管理所有支持的 AI 工具。无需手动编辑配置文件,你将获得一个可视化界面,一键将供应商导入应用,一键在不同的供应商之间进行切换,内置 50+ 供应商预设、统一的 MCP, SKILLS 管理以及系统托盘即时切换功能——所有操作都基于可靠的 SQLite 数据库和原子写入机制,保护你的配置不被损坏。

- **一个应用,八个工具** — 在单一界面中管理 Claude Code、Claude Desktop、Codex、Gemini CLI、Grok Build、OpenCode、OpenClaw 和 Hermes
- **告别手动编辑** — 50+ 供应商预设,包括 AWS Bedrock、NVIDIA NIM 和社区中转服务;一键即可切换
- **统一 MCP, SKILLS 管理** — 一个面板管理 Claude、Codex、Gemini、Grok Build、OpenCode 和 Hermes 的 MCP, SKILLS, 支持双向同步
- **系统托盘快速切换** — 从托盘菜单即时切换供应商,无需打开完整应用
- **云同步** — 通过 Dropbox、OneDrive、iCloud 或 WebDAV 服务器在不同设备之间同步供应商数据
- **跨平台** — 基于 Tauri 2 构建的原生桌面应用,支持 Windows、macOS 和 Linux
- **小工具** - 内置了多种小工具来解决首次安装登录确认、禁止签名、插件拓展同步等多种功能

## 界面预览

|                  主界面                   |                  添加供应商                  |
| :---------------------------------------: | :------------------------------------------: |
| ![主界面](assets/screenshots/main-zh.png) | ![添加供应商](assets/screenshots/add-zh.png) |

## 功能特性

[完整更新日志](CHANGELOG.md) | [发布说明](docs/release-notes/v3.16.1-zh.md)

### 供应商管理

- **8 个支持工具,50+ 预设** — Claude Code、Claude Desktop、Codex、Gemini CLI、Grok Build、OpenCode、OpenClaw、Hermes;复制 key 即可一键导入
- **通用供应商** — 一份配置同步到 Claude Code、Codex 和 Gemini CLI
- 一键切换、系统托盘快速访问、拖拽排序、导入导出

### 代理与故障转移

- **本地代理热切换** — 格式转换、自动故障转移、熔断器、供应商健康监控和整流器
- **应用级代理接管** — 独立为 Claude、Codex、Gemini 或 Grok Build 配置代理,具体到单个供应商

### MCP、Prompts 与 Skills

- **统一 MCP 面板** — 管理 Claude、Codex、Gemini、Grok Build、OpenCode 和 Hermes 的 MCP 服务器,双向同步,支持 Deep Link 导入
- **Prompts** — Markdown 编辑器,跨应用同步(CLAUDE.md / AGENTS.md / GEMINI.md),回填保护
- **Skills** — 从 GitHub 仓库或 ZIP 文件一键安装,自定义仓库管理,支持软连接和文件复制

### 用量与成本追踪

- **用量仪表盘** — 跨供应商追踪支出、请求数和 Token 用量,趋势图表、详细请求日志和自定义模型定价

### 会话管理器与工作区

- 浏览、搜索和恢复支持的会话来源
- **工作区编辑器**(OpenClaw)— 编辑 Agent 文件(AGENTS.md、SOUL.md 等),支持 Markdown 预览

### 系统与平台

- **云同步** — 自定义配置目录(Dropbox、OneDrive、iCloud、坚果云、NAS)及 WebDAV 服务器同步
- **Deep Link** (`ccswitch://`) — 通过 URL 一键导入供应商、MCP 服务器、提示词和技能
- 深色 / 浅色 / 跟随系统主题、开机自启、自动更新、原子写入、自动备份、国际化(简中/繁中/英/日)

## 常见问题

<details>
<summary><strong>CC Switch 支持哪些 AI 工具?</strong></summary>

CC Switch 支持八个工具:**Claude Code**、**Claude Desktop**、**Codex**、**Gemini CLI**、**Grok Build**、**OpenCode**、**OpenClaw** 和 **Hermes**。每个工具都有专属的供应商预设和配置管理。

</details>

<details>
<summary><strong>切换供应商后需要重启终端吗?</strong></summary>

大多数工具需要重启终端或 CLI 工具才能使更改生效。例外的是 **Claude Code**,它目前支持供应商数据的热切换,无需重启。

</details>

<details>
<summary><strong>切换供应商之后我的插件配置怎么不见了?</strong></summary>

CC Switch 使用“通用配置片段”功能,在不同的供应商之间传递 Key 和请求地址之外的通用数据,您可以在“编辑供应商”菜单的“通用配置面板”里,点击“从当前供应商提取”,把所有的通用数据提取到通用配置中,之后在新建“供应商”的时候,只要勾选“应用通用配置”(默认勾选),就会把插件等数据写入到新的供应商配置中。您的所有配置项都会保存在运行本软件的时候,第一次导入的默认供应商里面,不会丢失。

</details>

<details>
<summary><strong>macOS 安装</strong></summary>

CC Switch macOS 版本已通过 Apple 代码签名和公证,可直接下载安装,无需额外操作。推荐使用 `.dmg` 安装包。

</details>

<details>
<summary><strong>为什么总有一个正在激活中的供应商无法删除?</strong></summary>

本软件的设计原则是“最小侵入性”,即使卸载本软件,也不会影响应用的正常使用。

所以系统总会保留一个正在激活中的配置,因为如果将所有配置全部删除,该应用将无法正常使用。如果你不经常使用某个对应的应用,可以在设置中关掉该应用的显示。如果你想切换回官方登录,可以参考下条。

</details>

<details>
<summary><strong>如何切换回官方登录?</strong></summary>

可以在预设供应商里面添加一个官方供应商。切换过去之后,执行一遍 Log out / Log in 流程,之后便可以在官方供应商和第三方供应商之间随意切换。CodeX 可以在不同官方供应商之间进行切换,方便多个 Plus 或者 Team 账号之间切换。

</details>

<details>
<summary><strong>我的数据存储在哪里?</strong></summary>

- **数据库**:`~/.cc-switch/cc-switch.db`(SQLite — 供应商、MCP、提示词、技能)
- **本地设置**:`~/.cc-switch/settings.json`(设备级 UI 偏好设置)
- **备份**:`~/.cc-switch/backups/`(自动轮换,保留最近 10 个)
- **SKILLS**:`~/.cc-switch/skills/`(默认通过软链接连接到对应应用)
- **技能备份**:`~/.cc-switch/skill-backups/`(卸载前自动创建,保留最近 20 个)

</details>

<details>
<summary><strong>Linux(Wayland + NVIDIA):网页内容点不动、缩放后黑屏</strong></summary>

AppImage 会强制 `GDK_BACKEND=x11`(走 XWayland)以规避历史上的原生 Wayland 崩溃。但在较新的 Wayland + NVIDIA 环境下,这会导致网页内容区点不动(标题栏按钮仍可点)、窗口缩放后黑屏。可用内置的逃生开关切回原生 Wayland:

```bash
CC_SWITCH_GDK_BACKEND=wayland ./CC-Switch-*.AppImage
```

如果你是从桌面图标启动的,请把它写进 `.desktop` 的 `Exec=` 行(如 `env CC_SWITCH_GDK_BACKEND=wayland /path/to/AppImage`),或在会话环境中设置。该变量是通用的:在 tiling Wayland 合成器(sway/Hyprland)下若出现点击失效,可反过来设 `CC_SWITCH_GDK_BACKEND=x11`。不设置则保持默认行为。

</details>

## 文档

如需了解各项功能的详细使用方法,请查阅 **[用户手册](docs/user-manual/zh/README.md)** — 涵盖供应商管理、MCP/Prompts/Skills、代理与故障转移等全部功能。

## 快速开始

### 基本使用

1. **添加供应商**:点击"添加供应商" → 选择预设或创建自定义配置
2. **切换供应商**:
   - 主界面:选择供应商 → 点击"启用"
   - 系统托盘:直接点击供应商名称(立即生效)
3. **生效方式**:重启终端或对应的 CLI 工具以应用更改(CLaude Code 无需重启)
4. **恢复官方登录**:添加"官方登录"预设,重启 CLI 工具后按照其登录/OAuth 流程操作

### MCP、Prompts、Skills 与会话

- **MCP**:点击"MCP"按钮 → 通过模板或自定义配置添加服务器 → 切换各应用同步开关
- **Prompts**:点击"Prompts" → 使用 Markdown 编辑器创建预设 → 激活后同步到 live 文件
- **Skills**:点击"Skills" → 浏览 GitHub 仓库 → 一键安装到支持的应用
- **会话**:点击"Sessions" → 浏览、搜索和恢复支持的会话来源

> **注意**:首次启动可以手动导入现有 CLI 工具配置作为默认供应商。

## 下载安装

### 系统要求

- **Windows**:Windows 10 及以上
- **macOS**:macOS 12 (Monterey) 及以上
- **Linux**:Ubuntu 22.04+ / Debian 11+ / Fedora 34+ 等主流发行版

### Windows 用户

从 [Releases](../../releases) 页面下载最新版本的 `CC-Switch-v{版本号}-Windows.msi` 安装包或 `CC-Switch-v{版本号}-Windows-Portable.zip` 绿色版。

### macOS 用户

**方式一:通过 Homebrew 安装(推荐)**

```bash
brew install --cask cc-switch
```

更新:

```bash
brew upgrade --cask cc-switch
```

**方式二:手动下载**

从 [Releases](../../releases) 页面下载 `CC-Switch-v{版本号}-macOS.dmg`(推荐)或 `.zip`。

> **注意**:CC Switch macOS 版本已通过 Apple 代码签名和公证,可直接安装打开。

### Arch Linux 用户

**通过 paru 安装(推荐)**

```bash
paru -S cc-switch-bin
```

### Linux 用户

从 [Releases](../../releases) 页面下载最新版本的 Linux 安装包:

- `CC-Switch-v{版本号}-Linux.deb`(Debian/Ubuntu)
- `CC-Switch-v{版本号}-Linux.rpm`(Fedora/RHEL/openSUSE)
- `CC-Switch-v{版本号}-Linux.AppImage`(通用)

> **Flatpak**:官方 Release 不包含 Flatpak 包。如需使用,可从 `.deb` 自行构建 — 参见 [`flatpak/README.md`](flatpak/README.md)。

<details>
<summary><strong>架构总览</strong></summary>

### 设计原则

```
┌─────────────────────────────────────────────────────────────┐
│                    前端 (React + TS)                         │
│  ┌─────────────┐  ┌──────────────┐  ┌──────────────────┐    │
│  │ Components  │  │    Hooks     │  │  TanStack Query  │    │
│  │   (UI)     │──│ (业务逻辑)   │──│   (缓存/同步)    │    │
│  └─────────────┘  └──────────────┘  └──────────────────┘    │
└────────────────────────┬────────────────────────────────────┘
                         │ Tauri IPC
┌────────────────────────▼────────────────────────────────────┐
│                  后端 (Tauri + Rust)                         │
│  ┌─────────────┐  ┌──────────────┐  ┌──────────────────┐    │
│  │  Commands   │  │   Services   │  │  Models/Config   │    │
│  │ (API 层)   │──│  (业务层)    │──│    (数据)       │    │
│  └─────────────┘  └──────────────┘  └──────────────────┘    │
└─────────────────────────────────────────────────────────────┘
```

**核心设计模式**

- **SSOT**(单一事实源):所有数据存储在 `~/.cc-switch/cc-switch.db`(SQLite)
- **双层存储**:SQLite 存储可同步数据,JSON 存储设备级设置
- **双向同步**:切换时写入 live 文件,编辑当前供应商时从 live 回填
- **原子写入**:临时文件 + 重命名模式防止配置损坏
- **并发安全**:Mutex 保护的数据库连接避免竞态条件
- **分层架构**:清晰分离(Commands → Services → DAO → Database)

**核心组件**

- **ProviderService**:供应商增删改查、切换、回填、排序
- **McpService**:MCP 服务器管理、导入导出、live 文件同步
- **ProxyService**:本地 Proxy 模式,支持热切换和格式转换
- **SessionManager**:全应用会话历史浏览
- **ConfigService**:配置导入导出、备份轮换
- **SpeedtestService**:API 端点延迟测量

</details>

<details>
<summary><strong>开发指南</strong></summary>

### 环境要求

- Node.js 18+
- pnpm 8+
- Rust 1.85+
- Tauri CLI 2.8+

### 开发命令

```bash
# 安装依赖
pnpm install

# 开发模式(热重载)
pnpm dev

# 类型检查
pnpm typecheck

# 代码格式化
pnpm format

# 检查代码格式
pnpm format:check

# 运行前端单元测试
pnpm test:unit

# 监听模式运行测试(推荐开发时使用)
pnpm test:unit:watch

# 构建应用
pnpm build

# 构建调试版本
pnpm tauri build --debug
```

### Rust 后端开发

```bash
cd src-tauri

# 格式化 Rust 代码
cargo fmt

# 运行 clippy 检查
cargo clippy

# 运行后端测试
cargo test

# 运行特定测试
cargo test test_name

# 运行带测试 hooks 的测试
cargo test --features test-hooks
```

### 测试说明

**前端测试**:

- 使用 **vitest** 作为测试框架
- 使用 **MSW (Mock Service Worker)** 模拟 Tauri API 调用
- 使用 **@testing-library/react** 进行组件测试

**运行测试**:

```bash
# 运行所有测试
pnpm test:unit

# 监听模式(自动重跑)
pnpm test:unit:watch

# 带覆盖率报告
pnpm test:unit --coverage
```

### 技术栈

**前端**:React 18 · TypeScript · Vite · TailwindCSS 3.4 · TanStack Query v5 · react-i18next · react-hook-form · zod · shadcn/ui · @dnd-kit

**后端**:Tauri 2.8 · Rust · serde · tokio · thiserror · tauri-plugin-updater/process/dialog/store/log

**测试**:vitest · MSW · @testing-library/react

</details>

<details>
<summary><strong>项目结构</strong></summary>

```
├── src/                        # 前端 (React + TypeScript)
│   ├── components/
│   │   ├── providers/          # 供应商管理
│   │   ├── mcp/                # MCP 面板
│   │   ├── prompts/            # Prompts 管理
│   │   ├── skills/             # Skills 管理
│   │   ├── sessions/           # 会话管理器
│   │   ├── proxy/              # Proxy 模式面板
│   │   ├── openclaw/           # OpenClaw 配置面板
│   │   ├── settings/           # 设置(终端/备份/关于)
│   │   ├── deeplink/           # Deep Link 导入
│   │   ├── env/                # 环境变量管理
│   │   ├── universal/          # 跨应用配置
│   │   ├── usage/              # 用量统计
│   │   └── ui/                 # shadcn/ui 组件库
│   ├── hooks/                  # 自定义 hooks(业务逻辑)
│   ├── lib/
│   │   ├── api/                # Tauri API 封装(类型安全)
│   │   └── query/              # TanStack Query 配置
│   ├── locales/                # 翻译 (zh/zh-TW/en/ja)
│   ├── config/                 # 预设 (providers/mcp)
│   └── types/                  # TypeScript 类型定义
├── src-tauri/                  # 后端 (Rust)
│   └── src/
│       ├── commands/           # Tauri 命令层(按领域)
│       ├── services/           # 业务逻辑层
│       ├── database/           # SQLite DAO 层
│       ├── proxy/              # Proxy 模块
│       ├── session_manager/    # 会话管理
│       ├── deeplink/           # Deep Link 处理
│       └── mcp/                # MCP 同步模块
├── tests/                      # 前端测试
└── assets/                     # 截图 & 合作商资源
```

</details>

## 贡献

欢迎提交 Issue 反馈问题和建议!

提交 PR 前请确保:

- 通过类型检查:`pnpm typecheck`
- 通过格式检查:`pnpm format:check`
- 通过单元测试:`pnpm test:unit`

新功能开发前,欢迎先开 Issue 讨论实现方案,不适合项目的功能性 PR 有可能会被关闭。

## Star History

[![Star History Chart](https://api.star-history.com/svg?repos=farion1231/cc-switch&type=Date)](https://www.star-history.com/#farion1231/cc-switch&Date)

## License

MIT © Jason Young


## /SUPPORT.md

# Support / 获取帮助

> [中文版本](#获取帮助)

## How to Get Help

CC Switch is an open-source project maintained by volunteers. We're happy to help, but please use the right channel so we can respond efficiently.

### Before Asking

1. **Read the [FAQ](https://github.com/farion1231/cc-switch#faq)** — most common questions are answered there.
2. **Search [existing issues](https://github.com/farion1231/cc-switch/issues)** (including closed ones) — someone may have had the same question.

### Asking a Question

- **Usage or configuration questions**: [Open a Question issue](https://github.com/farion1231/cc-switch/issues/new?template=question.yml)
- **General discussion**: [GitHub Discussions](https://github.com/farion1231/cc-switch/discussions)

### Reporting Problems

- **Bug reports**: [Open a Bug Report](https://github.com/farion1231/cc-switch/issues/new?template=bug_report.yml)
- **Documentation issues**: [Open a Doc Issue](https://github.com/farion1231/cc-switch/issues/new?template=doc_issue.yml)
- **Security vulnerabilities**: Please do NOT use public issues. See our [Security Policy](./SECURITY.md).

### Feature Requests

- [Submit a Feature Request](https://github.com/farion1231/cc-switch/issues/new?template=feature_request.yml)
- Please open an issue for discussion before submitting a PR for new features.

---

# 获取帮助

> [English Version](#support--获取帮助)

## 如何获取帮助

CC Switch 是一个由志愿者维护的开源项目。我们很乐意提供帮助,但请使用合适的渠道,以便我们高效响应。

### 提问之前

1. **阅读 [常见问题](https://github.com/farion1231/cc-switch#常见问题)** — 大多数常见问题都已在其中解答。
2. **搜索 [已有的 Issue](https://github.com/farion1231/cc-switch/issues)**(包括已关闭的) — 可能已经有人问过相同的问题。

### 提问

- **使用或配置问题**:[提交问题 Issue](https://github.com/farion1231/cc-switch/issues/new?template=question.yml)
- **一般讨论**:[GitHub 讨论区](https://github.com/farion1231/cc-switch/discussions)

### 报告问题

- **Bug 报告**:[提交 Bug 报告](https://github.com/farion1231/cc-switch/issues/new?template=bug_report.yml)
- **文档问题**:[提交文档问题](https://github.com/farion1231/cc-switch/issues/new?template=doc_issue.yml)
- **安全漏洞**:请不要使用公开 Issue。请参阅我们的[安全策略](./SECURITY.md)。

### 功能请求

- [提交功能请求](https://github.com/farion1231/cc-switch/issues/new?template=feature_request.yml)
- 提交新功能的 PR 之前,请先开 Issue 讨论。


## /assets/partners/banners/fable5.png

Binary file available at https://raw.githubusercontent.com/farion1231/cc-switch/refs/heads/main/assets/partners/banners/fable5.png

## /assets/partners/banners/glm-en.jpg

Binary file available at https://raw.githubusercontent.com/farion1231/cc-switch/refs/heads/main/assets/partners/banners/glm-en.jpg

## /assets/partners/banners/glm-zh.jpg

Binary file available at https://raw.githubusercontent.com/farion1231/cc-switch/refs/heads/main/assets/partners/banners/glm-zh.jpg

## /assets/partners/banners/kimi-banner-en.png

Binary file available at https://raw.githubusercontent.com/farion1231/cc-switch/refs/heads/main/assets/partners/banners/kimi-banner-en.png

## /assets/partners/banners/kimi-banner-zh.png

Binary file available at https://raw.githubusercontent.com/farion1231/cc-switch/refs/heads/main/assets/partners/banners/kimi-banner-zh.png

## /assets/partners/banners/minimax-en.jpeg

Binary file available at https://raw.githubusercontent.com/farion1231/cc-switch/refs/heads/main/assets/partners/banners/minimax-en.jpeg

## /assets/partners/banners/minimax-zh.jpeg

Binary file available at https://raw.githubusercontent.com/farion1231/cc-switch/refs/heads/main/assets/partners/banners/minimax-zh.jpeg

## /assets/partners/logos/TeamoRouter-banner.png

Binary file available at https://raw.githubusercontent.com/farion1231/cc-switch/refs/heads/main/assets/partners/logos/TeamoRouter-banner.png

## /assets/partners/logos/a6-banner-en.jpg

Binary file available at https://raw.githubusercontent.com/farion1231/cc-switch/refs/heads/main/assets/partners/logos/a6-banner-en.jpg

## /assets/partners/logos/a6-banner-zh.jpg

Binary file available at https://raw.githubusercontent.com/farion1231/cc-switch/refs/heads/main/assets/partners/logos/a6-banner-zh.jpg

## /assets/partners/logos/aicodemirror.jpg

Binary file available at https://raw.githubusercontent.com/farion1231/cc-switch/refs/heads/main/assets/partners/logos/aicodemirror.jpg

## /assets/partners/logos/aicoding.jpg

Binary file available at https://raw.githubusercontent.com/farion1231/cc-switch/refs/heads/main/assets/partners/logos/aicoding.jpg

## /assets/partners/logos/aigocode.png

Binary file available at https://raw.githubusercontent.com/farion1231/cc-switch/refs/heads/main/assets/partners/logos/aigocode.png

## /assets/partners/logos/apikey_banner.png

Binary file available at https://raw.githubusercontent.com/farion1231/cc-switch/refs/heads/main/assets/partners/logos/apikey_banner.png

## /assets/partners/logos/apinebula_banner.png

Binary file available at https://raw.githubusercontent.com/farion1231/cc-switch/refs/heads/main/assets/partners/logos/apinebula_banner.png

## /assets/partners/logos/atlascloud_banner.png

Binary file available at https://raw.githubusercontent.com/farion1231/cc-switch/refs/heads/main/assets/partners/logos/atlascloud_banner.png

## /assets/partners/logos/byteplus.png

Binary file available at https://raw.githubusercontent.com/farion1231/cc-switch/refs/heads/main/assets/partners/logos/byteplus.png

## /assets/partners/logos/chefshop.png

Binary file available at https://raw.githubusercontent.com/farion1231/cc-switch/refs/heads/main/assets/partners/logos/chefshop.png

## /assets/partners/logos/claudeapi.png

Binary file available at https://raw.githubusercontent.com/farion1231/cc-switch/refs/heads/main/assets/partners/logos/claudeapi.png

## /assets/partners/logos/claudecn.jpg

Binary file available at https://raw.githubusercontent.com/farion1231/cc-switch/refs/heads/main/assets/partners/logos/claudecn.jpg

## /assets/partners/logos/code0.png

Binary file available at https://raw.githubusercontent.com/farion1231/cc-switch/refs/heads/main/assets/partners/logos/code0.png

## /assets/partners/logos/crazyrouter.jpg

Binary file available at https://raw.githubusercontent.com/farion1231/cc-switch/refs/heads/main/assets/partners/logos/crazyrouter.jpg


The content has been capped at 50000 tokens. The user could consider applying other filters to refine the result. The better and more specific the context, the better the LLM can follow instructions. If the context seems verbose, the user can refine the filter using uithub. Thank you for using https://uithub.com - Perfect LLM context for any GitHub repo.
Copied!