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.

claude icon Claude Pro openai icon ChatGPT Plus / Codex zai icon Z.AI / GLM kimi icon Kimi minimax icon MiniMax qwen icon Alibaba Coding Plan
Không Có CCS
Rate limit ngắt mạch

Chạm giới hạn giữa session — context, tiến độ, mọi thứ đều đóng băng.

Đổi provider = viết lại config

Tạo settings JSON mới, sửa cliproxy config.yaml, restart Claude Code — mỗi lần đều như vậy.

Mỗi provider tự setup riêng

Auth token riêng, section riêng trong config.yaml, CLAUDE_CONFIG_DIR riêng để cách ly tài khoản.

Với CCS
Một profile có tên cho mỗi stack

Đổi provider bằng ccs <profile> — không env vars, không sửa config.

Resume xuyên provider

Chạm rate limit? Tiếp tục cùng task ở provider khác bằng --resume.

Auth + config tự quản lý

OAuth token, cách ly tài khoản, runtime adapter — tất cả CCS lo.

Cài đặt với 2 lệnh: v8.2.0
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ế

CLI-First

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.

Độc Quyền

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.

1

Cheatsheet CLI

@kaitranntt/ccs@8.2.0

Tham khảo đầy đủ mọi public root command và subcommand. Phân loại theo mục đích.

Đã sync 2026-06-08

01

Cơ Bản

7 lệnh

Route Claude Code qua một provider profile.

  • ccs Profile mặc định (Claude Pro/Max)
  • ccs <profile> Chạy với profile bất kỳ
  • ccs glm Z.AI / GLM (coder rẻ)
  • ccs kimi Moonshot Kimi (long context)
  • ccs codex OpenAI Codex (Plus/Pro)
  • ccs <profile> "<prompt>" One-shot prompt (không vào REPL)
  • ccs setup Wizard cấu hình lần đầu
02

Quản Lý Profile

15 lệnh

Tạ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 list Liệ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-default Reset tài khoản mặc định của profile
  • ccs auth backup Backup các auth profile hiện tại
  • ccs auth resources Xem 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 list Liệt kê các API profile đã cấu hình
  • ccs api discover Tự độ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
03

Cấu Hình

5 lệnh

Mở dashboard và cấu hình các setting toàn cục.

  • ccs config Mở dashboard trong browser
  • ccs config auth Cấu hình HTTP Basic Auth cho dashboard
  • ccs config channels Cấu hình official channels (Telegram / Discord / iMessage)
  • ccs config thinking Cấu hình reasoning effort
  • ccs config image-analysis Cấu hình image analysis qua MCP
04

CLIProxy

16 lệnh

Quản lý CLIProxy variant, routing, quota và lifecycle local.

  • ccs cliproxy create Tạo một CLIProxy variant mới
  • ccs cliproxy edit Chỉnh sửa config của CLIProxy variant
  • ccs cliproxy list Liệt kê các CLIProxy variant
  • ccs cliproxy default <variant> Đặt CLIProxy variant mặc định
  • ccs cliproxy routing Xem hoặc sửa rule routing model
  • ccs cliproxy catalog Hiển thị catalog model của CLIProxy
  • ccs cliproxy sync Sync config CLIProxy xuống disk
  • ccs cliproxy quota Xem quota usage của provider
  • ccs cliproxy start Khởi động instance CLIProxy
  • ccs cliproxy restart Restart instance CLIProxy
  • ccs cliproxy stop Dừng instance CLIProxy
  • ccs cliproxy status Hiển thị trạng thái CLIProxy
  • ccs cliproxy doctor Chẩn đoán health của CLIProxy
  • ccs cliproxy pause Tạm dừng CLIProxy không cần stop
  • ccs cliproxy resume Tiếp tục CLIProxy đang pause
  • ccs cliproxy remove Xóa một CLIProxy variant
05

Vận Hành

14 lệnh

