CLI Commands
Complete reference for all CCS commands and options.Basic Usage
profile- Optional profile name (default: “default”)args- Passed directly to Claude CLI
Profile Commands
Switch Profiles
ccs glmt is deprecated and kept only for compatibility with existing legacy
scripts or configs. Use ccs glm for Z.AI API profiles and ccs km for
reasoning-first Kimi API profiles.With Arguments
Account Management
Create Account Profile
settings.json with ~/.claude/settings.json; history sharing is
separate and only happens when accounts use shared mode and the same context
group.
Bare Profiles
--bare flag creates a clean profile without shared symlinks (commands, skills, agents, settings.json). Bare profiles are useful for sandboxed or testing environments where you want a minimal Claude instance with no inherited configuration.
Bare vs non-bare behavior:
| Aspect | Non-bare (default) | Bare (--bare) |
|---|---|---|
| Shared commands/skills/agents | Symlinked from ~/.ccs/shared/ | Not linked |
| MCP server sync | Synced from global ~/.claude.json | Skipped |
ccs sync | Updates MCP servers | Skipped |
| OAuth credentials | Isolated per instance | Isolated per instance |
--bare, the flag persists across profile updates and ccs sync runs.
List Profiles
Show Profile
settings.json sync state,
local history summary, and whether plain ccs currently resumes from the same
lane.
Set Default
ccs launches. Back up the current native
lane first if you might need old ~/.claude/projects history:
ccs runs with that account profile.
It does not import old native history into the selected profile.
Reset Default
Remove Profile
Shared Resources
~/.claude/, or keeps them profile-local.
--mode sharedlinks shared resources into the profile instance (default for most profiles).--mode profile-local(equivalent toccs auth create --bare) isolates the profile from~/.claude/so the instance carries its own resource set.- Without
--mode, prints the current mode and effective behavior. --jsonemits machine-readable output for scripts.
API Profile Management
Manage custom API key-based profiles:Basic Operations
Profile Lifecycle (Discover, Copy, Export, Import)
Available since v7.52.0
Using API Profiles
OAuth Provider Commands
Built-in CLIProxy provider shortcuts now include:agy · claude · codex · gemini · iflow · kimi · kiro · cursor · gitlab · codebuddy · kilo · qoder
Deprecated compatibility shortcut: ghcp
Qwen account linking is currently unavailable in the bundled CLIProxy runtime.
Use an API-key Qwen profile such as Alibaba Coding Plan instead.
Basic Usage
Authentication
Multi-Account
Model Configuration
GitLab Duo Auth Variants
Multi-Account Management
Logout
Headless Mode
Kiro-Specific Options
Codex Reasoning Effort
gpt-5.4-mini caps at high. gpt-5.2, gpt-5.3-codex, gpt-5.3-codex-spark, gpt-5.4, and gpt-5.5 support xhigh.
For Codex GPT models that expose the fast service tier, append -fast to the
model ID. Combine it with effort suffixes when you want both controls:
gpt-5.4, with
reasoning.effort and service_tier: "priority" instead of forwarding the
suffixed string as a raw upstream model name.
Cursor Provider And Legacy Bridge
The currentccs cursor shortcut is a CLIProxy provider. The older local
Cursor daemon workflow still exists only under ccs legacy cursor.
ccs cursor auth/status/start/... subcommands are still shimmed for a
migration window, but they forward to the legacy bridge with a deprecation
warning.
Droid Multi-Target Adapter
Route profiles to alternative CLI targets:ccsd:
Codex Runtime Target
Available since v7.62.0
-c overrides and CCS_CODEX_API_KEY env var. ccsxp also repairs the native Codex [model_providers.cliproxy] entry when needed and injects the managed token into that provider’s env_key; no API key is written to disk.
See Codex Adapter for full documentation.
CLIProxy Management
Manage the CLIProxyAPI binary:Lifecycle Commands
Variant Management
ccs config->CLIProxy- Create or edit a Codex variant
- Pick
gpt-5.4-fast,gpt-5.4-high-fast, orgpt-5.4-xhigh-fastin the model selector
Quota Management
Manage account quota and rotation:ccs cliproxy quota displays quota sections for supported providers such as
agy, codex, gemini, and claude. ghcp may appear for existing
deprecated Copilot compatibility setups.
When automatic quota management is enabled, CCS checks the full active account
pool before local CLIProxy startup. Known-exhausted accounts are temporarily
paused out of rotation when another healthy account exists, then automatically
resume after the cooldown window.
Routing Strategy
Inspect and change the proxy-wide routing strategy explicitly:round-robin- spread requests across matching healthy accountsfill-first- drain one healthy account before moving to backups
round-robin as the default until you explicitly change it.
Pool Routing
Turn several Claude accounts into a pool that auto-continues when one account hits its limit. See Account Pools for the full guide.Use
ccs cliproxy pool --disable to leave a pool. Do not hand-edit routing
back to plain round-robin with no affinity on a multi-account fleet; that state
re-processes your whole conversation on most turns. See
Leaving a pool.Account Drain Order
Control the order accounts are drained in within a provider:Tier-based ordering (
--by-tier) is available for agy and gemini. Claude
accounts have unknown tier; use --set for a manual order.Model Catalog Sync
Available since v7.61.1
agy, gemini, codex, claude, iflow,
kiro, ghcp, kimi
Cache Details:
- Location:
~/.ccs/model-catalog-cache.json - TTL: 24 hours
- Merge strategy: Remote overrides static fields, static-only fields preserved
| Path | Description |
|---|---|
~/.ccs/cliproxy/bin/cli-proxy-api | Binary location |
~/.ccs/cliproxy/config.yaml | Configuration |
~/.ccs/cliproxy/auth/ | OAuth tokens |
~/.ccs/cliproxy/sessions.json | Session tracking |
~/.ccs/cliproxy/accounts.json | Account registry |
Remote Proxy Configuration
Connect to a remote CLIProxy server:Local OpenAI-Compatible Proxy
Manage the local Anthropic-compatible proxy for API profiles that point at OpenAI-compatible chat-completions endpoints:--portpins a one-off launchproxy.profile_ports.<profile>pins a saved profile portproxy.portguides the shared preferred starting port- otherwise CCS chooses an adaptive per-profile fallback
Docker Deployment
Deploy CCS and CLIProxy as a Docker stack for team or server use.The
ccs docker commands require Docker and Docker Compose on the target
host. Remote deployment uses the SSH target alias from ~/.ssh/config.Docker upgrades that replace the historical
ccs-internal-managed API key
keep that legacy key valid beside the new per-install key for a temporary
grace window. The ccs docker up banner masks the new key; update clients
with ccs docker show-key --full, then run ccs docker finalize-key-rotation
when the old key is no longer needed.
For already-broken upgrades, opt in explicitly with
CCS_DOCKER_RESTORE_LEGACY_API_KEY=1.Migration Commands
Migrate to unified configuration format:Migrations run automatically on first launch after updates. Use
ccs migrate
to manually trigger or re-run migrations.Utility Commands
Version
Help
Update
Configuration Dashboard
localhost. When the effective bind is reachable beyond loopback, CCS prints network URLs plus an auth reminder.
If auth is disabled, remote users can still view read-only dashboard surfaces,
but sensitive write routes stay localhost-only.
Dashboard Authentication CLI
Configure optional login protection for the dashboard:- Username (alphanumeric + underscore, 3-50 chars)
- Password (min 8 chars, prompted twice)
- Writes bcrypt hash to config.yaml
Environment variables
CCS_DASHBOARD_AUTH_ENABLED, CCS_DASHBOARD_USERNAME,
and CCS_DASHBOARD_PASSWORD_HASH override config.yaml values. A warning is
shown during setup if ENV vars are detected.Claude IDE Extension Setup
Generate setup for the Anthropic Claude extension in VS Code-compatible hosts:vscode,cursor→claudeCode.environmentVariablesplusclaudeCode.disableLoginPromptwindsurf→claude-code.environmentVariables
ccs config→Claude Extension- Copy the shared
~/.claude/settings.jsonpayload or an IDE-local JSON snippet
Thinking Configuration
Configure extended thinking/reasoning budget settings:Droid Runtime Target
Configure the default CLI target for Droid profiles:| Target | Description |
|---|---|
claude | Default — use Claude Code CLI |
droid | Use Factory Droid CLI (@factory/cli) |
The
--target flag overrides the profile’s configured target and ccsd
argv0 detection. See Droid Adapter for setup.Official Channels Configuration
Configure Anthropic’s official Claude channels auto-enable for compatible Claude sessions:- Stores selected channels in
~/.ccs/config.yamlunderchannels - Stores
TELEGRAM_BOT_TOKENin~/.claude/channels/telegram/.env - Stores
DISCORD_BOT_TOKENin~/.claude/channels/discord/.env - Auto-adds
--channelswith any selected ready official plugins at runtime - Supported official channels: Telegram, Discord, and iMessage
- Applies only to native Claude
defaultandaccountsessions - Never auto-enables for API-key profiles, CLIProxy, Copilot, or Droid targets
--unattendedmaps to runtime--dangerously-skip-permissionsonly when auto-enable is active- Explicit user
--channelsor permission flags win over CCS defaults - iMessage is macOS-only and does not use a bot token
Image Analysis Configuration
Configure automatic image and PDF analysis for third-party launches:- CCS uses a managed
ImageAnalysisMCP tool when the runtime is healthy - Healthy launches suppress the legacy CCS image
Readhook - CCS can fall back to compatibility hook behavior, then native
Read, if the managed runtime is not usable - Supported formats: JPEG, PNG, GIF, WebP, HEIC, BMP, TIFF, PDF
- Screenshots and architecture diagrams
- PDF documents and forms
- Technical images and diagrams
- Any visual content Claude needs to analyze
Browser Automation
Configure Claude Browser Attach and Codex Browser Tools:- New installs keep both lanes disabled and manual
ccs browser setupis the primary remediation flowccs browser doctoris read-only--browseropts in for one launch when the lane is enabled--no-browsersuppresses tooling for one launch
Health Check
Sync Shared Data
~/.claude.json to all non-bare profile instances.
MCP Server Sync
Duringccs sync (and on every profile launch), CCS copies the mcpServers key from global ~/.claude.json into each instance’s .claude.json.
Merge behavior:
- Global MCP servers are used as the base
- Instance-specific MCP server overrides are preserved (instance wins on conflict)
- Only the
mcpServerskey is copied — OAuth sessions, caches, and other keys are not touched
- Bare profiles (
--bare) are skipped entirely - Instances without a directory are skipped
Cleanup
Persist Command
Write the resolved Claude setup to~/.claude/settings.json for native Claude Code usage (IDE extensions, web-based Claude Code).
- API profiles (glm, km, custom API profiles)
- CLIProxy profiles (gemini, codex, agy, kiro, kimi, qoder, ghcp)
- Copilot profiles (requires copilot-api daemon running)
- Account profiles created with
ccs auth create defaultprofile
Backup Management
Before modifying settings.json, CCS creates timestamped backups:- Location:
~/.claude/settings.json.backup.YYYYMMDD_HHMMSS - Maximum: 10 backups (oldest auto-deleted)
- Permissions: 0o600 (owner read/write only)
Security Features
- Symlink Rejection: Rejects symlinked settings.json or backup files (prevents malicious writes)
- JSON Validation: Validates JSON integrity before restore
- Masked Output: API keys and tokens are masked in console output
- Backup Prompt: Default “yes” to backup before modification
Example Workflow
Environment Export
Export environment variables for third-party tool integration (OpenCode, Cursor, Continue, etc.).| Format | Variables | Use Case |
|---|---|---|
openai | OPENAI_API_KEY, OPENAI_BASE_URL, LOCAL_ENDPOINT, OPENAI_MODEL | OpenCode, Cursor, Continue |
anthropic | ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN, ANTHROPIC_MODEL | Claude-compatible tools |
claude-extension | Host-specific settings.json snippet | Anthropic Claude extension in VS Code, Cursor, Windsurf |
raw | All effective env vars | Debugging, custom scripts, inspecting CLAUDE_CONFIG_DIR |
| Shell | Flag | Auto-detected |
|---|---|---|
| Bash/Zsh | bash or zsh | From $SHELL (default) |
| Fish | fish | From $SHELL containing fish |
| PowerShell | powershell | From $SHELL containing pwsh or Windows |
| Profile Type | Example | Supported |
|---|---|---|
| CLIProxy (OAuth) | gemini, codex, agy, kiro, kimi, qoder, ghcp | Yes |
| Settings (API) | glm, km, custom | Yes |
| Copilot | copilot | Yes |
| Account/default | work, personal, default | Yes (claude-extension; raw for CLAUDE_CONFIG_DIR) |
The
--format flag defaults to anthropic. The --shell flag defaults to
auto (detects from $SHELL environment variable). The zsh shell option
maps to bash syntax since they are compatible.--ide <host> applies to --format claude-extension and accepts vscode, cursor, or windsurf.default profiles, --format claude-extension is the primary path. --format raw can expose CLAUDE_CONFIG_DIR, while openai and anthropic only produce transport vars for settings, CLIProxy, and Copilot profiles.
Shell Completion
Token Management
Headless Delegation
Execute prompts without interactive session:Headless mode is useful for CI/CD pipelines, automation scripts, and remote
execution scenarios where interactive sessions aren’t available.
Copilot Commands (Deprecated)
Copilot-specific subcommands remain available for existing deprecated GitHub Copilot compatibility setups:Copilot Usage Quota
Environment Variables
Core Configuration
| Variable | Description |
|---|---|
CCS_CONFIG | Override config file path |
CCS_CLAUDE_PATH | Override Claude CLI location |
NO_COLOR | Disable colored output |
CCS_DEBUG | Enable verbose debug logging |
CCS_DEBUG_LOG | Enable debug logging (legacy) |
ANTHROPIC_AUTH_TOKEN | API key for settings-based profiles |
ANTHROPIC_BASE_URL | API base URL override |
ANTHROPIC_MODEL | Model name override |
CLAUDE_CONFIG_DIR | Claude config directory (used for instance isolation) |
Remote Proxy Configuration
| Variable | Description |
|---|---|
CCS_PROXY_HOST | Remote proxy hostname |
CCS_PROXY_PORT | Remote proxy port number |
CCS_PROXY_AUTH_TOKEN | Remote proxy authentication token |
CCS_PROXY_PROTOCOL | Proxy protocol (http/https) |
CCS_PROXY_TIMEOUT | Remote proxy health check timeout (ms) |
CCS_PROXY_FALLBACK_ENABLED | Enable fallback to local proxy if remote fails |
CCS_ALLOW_SELF_SIGNED | Accept self-signed SSL certificates |
Thinking
| Variable | Description |
|---|---|
CCS_THINKING | Per-session thinking override. Accepts: minimal, low, medium, high, xhigh, auto, off, none, disabled, 0, or integer budget (0-100000) |
Droid / Multi-Target
| Variable | Description |
|---|---|
CCS_DROID_ALIASES | Comma-separated binary names mapping to droid target |
CCS_DROID_PATH | Explicit path to droid binary |
CCS_TARGET_ALIASES | Unified alias map (e.g., codex=mycodex) |
CCS_CODEX_ALIASES | Legacy comma-separated binary names for codex target |
Advanced Options
| Variable | Description |
|---|---|
CCS_UNIFIED_CONFIG | Enable unified config mode (config.yaml) |
CCS_MIGRATE | Trigger automatic migration on startup |
CCS_SKIP_MIGRATION | Skip automatic migration |
CCS_SKIP_PREFLIGHT | Skip API key validation checks |
CCS_WEBSEARCH_SKIP | Skip WebSearch hook integration |
CCS_PROFILE_TYPE | Signal profile type to WebSearch hook |
Configuration Paths
| Path | Description |
|---|---|
~/.ccs/config.yaml | Main configuration file |
~/.ccs/instances/ | Isolated Claude instances |
~/.ccs/*.settings.json | API profile settings |
~/.ccs/shared/ | Shared commands, skills, agents |
Shared Data Structure
On Windows, copies are used instead of symlinks if symlinks are unavailable.
Exit Codes
CCS uses standardized exit codes following Unix conventions:| Code | Meaning | Description |
|---|---|---|
| 0 | SUCCESS | Successful execution |
| 1 | GENERAL_ERROR | General/unspecified error |
| 2 | CONFIG_ERROR | Configuration file errors (missing, invalid, corrupt) |
| 3 | NETWORK_ERROR | Network-related errors (connection, timeout, DNS) |
| 4 | AUTH_ERROR | Authentication/authorization errors (invalid token, expired, forbidden) |
| 5 | BINARY_ERROR | Binary/executable errors (missing Claude CLI, corrupted binary) |
| 6 | PROVIDER_ERROR | Provider-specific errors (API errors, rate limits, service unavailable) |
| 7 | PROFILE_ERROR | Profile not found or invalid |
| 8 | PROXY_ERROR | Proxy-related errors (startup failure, port conflict) |
| 9 | MIGRATION_ERROR | Migration errors (failed to migrate config) |
| 130 | USER_ABORT | User aborted operation (Ctrl+C, SIGINT) |
