MIT License

项目介绍

luckybilly/cc-switch-helper 是一个托管在 GitHub 上的开源项目,主要使用 JavaScript 编写,采用 MIT License 许可证,目前获得 43 个 Star、7 次 Fork。

仓库全名
luckybilly/cc-switch-helper
开源许可证
MIT License
Star 数
43
Fork 数
7

README 摘要

cc-switch-helper English | 中文文档 Overcomes the global single-config limitation of the original CC-Switch, enabling per-terminal, per-window binding of different API keys and models — multiple sessions running in parallel without interference. The native CC-Switch shares one global API config across all terminals — switching providers changes every window at once. This tool provides session-level isolation: one…

完整内容见 GitHub 原始 README 或本页 。

常见问题

cc-switch-helper 用什么语言开发?

主要使用 JavaScript 编写,采用 MIT License 许可证,目前有 43 个 Star。

cc-switch-helper 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 cc-switch-helper 的源码?

可以直接克隆仓库:git clone https://github.com/luckybilly/cc-switch-helper.git,默认分支为 main;安装与运行步骤见仓库 README。

cc-switch-helper 最近还在维护吗?

仓库最近一次更新为 3 周前,当前没有未关闭的 Issue;Star 数为 43,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

Run different Claude Code providers in different terminals. 支持同时在不同终端窗口用不同 API Key 跑 Claude Code,互不影响

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
57
价值分
27
活跃状态
活跃

语言占比

JavaScript

贡献者

README

cc-switch-helper

English | 中文文档

Overcomes the global single-config limitation of the original CC-Switch, enabling per-terminal, per-window binding of different API keys and models — multiple sessions running in parallel without interference.

The native CC-Switch shares one global API config across all terminals — switching providers changes every window at once. This tool provides session-level isolation: one terminal on a personal key, another on a company key, running side by side with no conflicts.

Why?

CC-Switch is a great tool for managing Claude Code providers, but switching providers changes the global config — every running Claude Code instance picks up the change.

ccs takes a different approach: it passes the provider settings directly to each claude process. This means you can run DeepSeek in one terminal and GLM in another, at the same time, without ever touching the global config.

Terminal 1: ccs deep     → Claude Code running DeepSeek
Terminal 2: ccs glm      → Claude Code running GLM
Terminal 3: ccs zcy      → Claude Code running your custom provider

Each window is independent. Switch providers in one — the others stay untouched.

cc-switch-helper demo

CC-Switch provider configuration panel:

cc-switch settings

Features

  • Session-level config isolation — run different API keys, providers, and models across multiple terminals/windows simultaneously, no interference
  • Interactive menu — arrow keys to pick a provider, no need to remember names
  • Fuzzy match — ccs deep matches “DeepSeek”, ccs mini matches “Minimax”
  • Cross-platform — works on macOS, Linux, and Windows (PowerShell / CMD / Git Bash)
  • Zero config — reads directly from your CC-Switch database, compatible with existing key groups and relay configs
  • Non-invasive — does not modify CC-Switch source code; CC-Switch upgrades won’t affect this tool

Prerequisites

  1. CC-Switch installed with at least one Claude provider configured
  2. Claude Code CLI installed
  3. Node.js ≥ 22.22

Install

npm install -g cc-switch-helper

This registers the ccs command globally.

Prefer living on the edge? Install the unreleased development version straight from GitHub:

npm install -g luckybilly/cc-switch-helper

Usage

ccs                       # Interactive provider selection
ccs <name>                # Fuzzy-match provider by name
ccs <name> -- <args...>   # Pass extra arguments to claude
ccs --no-skip             # Launch without --dangerously-skip-permissions
ccs --list                # List all configured providers
ccs --version             # Print version
ccs --help                # Show help

Examples

# Pick from an interactive menu
ccs

Interactive provider selection

# Launch with a specific provider (case-insensitive fuzzy match)
ccs zcy
ccs DeepSeek
ccs glm

# Pass extra arguments to claude (everything after --)
ccs zcy -- --resume
ccs DeepSeek -- -p "hello world"

# Launch without --dangerously-skip-permissions (review each permission)
ccs zcy --no-skip

# See all your configured providers
ccs --list

Alias to cc

If you prefer the shorter cc command, add an alias to your shell config:

# ~/.zshrc or ~/.bashrc
alias cc=ccs

Note: cc is also the system C compiler on macOS/Linux. The alias takes priority in your shell, but be aware if you work with C projects.

How it works

  1. Reads providers from CC-Switch’s SQLite database (~/.cc-switch/cc-switch.db), plus the shared common_config_claude (hooks, statusLine, permissions, plugins, …) stored in its settings table
  2. Builds the effective settings the same way CC-Switch does on switch — json_deep_merge(provider.settings_config, common_config) when the provider’s meta.commonConfigEnabled is true (and the common config is non-empty), otherwise the provider’s settings_config verbatim. This is a recursive deep merge; on any leaf conflict common config wins.
  3. Launches claude --settings <json> --dangerously-skip-permissions

Each window gets exactly what CC-Switch would write to ~/.claude/settings.json for that provider — including hooks/plugins/statusLine when the provider shares the common config, and a bare env for providers that opt out.

--dangerously-skip-permissions is a built-in Claude Code flag that skips per-action permission prompts for a smoother experience. Add --no-skip to restore per-action approval, useful when you want tighter permission control.

Platform support

Platform Shell Status
macOS zsh, bash ✅
Linux bash, zsh, fish ✅
Windows PowerShell ✅
Windows CMD ✅
Windows Git Bash ✅

Supported CPU architectures: x64 and arm64.

FAQ

Q: Does ccs conflict with switching providers in CC-Switch?

A: No. ccs pins the provider config (model, API key, etc.) to the process at launch, so switching the default provider can’t redirect a session that’s already running.

One exception: config items added to settings.json after the switch get auto-loaded into the old session — to be safe, start a fresh ccs session after switching.

Q: How do I know which provider a window is using?

A: ccs prints → Launching [provider-name] on startup. The terminal title bar also shows it.

Q: What’s the difference between default and --no-skip?

A: Default includes --dangerously-skip-permissions, which skips Claude Code’s per-action permission prompts. --no-skip restores per-action approval, useful for tighter security control.

License

MIT

评论

暂无评论