CLI Flags Reference
Complete reference for all CLI flags available in CCS. Flags can be combined with profile names and commands.Overview
CCS CLI flags provide runtime configuration for authentication, proxy behavior, and provider-specific features. Flags override config file settings and follow this priority: CLI Flags > Environment Variables > config.yaml > DefaultsAccount Management Flags
Manage multiple OAuth accounts for CLIProxy providers (gemini, codex, agy, qwen, iflow, kiro, ghcp).--use <account>
Scope: All OAuth providers
Purpose: Switch active account for profile execution
Priority: HIGH
- Temporarily uses specified account instead of default
- Does NOT change default account in config
- Account must exist (use
--accountsto list) - Nickname or email accepted
--accounts, --nickname, ccs auth default
--accounts
Scope: All OAuth providers
Purpose: List all registered accounts with metadata
Priority: HIGH
- Email addresses
- Nicknames (if set)
- Last used timestamp
- Default account indicator
--use, ccs auth list
--nickname <name>
Scope: All OAuth providers
Purpose: Rename account with human-friendly alias
Priority: MEDIUM
- Sets nickname for current/specified account
- Nickname stored in
config.yamlundercliproxy.oauth_accounts - Can use nickname in
--useflag after setting - Must be unique across accounts
--use, --accounts
--auth
Scope: All OAuth providers
Purpose: Manually trigger OAuth flow
Priority: MEDIUM
- Opens browser for OAuth flow
- Refreshes expired tokens
- Updates credentials in CLIProxy session storage
- Shows success/error message
- Token expired or revoked
- Session became invalid
- Testing authentication
--logout, --add
--logout
Scope: All OAuth providers
Purpose: Remove account credentials and session
Priority: MEDIUM
- Removes OAuth tokens from session storage
- Does NOT remove account from
config.yaml - Requires re-authentication on next use
- Safe to run multiple times
--auth, ccs auth remove
--add (with —auth)
Scope: All OAuth providers
Purpose: Add new account while keeping existing
Priority: MEDIUM
- Opens browser for new OAuth flow
- Adds account to
config.yaml - Does NOT replace existing accounts
- Can set nickname immediately
--auth, --nickname, ccs auth create
Remote Proxy Flags
Configure connection to remote CLIProxyAPI server instead of local binary.--proxy-host
Scope: CLIProxy profiles and variants
Purpose: Remote proxy hostname or IP
Priority: HIGH
- Overrides
config.cliproxy_server.remote.host - Requires valid hostname/IP (no protocol prefix)
- Auto-detects protocol if port 443 (HTTPS) or 80 (HTTP)
- Falls back to local if unreachable (unless
--remote-only)
--proxy-port, --proxy-protocol, CCS_PROXY_HOST
--proxy-port
Scope: CLIProxy profiles and variants
Purpose: Remote proxy port number
Priority: HIGH
- Overrides
config.cliproxy_server.remote.port - Defaults: 443 (HTTPS), 80 (HTTP) if not specified
- Must be valid port (1-65535)
--proxy-host, CCS_PROXY_PORT
--proxy-auth-token
Scope: CLIProxy profiles and variants
Purpose: Authentication token for remote proxy
Priority: HIGH
- Overrides
config.cliproxy_server.remote.auth_token - Sent in
Authorizationheader - Required if remote proxy has auth enabled
- Can be API key or JWT
--proxy-host, CCS_PROXY_AUTH_TOKEN
--proxy-protocol
Scope: CLIProxy profiles and variants
Purpose: Remote proxy protocol (http/https)
Priority: MEDIUM
- Overrides
config.cliproxy_server.remote.protocol - Values:
http,https - Default:
http(unless port 443) - When set to
https: Automatically starts HTTP→HTTPS tunnel (see Remote Proxy HTTPS Tunnel)
--proxy-host, CCS_PROXY_PROTOCOL, --allow-self-signed
--proxy-timeout
Scope: CLIProxy profiles and variants
Purpose: Health check timeout in milliseconds
Priority: LOW
- Overrides
config.cliproxy_server.remote.timeout - Default: 2000ms (2 seconds)
- Used for initial health check only
- Higher values for slow networks
--proxy-host, CCS_PROXY_TIMEOUT
--local-proxy
Scope: CLIProxy profiles and variants
Purpose: Force local CLIProxy mode
Priority: MEDIUM
- Disables remote proxy even if configured
- Spawns local CLIProxyAPI binary
- Useful for testing or offline work
- Ignores
config.cliproxy_server.remotesettings
--remote-only, --proxy-host
--remote-only
Scope: CLIProxy profiles and variants
Purpose: Fail if remote proxy unreachable
Priority: MEDIUM
- Disables fallback to local proxy
- Exit with
PROXY_ERRORif remote unreachable - Useful for enforcing remote proxy usage
- Overrides
config.cliproxy_server.fallback.enabled
--local-proxy, --proxy-host
--allow-self-signed
Scope: CLIProxy profiles and variants
Purpose: Accept self-signed SSL certificates
Priority: LOW
- Disables SSL certificate validation
- Required for dev/test environments with self-signed certs
- Security Risk: Only use in trusted environments
--proxy-protocol, CCS_ALLOW_SELF_SIGNED
--target <cli>
Scope: All supported profiles except cliproxy, copilot, and account
Purpose: Route profile to alternative CLI target
Priority: HIGH
claude(default): Launch via Claude Code CLIdroid: Launch via Droid CLI (@factory/cli)- Overrides per-profile
targetconfig and argv0 detection - Binary located via
CCS_DROID_PATHor PATH lookup - Legacy
glmtcompatibility profiles follow the normal settings-profile target flow after runtime normalization
CCS_DROID_PATH, CCS_DROID_ALIASES, Droid Adapter
--permission-mode <mode> (persist)
Scope: All profiles
Purpose: Set Claude permission mode (persisted to session)
Priority: HIGH
default, plan, acceptEdits, bypassPermissions
Related: --dangerously-skip-permissions, --auto-approve
--dangerously-skip-permissions / --auto-approve
Scope: All profiles
Purpose: Equivalent to --permission-mode bypassPermissions
Priority: HIGH
--kimi
Scope: /ccs delegation command
Purpose: Force Kimi OAuth (CLIProxy) for long context
Priority: MEDIUM
--km
Scope: /ccs delegation command
Purpose: Force Kimi API key (direct) for long context
Priority: MEDIUM
ccs km) when long context is needed.
--thinking <value>
Scope: All profiles
Purpose: Enable extended thinking mode
Priority: HIGH (overrides CCS_THINKING env and config)
- Enables extended thinking for compatible models (Claude Sonnet 4.5+, Gemini 2.0+)
- Accepts token budget number (e.g., 5000, 20000) or level name (minimal, low, medium, high, xhigh, auto)
- Off values:
off,none,disabled,0— all equivalent, disable thinking - Overrides
CCS_THINKINGenv var andthinkingconfig section - Ignored by models without thinking support
CCS_THINKING env var, ccs config thinking, Extended Thinking
--1m / --no-1m
Scope: All profiles
Purpose: Enable/disable 1M token extended context window
Priority: MEDIUM
--1m: Enables 1M token context window via [1m] model suffix--no-1m: Disables 1M token context window (removes [1m] suffix)- Auto-enabled: Native Gemini models (e.g., gemini-3-pro) have 1M enabled by default
- Opt-in: Claude models require explicit
--1mflag to use extended context - Overrides: CLI flag takes priority over provider config settings
- Warning: Shows warning if model doesn’t support extended context
- Claude Opus 4.6 (auto-detect from model catalog)
- Claude Sonnet 4.5 (with —1m flag)
- Gemini 3 Pro (auto-enabled)
- Gemini 2.0 (auto-enabled)
- Extended context uses model suffix format:
claude-opus-4-6[1m] - Requires compatible Claude Code version supporting [1m] suffix
- Token budget remains 1M even if context window is smaller
--headless
Scope: OAuth providers (gemini, codex, agy, kiro, etc.)
Purpose: OAuth without browser, display URL for manual authentication
Priority: LOW
- Skips automatic browser launch during OAuth
- Displays OAuth URL in terminal for manual copying
- Useful for SSH sessions without browser access
- User opens URL in external browser, completes auth
- CCS waits for callback on local server
- Remote SSH sessions
- CI/CD environments without browser
- Headless servers
--auth, --incognito
--incognito
Scope: Kiro provider
Purpose: Force incognito browser mode for OAuth
Priority: LOW
- Opens browser in incognito/private mode
- Prevents cookie/session persistence
- Opposite of
--no-incognitoflag - Useful for testing or multi-account isolation
--no-incognito, --auth
Provider-Specific Flags
Flags available only for specific providers.--backend <type> (CLIProxy only)
Scope: CLIProxy providers (gemini, codex, agy, qwen, iflow, kiro, ghcp)
Purpose: Override CLIProxy backend selection
Priority: HIGH
- Overrides
config.cliproxy.backendsetting - Values:
original|plus - Plus required for kiro/ghcp providers
- Backend-specific binaries auto-downloaded if needed
- Test different backends without changing config
- Force specific backend for troubleshooting
- Ensure kiro/ghcp compatibility
config.cliproxy.backend, provider compatibility
--import (Kiro only)
Scope: Kiro provider
Purpose: Import OAuth token from Kiro IDE
Priority: HIGH
- Reads token from Kiro IDE config location
- Bypasses browser OAuth flow
- Faster authentication if IDE already logged in
- Falls back to browser if import fails
- Kiro IDE installed and authenticated
- Token file accessible
--auth, Kiro provider docs
--config (Supported providers)
Scope: Catalog-backed CLIProxy providers (agy, claude, codex, gemini, kimi)
Purpose: Launch interactive model configuration UI
Priority: MEDIUM
- Opens terminal UI for model selection
- Shows available models with metadata
- Updates
config.yamlwith selected model - Validates model availability
--no-incognito (Kiro only)
Scope: Kiro provider
Purpose: Use normal browser mode instead of incognito
Priority: MEDIUM
- Opens browser in normal mode (saves cookies/session)
- Useful for persistent AWS SSO login
- Overrides
config.cliproxy.kiro_no_incognito - Browser profile persists between sessions
config.cliproxy.kiro_no_incognito
CLIProxy Diagnostic Flags
Flags for debugging CLIProxy behavior and quota fetching.--verbose, -v
Scope: CLIProxy commands (ccs cliproxy, provider commands)
Purpose: Enable detailed diagnostics
Priority: LOW
- Token refresh attempts with timestamps
- Project ID resolution details
- Model quota API calls and responses
- Error details with HTTP status codes
- Debugging quota fetch failures
- Investigating token refresh issues
- Troubleshooting “N/A (fetch unavailable)” quota display
ccs cliproxy status, ccs cliproxy quota, GLMT Deprecation
Persist Command Flags
Flags for theccs persist command that manages settings.json persistence.
--yes, -y
Scope: persist command
Purpose: Skip confirmation prompts, auto-backup before modification
Priority: MEDIUM
- Skips interactive confirmation
- Automatically creates backup before changes
- Useful for automation and scripts
ccs persist, --list-backups, --restore
--list-backups
Scope: persist command
Purpose: List all available settings.json backup files
Priority: LOW
--restore, ccs persist
--restore [timestamp]
Scope: persist command
Purpose: Restore settings.json from backup
Priority: MEDIUM
- Validates JSON integrity before restore
- Rejects symlinked backup files (security)
- Creates backup of current settings before restore
- Confirms restore success with timestamp
- Recovering from incorrect persist operation
- Reverting to known-good configuration
- Testing configuration changes safely
--list-backups, ccs persist
Flag Combinations
Common flag combinations for typical workflows.Multi-Account Workflow
Remote Proxy Setup
Provider-Specific Workflows
Diagnostic & Persist Workflows
Environment Variable Equivalents
Many flags have environment variable equivalents for persistent configuration.| Flag | Environment Variable | Config Key |
|---|---|---|
--proxy-host | CCS_PROXY_HOST | cliproxy_server.remote.host |
--proxy-port | CCS_PROXY_PORT | cliproxy_server.remote.port |
--proxy-auth-token | CCS_PROXY_AUTH_TOKEN | cliproxy_server.remote.auth_token |
--proxy-protocol | CCS_PROXY_PROTOCOL | cliproxy_server.remote.protocol |
--proxy-timeout | CCS_PROXY_TIMEOUT | cliproxy_server.remote.timeout |
--allow-self-signed | CCS_ALLOW_SELF_SIGNED | N/A |
--no-incognito | N/A | cliproxy.kiro_no_incognito |
--target droid | CCS_DROID_ALIASES (argv0) / CCS_DROID_PATH | profiles.<name>.target |
--thinking | CCS_THINKING | thinking.override |
Droid/Target Environment Variables
| Variable | Description |
|---|---|
CCS_DROID_ALIASES | Comma-separated argv0 binary names that map to droid target |
CCS_DROID_PATH | Explicit absolute path to the droid binary |
Thinking Environment Variable
| Variable | Accepted Values |
|---|---|
CCS_THINKING | minimal, low, medium, high, xhigh, auto, off, none, disabled, 0, or integer 0–100000 |
Troubleshooting
Account Flags
“Account not found” error:- Run
ccs <profile> --accountsto list available accounts - Check spelling of email/nickname
- Verify account was created with
--auth --add
- Nicknames must be unique across all accounts
- Remove old nickname before setting new one
- Edit
config.yamlmanually if needed
Remote Proxy Flags
Connection timeout:- Increase
--proxy-timeoutvalue - Check network connectivity to host
- Verify host/port are correct
- Try
--local-proxyto test locally
- Use
--allow-self-signedfor dev/test environments - Verify certificate is valid in production
- Check
--proxy-protocolishttps
- Verify
--proxy-auth-tokenis correct - Check token hasn’t expired
- Test token with
curlor similar tool
