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: All profiles
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: All profiles
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: All profiles
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: All profiles
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: All profiles
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: All profiles
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: All profiles
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: All profiles
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
--thinking <value>
Scope: All profiles
Purpose: Enable extended thinking mode
Priority: MEDIUM
- Enables extended thinking for compatible models (Claude Sonnet 4.5+, Gemini 2.0+)
- Accepts token budget number (e.g., 5000, 20000) or level name (low, medium, high)
- Overrides profile’s default thinking budget
- Ignored by models without thinking support
--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 (Gemini only)
Scope: Gemini provider
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 quota fetch and token refresh 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
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 |
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
