[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-11221":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":9,"totalLinesOfCode":9,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":9,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":9,"rankLanguage":9,"license":9,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":22,"hasPages":22,"topics":9,"createdAt":9,"pushedAt":9,"updatedAt":24,"readmeContent":25,"aiSummary":26,"trendingCount":16,"starSnapshotCount":16,"syncStatus":27,"lastSyncTime":28,"discoverSource":29},11221,"cc-switch-cli","SaladDay\u002Fcc-switch-cli","SaladDay","⭐️ A cross-platform CLI All-in-One assistant tool for Claude Code, Codex & Gemini CLI.",null,"https:\u002F\u002Fgithub.com\u002FSaladDay\u002Fcc-switch-cli","Rust",3434,198,7,34,0,145,315,840,435,28.9,false,"main","2026-06-12 02:02:30","\u003Cdiv align=\"center\">\n\n# CC-Switch CLI\n\n[![Version](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fversion-5.4.0-blue.svg)](https:\u002F\u002Fgithub.com\u002Fsaladday\u002Fcc-switch-cli\u002Freleases)\n[![Platform](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fplatform-Windows%20%7C%20macOS%20%7C%20Linux-lightgrey.svg)](https:\u002F\u002Fgithub.com\u002Fsaladday\u002Fcc-switch-cli\u002Freleases)\n[![Built with Rust](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fbuilt%20with-Rust-orange.svg)](https:\u002F\u002Fwww.rust-lang.org\u002F)\n[![License](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-green.svg)](LICENSE)\n\n\u003Ca href=\"https:\u002F\u002Ftrendshift.io\u002Frepositories\u002F22544\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Ftrendshift.io\u002Fapi\u002Fbadge\u002Frepositories\u002F22544\" alt=\"SaladDay%2Fcc-switch-cli | Trendshift\" style=\"width: 250px; height: 55px;\" width=\"250\" height=\"55\"\u002F>\u003C\u002Fa>\n\n**Command-Line Management Tool for Claude Code, Codex, Gemini, OpenCode & OpenClaw**\n\nUnified management for Claude Code, Codex, Gemini, OpenCode, and OpenClaw provider configurations, plus app-specific support for MCP servers, skills, prompts, local proxy routes, and environment checks.\n\nEnglish | [中文](README_ZH.md)\n\n\u003C\u002Fdiv>\n\n---\n\n## 📖 About\n\nThis project is a **CLI fork** of [CC-Switch](https:\u002F\u002Fgithub.com\u002Ffarion1231\u002Fcc-switch). \n\n🔄 The WebDAV sync feature is fully compatible with the upstream project.\n\n\n**Credits:** Original architecture and core functionality from [farion1231\u002Fcc-switch](https:\u002F\u002Fgithub.com\u002Ffarion1231\u002Fcc-switch)\n\n**Changelog:** [CHANGELOG.md](CHANGELOG.md)\n\n---\n\n## ❤️ Sponsor\n\n\u003Ctable>\n  \u003Ctr>\n    \u003Ctd width=\"180\">\n      \u003Ca href=\"https:\u002F\u002Fwww.packyapi.com\u002Fregister?aff=cc-switch-cli\">\n        \u003Cimg src=\"assets\u002Fpartners\u002Flogos\u002Fpackycode.png\" alt=\"PackyCode\" width=\"150\">\n      \u003C\u002Fa>\n    \u003C\u002Ftd>\n    \u003Ctd>\n      Thanks to \u003Cb>PackyCode\u003C\u002Fb> for sponsoring this project! PackyCode is a reliable and efficient API relay service provider, offering relay services for Claude Code, Codex, Gemini, and more. \u003Cbr\u002F>\n      PackyCode provides special discounts for our software users: register via \u003Ca href=\"https:\u002F\u002Fwww.packyapi.com\u002Fregister?aff=cc-switch-cli\">this link\u003C\u002Fa> and use promo code \u003Ccode>cc-switch-cli\u003C\u002Fcode> when recharging to get \u003Cb>10% off\u003C\u002Fb>.\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Ctd width=\"180\">\n      \u003Ca href=\"https:\u002F\u002Fwww.aicodemirror.com\u002Fregister?invitecode=77V9EA\">\n        \u003Cimg src=\"assets\u002Fpartners\u002Flogos\u002Faicodemirror.png\" alt=\"AICodeMirror\" width=\"150\">\n      \u003C\u002Fa>\n    \u003C\u002Ftd>\n    \u003Ctd>\n      Thanks to \u003Cb>AICodeMirror\u003C\u002Fb> for sponsoring this project! \u003Cb>AICodeMirror\u003C\u002Fb> provides official high-stability relay services for Claude Code \u002F Codex \u002F Gemini CLI, with enterprise-grade concurrency, fast invoicing, and 24\u002F7 dedicated technical support. Claude Code \u002F Codex \u002F Gemini official channels at \u003Cb>38% \u002F 2% \u002F 9%\u003C\u002Fb> of original price, with extra discounts on top-ups! \u003Cb>AICodeMirror\u003C\u002Fb> offers special benefits for cc-switch-cli users: register via \u003Ca href=\"https:\u002F\u002Fwww.aicodemirror.com\u002Fregister?invitecode=77V9EA\">this link\u003C\u002Fa> to enjoy \u003Cb>20% off\u003C\u002Fb> your first top-up, and enterprise customers can get up to \u003Cb>25% off\u003C\u002Fb>!\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Ctd width=\"180\">\n      \u003Ca href=\"https:\u002F\u002Fwww.right.codes\u002Fregister?aff=ccswitch-cli\">\n        \u003Cimg src=\"assets\u002Fpartners\u002Flogos\u002Frightcode.jpg\" alt=\"RightCode\" width=\"150\">\n      \u003C\u002Fa>\n    \u003C\u002Ftd>\n    \u003Ctd>\n      Thanks to \u003Cb>RightCode\u003C\u002Fb> for sponsoring this project! RightCode reliably provides routing services for models such as Claude Code, Codex, and Gemini. It features a highly cost-effective Codex monthly subscription plan and \u003Cb>supports quota rollovers—unused quota from one day can be carried over and used the next day.\u003C\u002Fb> \u003Cbr\u002F>\n      RightCode offers a special deal for CC-Switch CLI users: register via \u003Ca href=\"https:\u002F\u002Fwww.right.codes\u002Fregister?aff=ccswitch-cli\">this link\u003C\u002Fa> and get \u003Cb>25% bonus pay-as-you-go credits\u003C\u002Fb> on every top-up!\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Ctd width=\"180\">\n      \u003Ca href=\"https:\u002F\u002Fddshub.short.gy\u002Fccscli\">\n        \u003Cimg src=\"assets\u002Fpartners\u002Flogos\u002FDDSHub.png\" alt=\"DDS\" width=\"150\">\n      \u003C\u002Fa>\n    \u003C\u002Ftd>\n    \u003Ctd>\n      Thanks to \u003Cb>DDS\u003C\u002Fb> for sponsoring this project! DDS Hub is a reliable and high-performance Claude API proxy service. DDS Hub provides cost-effective domestic Claude direct acceleration services for both individual and enterprise users. We offer stable and low-latency Claude Max number pools, with full support for \u003Cb>Claude Haiku, Opus, Sonnet\u003C\u002Fb> and other flagship models. Invoices are available for recharges of 1000 RMB or more. Enterprise customers can also enjoy customized grouping and dedicated technical support services. \u003Cbr\u002F>\n      Exclusive benefit for CC-Switch CLI users: register via \u003Ca href=\"https:\u002F\u002Fddshub.short.gy\u002Fccscli\">this link\u003C\u002Fa> and enjoy \u003Cb>an extra 10% credit\u003C\u002Fb> on your first recharge (please contact the group admin to claim after recharging)!\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n\u003C\u002Ftable>\n\n---\n\n## 📸 Screenshots\n\n\u003Cdiv align=\"center\">\n  \u003Ch3>Home\u003C\u002Fh3>\n  \u003Cimg src=\"assets\u002Fscreenshots\u002Fhome-en.png\" alt=\"Home\" width=\"70%\"\u002F>\n\u003C\u002Fdiv>\n\n\u003Cbr\u002F>\n\n\u003Ctable>\n  \u003Ctr>\n    \u003Cth>Switch\u003C\u002Fth>\n    \u003Cth>Settings\u003C\u002Fth>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Ctd>\u003Cimg src=\"assets\u002Fscreenshots\u002Fswitch-en.png\" alt=\"Switch\" width=\"100%\"\u002F>\u003C\u002Ftd>\n    \u003Ctd>\u003Cimg src=\"assets\u002Fscreenshots\u002Fsettings-en.png\" alt=\"Settings\" width=\"100%\"\u002F>\u003C\u002Ftd>\n  \u003C\u002Ftr>\n\u003C\u002Ftable>\n\n## 🚀 Quick Start\n\n**Interactive Mode (Recommended)**\n```bash\ncc-switch\n```\n🤩 Follow on-screen menus to explore features.\n\n**Command-Line Mode**\n```bash\ncc-switch provider list              # List providers\ncc-switch provider switch \u003Cid>       # Switch provider\ncc-switch provider export \u003Cid>       # Export a Claude provider to a standalone settings file\ncc-switch provider stream-check \u003Cid> # Check provider stream health\ncc-switch config webdav show         # Inspect WebDAV sync settings\ncc-switch env tools                  # Check local CLI tools\ncc-switch mcp sync                   # Sync MCP servers\ncc-switch proxy show                 # Inspect proxy routes and status\n\n# Use the global `--app` flag to target specific applications:\ncc-switch --app claude provider list    # Manage Claude providers\ncc-switch --app codex mcp sync          # Sync Codex MCP servers\ncc-switch --app gemini prompts list     # List Gemini prompts\ncc-switch --app openclaw provider list  # Manage OpenClaw providers\n\n# Supported apps: `claude` (default), `codex`, `gemini`, `opencode`, `openclaw`\n```\n\nSee the \"Features\" section for full command list.\n\n---\n\n## 📥 Installation\n\n### Method 1: Quick Install (macOS \u002F Linux)\n\n> Windows users: see Manual Installation below.\n\n```bash\ncurl -fsSL https:\u002F\u002Fgithub.com\u002FSaladDay\u002Fcc-switch-cli\u002Freleases\u002Flatest\u002Fdownload\u002Finstall.sh | bash\n```\n\nThis installs `cc-switch` to `~\u002F.local\u002Fbin`. Set `CC_SWITCH_INSTALL_DIR` to change the target directory.\n\n- If the target already exists, the installer prompts in TTY and refuses to overwrite in non-interactive shells unless `CC_SWITCH_FORCE=1` is set.\n- On Linux, set `CC_SWITCH_LINUX_LIBC=glibc` if you need the glibc build.\n\n\u003Cdetails>\n\u003Csummary>Manual Installation\u003C\u002Fsummary>\n\n#### macOS\n\n```bash\n# Download Universal Binary (recommended, supports Apple Silicon + Intel)\ncurl -LO https:\u002F\u002Fgithub.com\u002Fsaladday\u002Fcc-switch-cli\u002Freleases\u002Flatest\u002Fdownload\u002Fcc-switch-cli-darwin-universal.tar.gz\n\n# Extract\ntar -xzf cc-switch-cli-darwin-universal.tar.gz\n\n# Add execute permission\nchmod +x cc-switch\n\n# Move to PATH\nsudo mv cc-switch \u002Fusr\u002Flocal\u002Fbin\u002F\n\n# If you encounter \"cannot be verified\" warning\nxattr -cr \u002Fusr\u002Flocal\u002Fbin\u002Fcc-switch\n```\n\n#### Linux (x64)\n\n```bash\n# Download\ncurl -LO https:\u002F\u002Fgithub.com\u002Fsaladday\u002Fcc-switch-cli\u002Freleases\u002Flatest\u002Fdownload\u002Fcc-switch-cli-linux-x64-musl.tar.gz\n\n# Extract\ntar -xzf cc-switch-cli-linux-x64-musl.tar.gz\n\n# Add execute permission\nchmod +x cc-switch\n\n# Move to PATH\nsudo mv cc-switch \u002Fusr\u002Flocal\u002Fbin\u002F\n```\n\n#### Linux (ARM64)\n\n```bash\n# For Raspberry Pi or ARM servers\ncurl -LO https:\u002F\u002Fgithub.com\u002Fsaladday\u002Fcc-switch-cli\u002Freleases\u002Flatest\u002Fdownload\u002Fcc-switch-cli-linux-arm64-musl.tar.gz\ntar -xzf cc-switch-cli-linux-arm64-musl.tar.gz\nchmod +x cc-switch\nsudo mv cc-switch \u002Fusr\u002Flocal\u002Fbin\u002F\n```\n\n#### Windows\n\n```powershell\n# Download the zip file\n# https:\u002F\u002Fgithub.com\u002Fsaladday\u002Fcc-switch-cli\u002Freleases\u002Flatest\u002Fdownload\u002Fcc-switch-cli-windows-x64.zip\n\n# After extracting, move cc-switch.exe to a PATH directory, e.g.:\nmove cc-switch.exe C:\\Windows\\System32\\\n\n# Or run directly\n.\\cc-switch.exe\n```\n\n\u003C\u002Fdetails>\n\n### Method 2: Build from Source\n\n**Prerequisites:**\n- Rust 1.85+ ([install via rustup](https:\u002F\u002Frustup.rs\u002F))\n\n**Build:**\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fsaladday\u002Fcc-switch-cli.git\ncd cc-switch-cli\u002Fsrc-tauri\ncargo build --release\n\n# Binary location: .\u002Ftarget\u002Frelease\u002Fcc-switch\n```\n\n**Install to System:**\n```bash\n# macOS\u002FLinux\nsudo cp target\u002Frelease\u002Fcc-switch \u002Fusr\u002Flocal\u002Fbin\u002F\n\n# Windows\ncopy target\\release\\cc-switch.exe C:\\Windows\\System32\\\n```\n\n---\n\n## ✨ Features\n\n### 🔌 Provider Management\n\nManage API configurations for **Claude Code**, **Codex**, **Gemini**, **OpenCode**, and **OpenClaw**.\n\n**Features:** One-click switching, standalone Claude settings export, multi-endpoint support, API key management, remote model discovery, and per-app diagnostics such as speed testing or stream health checks where supported.\n\n```bash\ncc-switch provider list              # List all providers\ncc-switch provider current           # Show current provider\ncc-switch provider switch \u003Cid>       # Switch provider\ncc-switch provider add               # Add new provider\ncc-switch provider edit \u003Cid>         # Edit existing provider\ncc-switch provider duplicate \u003Cid>    # Duplicate a provider\ncc-switch provider delete \u003Cid>       # Delete provider\ncc-switch provider export \u003Cid>       # Export to .\u002F.claude\u002Fsettings.local.json for Claude auto-load\ncc-switch provider speedtest \u003Cid>    # Test API latency\ncc-switch provider stream-check \u003Cid> # Run stream health check\ncc-switch provider fetch-models \u003Cid> # Fetch remote model list\ncc-switch provider export \u003Cid> --output ~\u002F.claude\u002Fsettings-demo.json # Custom settings file path\n```\n\n### 🛠️ MCP Server Management\n\nManage Model Context Protocol servers across Claude, Codex, Gemini, and OpenCode.\n\n**Features:** Unified management, multi-app support, three transport types (stdio\u002Fhttp\u002Fsse), automatic sync, and live-config adapters for TOML and JSON targets.\n\n```bash\ncc-switch mcp list                   # List all MCP servers\ncc-switch mcp add                    # Add new MCP server (interactive)\ncc-switch mcp edit \u003Cid>              # Edit MCP server\ncc-switch mcp delete \u003Cid>            # Delete MCP server\ncc-switch mcp enable \u003Cid> --app claude   # Enable for specific app\ncc-switch mcp disable \u003Cid> --app claude  # Disable for specific app\ncc-switch mcp validate \u003Ccommand>     # Validate command in PATH\ncc-switch mcp sync                   # Sync to live files\ncc-switch mcp import --app claude    # Import from live config\n```\n\n### 💬 Prompts Management\n\nManage system prompt presets for AI coding assistants.\n\n**Cross-app support:** Claude (`CLAUDE.md`), Codex (`AGENTS.md`), Gemini (`GEMINI.md`), OpenCode (`AGENTS.md`), OpenClaw (`AGENTS.md`).\n\n```bash\ncc-switch prompts list               # List prompt presets\ncc-switch prompts current            # Show current active prompt\ncc-switch prompts activate \u003Cid>      # Activate prompt\ncc-switch prompts deactivate         # Deactivate current active prompt\ncc-switch prompts create [name]      # Create a prompt preset, optionally naming it up front\ncc-switch prompts rename \u003Cid> [name] # Rename prompt preset, interactive if name is omitted\ncc-switch prompts edit \u003Cid>          # Edit prompt preset\ncc-switch prompts show \u003Cid>          # Display full content\ncc-switch prompts delete \u003Cid>        # Delete prompt\n```\n\n### 🎯 Skills Management\n\nManage and extend Claude Code\u002FCodex\u002FGemini\u002FOpenCode capabilities with community skills.\n\n**Features:** SSOT-based skills store, multi-app enable\u002Fdisable, sync to app directories, unmanaged scan\u002Fimport, repo discovery.\n\n```bash\ncc-switch skills list                # List installed skills\ncc-switch skills discover \u003Cquery>      # Discover available skills (alias: search)\ncc-switch skills install \u003Cname>      # Install a skill\ncc-switch skills uninstall \u003Cname>    # Uninstall a skill\ncc-switch skills enable \u003Cname>       # Enable for current app (--app)\ncc-switch skills disable \u003Cname>      # Disable for current app (--app)\ncc-switch skills info \u003Cname>         # Show skill information\ncc-switch skills sync                # Sync enabled skills to app dirs\ncc-switch skills sync-method [m]     # Show\u002Fset sync method (auto|symlink|copy)\ncc-switch skills scan-unmanaged      # Scan unmanaged skills in app dirs\ncc-switch skills import-from-apps    # Import unmanaged skills into SSOT\ncc-switch skills repos list          # List skill repositories\ncc-switch skills repos add \u003Crepo>    # Add repo (owner\u002Fname[@branch] or GitHub URL)\ncc-switch skills repos remove \u003Crepo> # Remove repo (owner\u002Fname or GitHub URL)\ncc-switch skills repos enable \u003Crepo> # Enable repo without changing branch\ncc-switch skills repos disable \u003Crepo> # Disable repo without changing branch\n```\n\n### ⚙️ Configuration Management\n\nManage configuration backups, imports, and exports.\n\n**Features:** Custom backup naming, interactive backup selection, automatic rotation (keep 10), import\u002Fexport, common snippets, WebDAV sync.\n\n```bash\ncc-switch config show                # Display configuration\ncc-switch config path                # Show config file paths\ncc-switch config validate            # Validate config file\n\n# Common snippet (shared settings across providers)\n# Tries to refresh live config when applicable (`--apply` is kept only as a compatibility flag)\ncc-switch --app claude config common show\ncc-switch --app claude config common set --snippet '{\"env\":{\"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC\":1},\"includeCoAuthoredBy\":false}'\ncc-switch --app claude config common clear\n\n# Backup\ncc-switch config backup              # Create backup (auto-named)\ncc-switch config backup --name my-backup  # Create backup with custom name\n\n# Restore\ncc-switch config restore             # Interactive: select from backup list\ncc-switch config restore --backup \u003Cid>    # Restore specific backup by ID\ncc-switch config restore --file \u003Cpath>    # Restore from external file\n\n# Import\u002FExport\ncc-switch config export \u003Cpath>       # Export to external file\ncc-switch config import \u003Cpath>       # Import from external file\n\n# WebDAV sync\ncc-switch config webdav show\ncc-switch config webdav set --base-url \u003Curl> --username \u003Cuser> --password \u003Cpassword> --enable\ncc-switch config webdav jianguoyun --username \u003Cuser> --password \u003Cpassword>\ncc-switch config webdav check-connection\ncc-switch config webdav upload\ncc-switch config webdav download\ncc-switch config webdav migrate-v1-to-v2\n\ncc-switch config reset               # Reset to default configuration\n```\n\n### 🌉 Proxy Management\n\nInspect and control the local multi-app proxy used by supported apps.\n\n**Features:** Persisted enable\u002Fdisable switch, current route inspection, dashboard telemetry, and foreground serve mode for debugging.\n\n```bash\ncc-switch proxy show                 # Show proxy configuration and routes\ncc-switch proxy enable               # Enable the persisted proxy switch\ncc-switch proxy disable              # Disable the persisted proxy switch\ncc-switch proxy serve                # Run the proxy in foreground\n```\n\n### 🧪 Environment & Local Tools\n\nInspect environment conflicts and whether required local CLIs are installed.\n\n```bash\ncc-switch env check                  # Check environment conflicts\ncc-switch env list                   # List relevant environment variables\ncc-switch env tools                  # Check Claude\u002FCodex\u002FGemini\u002FOpenCode CLIs\n```\n\n### 🌐 Multi-language Support\n\nInteractive mode supports English and Chinese, language settings are automatically saved.\n\n- Default language: English\n- Go to `⚙️ Settings` menu to switch language\n\n### 🔧 Utilities\n\nShell completions, environment management, and other utilities.\n\n```bash\n# Shell completions\ncc-switch completions install --activate   # Recommended: install + activate for bash\u002Fzsh\ncc-switch completions install              # Conservative: install only, no rc edits\ncc-switch completions status               # Inspect managed completion status\ncc-switch completions uninstall            # Remove managed completion assets\ncc-switch completions bash                 # Compatibility raw generator path\ncc-switch completions fish                 # Raw generation still works for non-managed shells\n\n# Environment management\ncc-switch env check                  # Check for environment conflicts\ncc-switch env list                   # List environment variables\n\n# Self-update\ncc-switch update                     # Update to latest release\ncc-switch update --version vX.Y.Z    # Update to a specific version\n```\n\nAutomated install\u002Factivation currently targets `bash` and `zsh` only. Other shells remain available through the raw generator path, for example `cc-switch completions fish`.\n\n---\n\n## 🏗️ Architecture\n\n### Core Design\n\n- **SQLite-backed state**: Core data lives in `~\u002F.cc-switch\u002Fcc-switch.db` by default (or under `$CC_SWITCH_CONFIG_DIR\u002F` when set); legacy `config.json` is kept only for older import and migration paths\n- **Skills SSOT**: Skill source files live in `~\u002F.cc-switch\u002Fskills\u002F` by default (or under `$CC_SWITCH_CONFIG_DIR\u002Fskills\u002F` when set), while install state and app enablement stay in the database\n- **Safe Live Sync (Default)**: Skip writing live files for apps that haven't been initialized yet (prevents creating `~\u002F.claude`, `~\u002F.codex`, `~\u002F.gemini`, `~\u002F.config\u002Fopencode`, or `~\u002F.openclaw` unexpectedly)\n- **Atomic Writes**: Temp file + rename pattern prevents corruption\n- **Service Layer Reuse**: 100% reused from original GUI version\n- **Concurrency Safe**: RwLock with scoped guards\n\n### Configuration Files\n\n**CC-Switch Storage** (default: `~\u002F.cc-switch`, override: `CC_SWITCH_CONFIG_DIR`):\n- `~\u002F.cc-switch\u002Fcc-switch.db` - Main database for providers, MCP, prompts, and app state\n- `~\u002F.cc-switch\u002Fsettings.json` - Settings\n- `~\u002F.cc-switch\u002Fskills\u002F` - Installed skill sources (SSOT)\n- `~\u002F.cc-switch\u002Fbackups\u002F` - Auto-rotation (keep 10)\n- `~\u002F.cc-switch\u002Fconfig.json` - Legacy JSON kept for compatibility and import flows\n\nWhen `CC_SWITCH_CONFIG_DIR` is set, CC-Switch uses that directory as its config root; existing data under `~\u002F.cc-switch` is not migrated automatically.\n\n**Live Configs:**\n- Claude: `~\u002F.claude\u002Fsettings.json` (provider\u002Fcommon config), `~\u002F.claude.json` (MCP), `~\u002F.claude\u002FCLAUDE.md` (prompts)\n- Codex: `~\u002F.codex\u002Fauth.json` (auth state), `~\u002F.codex\u002Fconfig.toml` (provider\u002Fcommon config + MCP), `~\u002F.codex\u002FAGENTS.md` (prompts)\n- Gemini: `~\u002F.gemini\u002F.env` (provider env), `~\u002F.gemini\u002Fsettings.json` (settings + MCP), `~\u002F.gemini\u002FGEMINI.md` (prompts)\n- OpenCode: `~\u002F.config\u002Fopencode\u002Fopencode.json` (providers + MCP + runtime config), `~\u002F.config\u002Fopencode\u002FAGENTS.md` (prompts)\n- OpenClaw: `~\u002F.openclaw\u002Fopenclaw.json` (providers + env\u002Ftools\u002Fagents defaults), `~\u002F.openclaw\u002FAGENTS.md` (prompts)\n\n---\n\n## ❓ FAQ (Frequently Asked Questions)\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Why doesn't my configuration take effect after switching providers?\u003C\u002Fb>\u003C\u002Fsummary>\n\n\u003Cbr>\n\nFirst, make sure the target CLI has been initialized at least once (i.e. its config directory exists). CC-Switch may skip live sync for uninitialized apps; you will see a warning. Run the target CLI once (e.g. `claude --help`, `codex --help`, `gemini --help`, `opencode --help`, `openclaw --help`), then switch again.\n\nThis is usually caused by **environment variable conflicts**. If you have API keys set in system environment variables (like `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`), they will override CC-Switch's configuration.\n\n**Solution:**\n\n1. Check for conflicts:\n   ```bash\n   cc-switch env check --app claude\n   ```\n\n2. List all related environment variables:\n   ```bash\n   cc-switch env list --app claude\n   ```\n\n3. If conflicts are found, manually remove them:\n   - **macOS\u002FLinux**: Edit your shell config file (`~\u002F.bashrc`, `~\u002F.zshrc`, etc.)\n     ```bash\n     # Find and delete the line with the environment variable\n     nano ~\u002F.zshrc\n     # Or use your preferred text editor: vim, code, etc.\n     ```\n   - **Windows**: Open System Properties → Environment Variables and delete the conflicting variables\n\n4. Restart your terminal for changes to take effect.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Which apps are supported?\u003C\u002Fb>\u003C\u002Fsummary>\n\n\u003Cbr>\n\nCC-Switch currently supports five AI coding assistants:\n- **Claude Code** (`--app claude`, default)\n- **Codex** (`--app codex`)\n- **Gemini** (`--app gemini`)\n- **OpenCode** (`--app opencode`)\n- **OpenClaw** (`--app openclaw`)\n\nUse the global `--app` flag to specify which app to manage:\n```bash\ncc-switch --app codex provider list\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>How do I report bugs or request features?\u003C\u002Fb>\u003C\u002Fsummary>\n\n\u003Cbr>\n\nPlease open an issue on our [GitHub Issues](https:\u002F\u002Fgithub.com\u002Fsaladday\u002Fcc-switch-cli\u002Fissues) page with:\n- Detailed description of the problem or feature request\n- Steps to reproduce (for bugs)\n- Your system information (OS, version)\n- Relevant logs or error messages\n\n\u003C\u002Fdetails>\n\n---\n\n## 🛠️ Development\n\n### Requirements\n\n- **Rust**: 1.85+ ([rustup](https:\u002F\u002Frustup.rs\u002F))\n- **Cargo**: Bundled with Rust\n\n### Commands\n\n```bash\ncd src-tauri\n\ncargo run                            # Development mode\ncargo run -- provider list           # Run specific command\ncargo build --release                # Build release\n\ncargo fmt                            # Format code\ncargo clippy                         # Lint code\ncargo test                           # Run tests\n```\n\n### Code Structure\n\n```\nsrc-tauri\u002Fsrc\u002F\n├── cli\u002F\n│   ├── commands\u002F          # CLI subcommands (provider, mcp, prompts, skills, proxy, env, ...)\n│   ├── tui\u002F               # Interactive TUI mode (ratatui)\n│   ├── interactive\u002F       # Interactive entrypoint \u002F TTY gate\n│   └── ui\u002F                # UI utilities (tables, colors)\n├── services\u002F              # Business logic (provider, mcp, prompt, webdav, ...)\n├── database\u002F              # SQLite storage, migrations, backup\n├── main.rs                # CLI entry point\n└── ...                    # App-specific configs, proxy, error handling\n```\n\n\n## 🤝 Contributing\n\nContributions welcome! This fork focuses on CLI functionality.\n\n**Before submitting PRs:**\n- ✅ Pass format check: `cargo fmt --check`\n- ✅ Pass linter: `cargo clippy`\n- ✅ Pass tests: `cargo test`\n- 💡 Open an issue for discussion first\n\n---\n\n## 📜 License\n\n- MIT © Original Author: Jason Young\n- CLI Fork Maintainer: saladday\n","CC-Switch CLI 是一个跨平台的命令行工具，用于统一管理 Claude Code、Codex、Gemini、OpenCode 和 OpenClaw 的配置。它支持多平台（Windows、macOS 和 Linux），并使用 Rust 语言构建，确保了高性能和安全性。该工具提供了一站式的解决方案，包括应用特定的支持如MCP服务器、技能、提示、本地代理路由及环境检查等功能。WebDAV同步功能与上游项目完全兼容。适用于需要高效管理和配置多个代码生成或AI辅助开发工具的开发者和团队。",2,"2026-06-11 03:31:26","trending"]