CCS - Claude Code Switch
Một lệnh, không gián đoạn, mọi provider
Chuyển đổi giữa Claude, Codex, Kiro, GLM, Kimi, Ollama và hơn thế. Nhiều tài khoản, nhiều runtime — không cần đổi config.
Được tạo bởi @kaitranntt
Tại Sao Dùng CCS?
Bạn đang trả tiền cho nhiều gói AI — Claude Pro, ChatGPT Plus, Z.AI, Kimi, v.v. — và muốn điều khiển tất cả từ Claude Code CLI mà không phải viết lại config mỗi lần đổi provider.
Chạm giới hạn giữa session — context, tiến độ, mọi thứ đều đóng băng.
Tạo settings JSON mới, sửa cliproxy config.yaml, restart Claude Code — mỗi lần đều như vậy.
Auth token riêng, section riêng trong config.yaml, CLAUDE_CONFIG_DIR riêng để cách ly tài khoản.
Đổi provider bằng ccs <profile> — không env vars, không sửa config.
Chạm rate limit? Tiếp tục cùng task ở provider khác bằng --resume.
OAuth token, cách ly tài khoản, runtime adapter — tất cả CCS lo.
npm install -g @kaitranntt/ccs && ccs config Mở dashboard tại http://localhost:3000 — thêm provider ở đó, rồi chạy ccs <profile> từ terminal.
Muốn tìm hiểu thêm về cách resume session giữa các provider? Xem Hướng Dẫn Phục Hồi Session.
Tính Năng Nổi Bật
Điểm khác biệt so với các công cụ thay thế
Chuyển Đổi Một Lệnh
Chuyển provider bằng profile có tên — chỉ cần ccs <provider>. Không cần sửa env vars hay config.
Phục Hồi Session
Resume session khi bị rate limit bằng provider khác. Tính năng hiếm có trong các CLI tool.
Đa Runtime
Kết nối Claude Code, Codex CLI (credential ngắn hạn) và Factory Droid (adapter đa target) — một công cụ, ba runtime.
WebSearch & Browser
Tích hợp sẵn WebSearch và browser automation cho các provider bên thứ ba.
Proxy Tương Thích OpenAI
Proxy cục bộ với bộ chọn profile:model và định tuyến theo kịch bản cho mọi client tương thích OpenAI.
20+ Provider, 3 Tầng Auth
14 provider OAuth qua CLIProxy, đa tài khoản Claude, và API profile BYO-key (Alibaba, MiniMax, Novita, Ollama, Llama.cpp).
Extended Thinking
Cờ --thinking thống nhất điều khiển ngân sách suy luận (tối đa 100K) trên Anthropic, Antigravity, Gemini hybrid và Codex theo cấp.
An Toàn Tài Khoản
Cách ly cross-provider, phát hiện ban và giám sát hạn ngạch để bảo vệ tài khoản Google khi chạy nhiều OAuth provider.
Phân Tích Ảnh & PDF
Hỗ trợ vision MCP-first cho các third-party launch (GLM/Kimi/Qwen) thiếu khả năng đọc ảnh và PDF native.
Tài Liệu Đầy Đủ
Trang docs riêng với product tour, CLI reference và hướng dẫn theo từng provider.
Dashboard Trực Quan
Dashboard React 19 để theo dõi auth, phân tích sử dụng và quản lý profile.
Cheatsheet CLI
@kaitranntt/ccs@8.2.0Tham khảo đầy đủ mọi public root command và subcommand. Phân loại theo mục đích.
Đã sync 2026-06-08
Cơ Bản
7 lệnhRoute Claude Code qua một provider profile.
-
ccsProfile mặc định (Claude Pro/Max) -
ccs <profile>Chạy với profile bất kỳ -
ccs glmZ.AI / GLM (coder rẻ) -
ccs kimiMoonshot Kimi (long context) -
ccs codexOpenAI Codex (Plus/Pro) -
ccs <profile> "<prompt>"One-shot prompt (không vào REPL) -
ccs setupWizard cấu hình lần đầu
Quản Lý Profile
15 lệnhTạo, liệt kê và chuyển đổi tài khoản OAuth và profile API-key.
-
ccs auth create <profile>Tạo profile OAuth -
ccs auth listLiệt kê các tài khoản Claude song song -
ccs auth show <profile>Xem chi tiết một auth profile -
ccs auth default <profile>Đặt tài khoản mặc định cho profile -
ccs auth reset-defaultReset tài khoản mặc định của profile -
ccs auth backupBackup các auth profile hiện tại -
ccs auth resourcesXem các resource file của profile -
ccs auth remove <profile>Xóa một auth profile -
ccs api create --preset <name>Tạo profile API-key (preset) -
ccs api listLiệt kê các API profile đã cấu hình -
ccs api discoverTự động phát hiện API profile từ env -
ccs api copy <name>Nhân bản một API profile có sẵn -
ccs api export <name>Export API profile ra file -
ccs api import <file>Import API profile từ file -
ccs api remove <name>Xóa một API profile
Cấu Hình
5 lệnhMở dashboard và cấu hình các setting toàn cục.
-
ccs configMở dashboard trong browser -
ccs config authCấu hình HTTP Basic Auth cho dashboard -
ccs config channelsCấu hình official channels (Telegram / Discord / iMessage) -
ccs config thinkingCấu hình reasoning effort -
ccs config image-analysisCấu hình image analysis qua MCP
CLIProxy
16 lệnhQuản lý CLIProxy variant, routing, quota và lifecycle local.
-
ccs cliproxy createTạo một CLIProxy variant mới -
ccs cliproxy editChỉnh sửa config của CLIProxy variant -
ccs cliproxy listLiệt kê các CLIProxy variant -
ccs cliproxy default <variant>Đặt CLIProxy variant mặc định -
ccs cliproxy routingXem hoặc sửa rule routing model -
ccs cliproxy catalogHiển thị catalog model của CLIProxy -
ccs cliproxy syncSync config CLIProxy xuống disk -
ccs cliproxy quotaXem quota usage của provider -
ccs cliproxy startKhởi động instance CLIProxy -
ccs cliproxy restartRestart instance CLIProxy -
ccs cliproxy stopDừng instance CLIProxy -
ccs cliproxy statusHiển thị trạng thái CLIProxy -
ccs cliproxy doctorChẩn đoán health của CLIProxy -
ccs cliproxy pauseTạm dừng CLIProxy không cần stop -
ccs cliproxy resumeTiếp tục CLIProxy đang pause -
ccs cliproxy removeXóa một CLIProxy variant
Vận Hành
14 lệnhHealth check, lifecycle, token và các lệnh meta.
-
ccs doctorHealth check (auth + token + path) -
ccs persistLock profile hiện tại vào ~/.claude -
ccs migrateMigrate từ config phiên bản cũ -
ccs cleanupXóa profile không dùng + cache -
ccs updateUpdate CCS lên bản mới nhất -
ccs syncSync delegation commands và skills -
ccs env <profile>Export env của profile cho third-party tool -
ccs tokensQuản lý auth token của CLIProxy -
ccs proxy startKhởi động local proxy tương thích OpenAI -
ccs proxy stopDừng daemon local proxy -
ccs proxy statusHiển thị trạng thái local proxy -
ccs proxy activateKích hoạt proxy cho shell hiện tại -
ccs help <topic>Xem help cho một topic (profiles, providers, targets…) -
ccs --versionHiển thị version CCS đã cài
Runtime Targets
12 lệnhĐẩy profile sang runtime agent khác.
-
ccs --target droid <profile>Route profile sang runtime Factory Droid -
ccs --target codex <profile>Route profile sang runtime Codex -
ccs --target claude <profile>Buộc target Claude (mặc định) -
ccs-droid <profile>Wrapper Factory Droid -
ccsd <profile>Alias ngắn của ccs-droid -
ccs-codex <profile>Wrapper Codex CLI native -
ccsx <profile>Alias ngắn của ccs-codex -
ccsxp <profile>Shortcut Codex-trên-Codex -
ccs browserClaude Browser Attach + Codex Browser Tools -
ccs cursorTích hợp Cursor IDE -
ccs copilotBridge GitHub Copilot (deprecated) -
ccs help completionCài đặt & test shell completion
Docker
8 lệnhChạy CCS trong container sandbox.
-
ccs docker upKhởi động container CCS -
ccs docker downTắt container CCS -
ccs docker statusXem trạng thái container -
ccs docker logsTail log container -
ccs docker updateUpdate image của Docker stack -
ccs docker configXem hoặc sửa config Docker stack -
ccs docker show-keyHiển thị Docker API key hiện tại (8.1.0+) -
ccs docker finalize-key-rotationHoàn tất rotate Docker key (8.1.0+)
Chạy bất kỳ lệnh nào với --help để xem đầy đủ option. Để xem hướng dẫn cấu hình chi tiết cho từng profile (Claude / Codex / GLM / Kimi / Gemini …), xem mục Cây Quyết Định Provider phía dưới. Docs đầy đủ tại docs.ccs.kaitran.ca.
Cấu Hình Providers
Chọn cách bạn muốn thiết lập các AI provider. Chọn phương thức phù hợp nhất.
Cây Quyết Định Provider
Chọn provider mà bạn có subscription để sử dụng trong Claude Code CLI.
Cây quyết định này chỉ phục vụ cấu hình chạy trong Claude Code CLI. Người dùng web app và desktop app không cần CCS.
CCS cho phép chuyển đổi nhanh giữa các subscription provider ngay trong Claude Code CLI. Chọn provider bên dưới để xem env vars và cấu hình cần thiết.
Coming soon...
Click một node provider để xem cấu hình. Cuộn để zoom, kéo để pan.
Web Dashboard
MớiCCS đi kèm dashboard React 19 dạng routed — không phải một modal cấu hình duy nhất. Mỗi workspace phục vụ một mảng orchestration riêng.
Profiles
Tạo API profiles cho OpenRouter, Alibaba Coding Plan, local runtimes hoặc custom endpoints.
CLIProxy Plus
Kết nối OAuth providers, xem trạng thái provider và chỉnh routing cho proxy cục bộ.
Accounts
Tạo auth accounts có tên, copy command an toàn và quản lý context lane shared hoặc isolated.
Analytics
Xem usage theo khoảng thời gian để non-tech readers nhận ra spike và provider mix nhanh.
Health
Chạy cùng nhóm kiểm tra như ccs doctor và biết mục nào cần xử lý trước khi bắt đầu.
Settings
Cấu hình search, browser, image, proxy, auth, backup, env và thinking ở một nơi.
Khởi chạy Dashboard
Mở dashboard (tự mở trình duyệt)
ccs config Chỉ định port tùy chỉnh
ccs config --port 3000 Dashboard sẽ tự động mở trong trình duyệt. Nếu không, truy cập thủ công tại http://localhost:PORT
Lộ trình setup cho người mới
Mở app cục bộ
ccs config Bắt đầu bằng dashboard thay vì tự sửa YAML.
Chọn API profile lane
/providers Dùng Profiles cho OpenRouter, Alibaba Coding Plan, local models và custom OpenAI-compatible endpoints.
Kết nối OAuth providers
/cliproxy Dùng CLIProxy cho Gemini, Codex, Antigravity, Qwen, Claude, Kimi và các provider dùng OAuth.
Kiểm tra trước khi code
/health Mở Health để kiểm tra, sau đó dùng Logs khi request lỗi hoặc provider trả 404, 429, 503.
Đi đâu trong dashboard
Home
/ Các thẻ trạng thái nhanh, account monitor, phân bổ request và shortcut đến Logs workspace.
Analytics
/analytics Theo dõi token usage, cache cost, model spend, sampled sessions và khoảng thời gian như 24H, 7D, Month hoặc All Time.
Profiles
/providers Điểm bắt đầu tốt nhất cho provider dùng API key và custom endpoints. Tạo, import hoặc tìm API profiles tại đây.
CLIProxy Overview
/cliproxy Xem trạng thái kết nối OAuth providers, quick setup, provider cards, routing mode, session affinity và model presets.
AI Providers
/cliproxy/ai-providers Cấu hình CLIProxy Plus provider families, hybrid/API-key connectors, routing behavior và trạng thái sync proxy.
Control Panel
/cliproxy/control-panel Dùng khi cần proxy lifecycle controls hoặc thao tác vận hành quanh local CLIProxy service.
Accounts
/accounts Tạo auth accounts, quản lý shared resources và chọn account giữ context isolated hay shared.
Shared Resources
/shared Kiểm tra commands, skills, agents, plugins, settings và resource policies mà shared accounts kế thừa.
Claude Extension
/claude-extension Lưu IDE bindings, kiểm tra drift và apply/reset shared Claude settings cùng IDE-local settings.
Codex CLI
/codex Kiểm tra Codex install được phát hiện, aliases, cliproxy shortcuts, config.toml path và raw native Codex config.
Factory Droid
/droid Review và sửa Droid BYOK settings trong ~/.factory/settings.json, gồm custom models và defaults.
GitHub Copilot
/copilot Compatibility bridge đã deprecated cho Copilot model mappings và daemon setup. Nên ưu tiên CLIProxy paths mới.
Cursor IDE
/legacy/cursor Legacy Cursor bridge cho local daemon flow cũ. Setup mới nên dùng CLIProxy-backed Cursor auth.
Health
/health Chạy ccs doctor checks cho system, environment, config, delegation, OAuth readiness và WebSearch.
Logs
/logs Lọc live activity, entries, traces, errors, request IDs, JSON payloads và chi tiết request theo source.
Settings
/settings Cấu hình search backends, browser/image tools, channels, env, thinking, proxy, auth, backup và raw config.yaml.
Xem trước Dashboard
Quy tắc dễ nhớ
Nếu bạn trả tiền bằng API key, bắt đầu ở Profiles. Nếu bạn đăng nhập bằng tài khoản provider, bắt đầu ở CLIProxy hoặc Accounts. Nếu lỗi, vào Health trước rồi đến Logs.
Local và dễ kiểm tra
Dashboard chạy trên localhost và giữ dữ liệu trên máy bạn. Sensitive values được ẩn cho tới khi bạn chủ động reveal.
Sidebar chia thành General (Home, Analytics), Identity & Access (Profiles, CLIProxy, Accounts), Compatible CLIs (Claude Extension, Codex CLI, Factory Droid), integrations đã deprecated và System (Health, Logs, Settings).
Workflow hiệu quả với CCS & ClaudeKit
Bộ recipe đã được chọn lọc để route task qua nhiều provider và runtime — tối ưu chi phí, chiều sâu hoặc context.
Full cycle tối ưu chi phí
Khi bạn muốn plan & review chất lượng nhưng implement khối lượng lớn với chi phí thấp.
$ ccs "/ck:plan add payment integration" $ ccs glm "/ck:cook implement Stripe payment flow" $ ccs glm "/ck:test run payment tests" $ ccs "/ck:code-review check payment implementation" Debug sâu với thinking model
Khi gặp test flaky hoặc bug tinh vi cần reasoning kỹ qua nhiều file.
$ ccsx codex "$ck:debug investigate flaky webhook test" $ ccs "/ck:scout cross-reference call sites" $ ccs glm "/ck:fix apply patch + rerun tests" Routing đa runtime
Khi bạn muốn kết hợp Claude Code, Codex và Droid trong cùng một task.
$ ccs "/ck:plan refactor auth module" $ ccsx codex "$ck:cook scaffold module" $ ccsd glm "/ck:test run integration suite" $ ccs "/ck:code-review final pass" Kết hợp provider theo từng bước: dùng model reasoning mạnh (Claude / Codex) cho plan & review, dùng coder rẻ (GLM / Qwen) cho phần implement & test khối lượng lớn. Chuyển runtime (ccsd, ccsx) khi cần agent khác.