Health check, lifecycle, token và các lệnh meta.

  • ccs doctor Health check (auth + token + path)
  • ccs persist Lock profile hiện tại vào ~/.claude
  • ccs migrate Migrate từ config phiên bản cũ
  • ccs cleanup Xóa profile không dùng + cache
  • ccs update Update CCS lên bản mới nhất
  • ccs sync Sync delegation commands và skills
  • ccs env <profile> Export env của profile cho third-party tool
  • ccs tokens Quản lý auth token của CLIProxy
  • ccs proxy start Khởi động local proxy tương thích OpenAI
  • ccs proxy stop Dừng daemon local proxy
  • ccs proxy status Hiển thị trạng thái local proxy
  • ccs proxy activate Kích hoạt proxy cho shell hiện tại
  • ccs help <topic> Xem help cho một topic (profiles, providers, targets…)
  • ccs --version Hiển thị version CCS đã cài
06

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 browser Claude Browser Attach + Codex Browser Tools
  • ccs cursor Tích hợp Cursor IDE
  • ccs copilot Bridge GitHub Copilot (deprecated)
  • ccs help completion Cài đặt & test shell completion
07

Docker

8 lệnh

Chạy CCS trong container sandbox.

  • ccs docker up Khởi động container CCS
  • ccs docker down Tắt container CCS
  • ccs docker status Xem trạng thái container
  • ccs docker logs Tail log container
  • ccs docker update Update image của Docker stack
  • ccs docker config Xem hoặc sửa config Docker stack
  • ccs docker show-key Hiển thị Docker API key hiện tại (8.1.0+)
  • ccs docker finalize-key-rotation Hoà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.

2

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.

Anthropic
OpenAI
Google
Cloud AI
IDE & DevTools
Self-Hosted
Which provider do you use? 2 modes Anthropic Plus / Pro OpenAI ⚠ Ban Risk Google 8 providers Cloud AI 7 providers IDE & DevTools 3 providers Self-Hosted Native OAuth Claude Multi-account Claude Pool GPT-5.4 Codex Multi-model ⚠ Antigravity OAuth ⚠ Gemini AWS Pro Kiro Moonshot OAuth Kimi API Key Kimi Direct ~79% cheaper Z.AI / GLM Alibaba OAuth Qwen M2.1 API MiniMax API Key Alibaba Coding DeepSeek + more Novita AI Device Code GitHub Copilot Plus Cursor Plus GitLab Duo Plus CodeBuddy Plus Kilo Free tier iFlow Plus Qoder localhost:11434 Ollama API Key Ollama Cloud localhost:8080 llama.cpp

Click một node provider để xem cấu hình. Cuộn để zoom, kéo để pan.

Web Dashboard

Mới

CCS đ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

1
Mở app cục bộ
ccs config

Bắt đầu bằng dashboard thay vì tự sửa YAML.

2
Chọn API profile lane
/providers

Dùng Profiles cho OpenRouter, Alibaba Coding Plan, local models và custom OpenAI-compatible endpoints.

3
Kết nối OAuth providers
/cliproxy

Dùng CLIProxy cho Gemini, Codex, Antigravity, Qwen, Claude, Kimi và các provider dùng OAuth.

4
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

CCS Dashboard - Light Mode
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).

3

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.

1
# Plan với Claude mặc định (reasoning tốt nhất)
$ ccs "/ck:plan add payment integration"
2
# Implement với GLM hoặc Qwen (rẻ, nhanh)
$ ccs glm "/ck:cook implement Stripe payment flow"
3
# Chạy test với GLM hoặc Qwen (vẫn rẻ)
$ ccs glm "/ck:test run payment tests"
4
# Review cuối với Claude (bắt được lỗi tinh vi)
$ 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.

1
# Điều tra root cause với Codex (deep thinker)
$ ccsx codex "$ck:debug investigate flaky webhook test"
2
# Cross-reference các call site với Claude mặc định
$ ccs "/ck:scout cross-reference call sites"
3
# Áp dụng fix với GLM hoặc Qwen (lặp lại rẻ)
$ 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.

1
# Plan trong Claude Code (runtime mặc định)
$ ccs "/ck:plan refactor auth module"
2
# Scaffold qua Codex (ccsx)
$ ccsx codex "$ck:cook scaffold module"
3
# Chạy integration test trong Droid (ccsd) với GLM
$ ccsd glm "/ck:test run integration suite"
4
# Review code cuối quay lại Claude Code
$ 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.