Skip to main content

Headless Workflow

Use OAuth providers on servers or remote machines without browser access.

Usage

ccs gemini --headless

# Output:
# Open this URL on any device to authenticate:
# https://accounts.google.com/...
#
# Waiting for authentication...

How It Works

  1. CCS generates an authentication URL
  2. You open the URL on any device with a browser
  3. Complete OAuth login
  4. CCS detects when tokens are cached
  5. Session continues

Use Cases

  • SSH sessions on remote servers
  • Docker containers
  • CI/CD pipelines (with pre-cached tokens)
  • Headless Linux environments

Commands

# Gemini headless
ccs gemini --headless "prompt"

# Codex headless
ccs codex --headless "prompt"

# Antigravity headless
ccs agy --headless "prompt"

Pre-Caching Tokens

For automated environments, authenticate locally first:
  1. Run ccs gemini --auth on local machine
  2. Copy ~/.ccs/cliproxy/auth/*.json to remote server
  3. Use without --headless flag