Skip to main content

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

Creates a new account profile and opens OAuth login. For two isolated Claude accounts, create both profiles and run the one you want explicitly:
Account credentials and tokens stay isolated per profile. Non-bare profiles share settings.json and user CLAUDE.md from ~/.claude/; history sharing is separate and only happens when accounts use shared mode and the same context group.

Bare Profiles

The --bare flag creates a clean profile without shared symlinks (commands, skills, agents, settings.json, or CLAUDE.md). 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: Once created with --bare, the flag persists across profile updates and ccs sync runs.

List Profiles

Shows all configured profiles with their status.

Show Profile

Shows credential isolation, account context mode, settings.json sync state, local history summary, and whether plain ccs currently resumes from the same lane.

Set Default

Sets the default profile for plain ccs launches. Back up the current native lane first if you might need old ~/.claude/projects history:
Changing the default aligns future plain ccs runs with that account profile. It does not import old native history into the selected profile.

Reset Default

Restores the original CCS default profile.

Remove Profile

Removes profile and deletes instance directory.

Shared Resources

Inspect or change whether a profile shares plugins, settings, CLAUDE.md, commands, skills, and agents from ~/.claude/, or keeps them profile-local.
  • --mode shared links shared resources into the profile instance (default for most profiles).
  • --mode profile-local (equivalent to ccs 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.
  • --json emits 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 · xai · gemini · qwen · iflow · kimi · kiro · cursor · gitlab · codebuddy · kilo · qoder Deprecated compatibility shortcut: ghcp grok is an alias for xai; both commands share accounts, settings, model catalog, and routing. 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:
CCS sends the canonical upstream model, for example 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 current ccs cursor shortcut is a CLIProxy provider. The older local Cursor daemon workflow still exists only under ccs legacy cursor.
Older 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:
Setup ccsd:
See Droid Adapter for full documentation.

Codex Runtime Target

Available since v7.62.0
Route profiles to the native Codex CLI:
Setup aliases:
Most Codex target credentials are delivered via transient -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

Codex variants can pin both effort and fast mode through the model value:
Dashboard parity:
  • ccs config -> CLIProxy
  • Create or edit a Codex variant
  • Pick gpt-5.4-fast, gpt-5.4-high-fast, or gpt-5.4-xhigh-fast in 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:
Available strategies:
  • round-robin - spread requests across matching healthy accounts
  • fill-first - drain one healthy account before moving to backups
CCS keeps 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
Sync remote model catalogs from CLIProxyAPI with static fallback catalogs:
Syncable Providers: agy, claude, codex, gemini, iflow, kimi, kiro, qoder, qwen, xai, plus deprecated ghcp compatibility Cache Details:
  • Location: ~/.ccs/model-catalog-cache.json
  • TTL: 24 hours
  • Merge strategy: Remote overrides static fields, static-only fields preserved
CLIProxy Paths: Default port: 8317

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:
Port behavior:
  • --port pins a one-off launch
  • proxy.profile_ports.<profile> pins a saved profile port
  • proxy.port guides the shared preferred starting port
  • otherwise CCS chooses an adaptive per-profile fallback
See OpenAI-Compatible Provider Routing.

Docker Deployment

Deploy CCS and CLIProxy as a Docker stack for team or server use.
Examples:
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

Shows CCS version and installation details:

Help

Shows comprehensive usage documentation.

Update

Configuration Dashboard

Opens the visual configuration dashboard in your browser using the effective bind/port. By default CCS binds the dashboard to 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.

CCS Bar

--port requires an available integer from 1 to 65535. The selected port persists in the launch descriptor, so later launches try it first even after ccs bar stop. When moving a live server, CCS preflights the new port and restores the prior server if the replacement fails; failed restoration preserves the previous discovery and launch state for recovery. status distinguishes a stopped server, an invalid or stale process record, a live process with a failed HTTP probe, and a reachable server. stop signals a process only when its PID and recorded start identity still match. It removes server.pid and bar.json after a confirmed stop or stale process, but keeps them on identity mismatch, permission failure, signal failure, or timeout. Legacy PID-only server.pid files cannot prove process identity. Current CCS reports them as invalid and refuses to signal or clean them up. Confirm the CCS server process in Activity Monitor, or restart macOS, before moving the stale files aside; never signal the recorded number without verifying the process. See CCS Bar for installation, lifecycle details, and troubleshooting.

Dashboard Authentication CLI

Configure optional login protection for the dashboard:
Setup Wizard Prompts:
  • 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.
If you expose the dashboard beyond localhost, protect it first with ccs config auth setup.

Claude IDE Extension Setup

Generate setup for the Anthropic Claude extension in VS Code-compatible hosts:
Host-specific output:
  • vscode, cursorclaudeCode.environmentVariables plus claudeCode.disableLoginPrompt
  • windsurfclaude-code.environmentVariables
Dashboard parity:
  • ccs configClaude Extension
  • Copy the shared ~/.claude/settings.json payload or an IDE-local JSON snippet

Thinking Configuration

Configure extended thinking/reasoning budget settings:
See Extended Thinking for full documentation.

Droid Runtime Target

Configure the default CLI target for Droid profiles:
Target values:
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:
Behavior:
  • Stores selected channels in ~/.ccs/config.yaml under channels
  • Stores TELEGRAM_BOT_TOKEN in ~/.claude/channels/telegram/.env
  • Stores DISCORD_BOT_TOKEN in ~/.claude/channels/discord/.env
  • Auto-adds --channels with any selected ready official plugins at runtime
  • Supported official channels: Telegram, Discord, and iMessage
  • Applies only to native Claude default and account sessions
  • Never auto-enables for API-key profiles, CLIProxy, Copilot, or Droid targets
  • --unattended maps to runtime --dangerously-skip-permissions only when auto-enable is active
  • Explicit user --channels or permission flags win over CCS defaults
  • iMessage is macOS-only and does not use a bot token
Manual Claude-side setup:

Image Analysis Configuration

Configure automatic image and PDF analysis for third-party launches:
Default Behavior:
  • CCS uses a managed ImageAnalysis MCP tool when the runtime is healthy
  • Healthy launches suppress the legacy CCS image Read hook
  • 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
Use Cases:
  • 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:
Behavior:
  • New installs keep both lanes disabled and manual
  • ccs browser setup is the primary remediation flow
  • ccs browser doctor is read-only
  • --browser opts in for one launch when the lane is enabled
  • --no-browser suppresses tooling for one launch
See Browser Automation.

Health Check

Checks configuration, symlinks, permissions, and provider status.

Sync Shared Data

Re-creates symlinks for shared commands, skills, and agents across profiles. Also syncs MCP servers from global ~/.claude.json to all non-bare profile instances.

MCP Server Sync

During ccs 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 mcpServers key is copied — OAuth sessions, caches, and other keys are not touched
Exclusions:
  • Bare profiles (--bare) are skipped entirely
  • Instances without a directory are skipped
MCP sync only copies server configuration. OAuth sessions and cached credentials in ~/.claude.json are never shared with instances.

Cleanup

Removes orphaned resources, old CLIProxy logs, and temporary files. Helps reclaim disk space and resolve stale session issues.

Persist Command

Write the resolved Claude setup to ~/.claude/settings.json for native Claude Code usage (IDE extensions, web-based Claude Code).
Supported Profiles:
  • API profiles (glm, km, custom API profiles)
  • CLIProxy profiles (gemini, codex, xai, agy, kiro, kimi, qoder, ghcp)
  • Copilot profiles (requires copilot-api daemon running)
  • Account profiles created with ccs auth create
  • default profile

Backup Management

Before modifying settings.json, CCS creates timestamped backups:
Backup Details:
  • 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.).
Formats: Shell Syntax: Supported Profile Types: Examples:
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.
For account and 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

Installs shell auto-completion scripts for bash/zsh/fish.

Token Management

Manage authentication tokens for OAuth providers. View, refresh, or revoke tokens across all accounts.

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:
GitHub usage-based Copilot billing begins June 1, 2026. Prefer Codex or another active provider for new work.

Copilot Usage Quota

Shows current GitHub Copilot quota consumption:

Environment Variables

Core Configuration

Remote Proxy Configuration

Thinking

Droid / Multi-Target

Advanced Options

Configuration Paths

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: