> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ccs.kaitran.ca/llms.txt
> Use this file to discover all available pages before exploring further.

# First Session

> Run your first CCS session with Claude or another supported provider

# First Session

After installing CCS, run your first session in under 2 minutes.

## Step 1: Choose a Provider

<Tabs>
  <Tab title="Default Claude (OAuth)">
    ```bash theme={null}
    # Browser opens for Claude OAuth
    ccs
    ```

    Requires a Claude Pro or Max subscription.
  </Tab>

  <Tab title="Codex (OAuth)">
    ```bash theme={null}
    # Browser opens for OpenAI OAuth
    ccs codex "review this code"
    ```

    Works well as a first browser-OAuth route.
  </Tab>

  <Tab title="Kiro (Free tier)">
    ```bash theme={null}
    # Device code flow (no browser required)
    ccs kiro "help me debug this"
    ```

    Free tier via AWS Builder ID.
  </Tab>

  <Tab title="API Profile">
    ```bash theme={null}
    # Z.AI GLM — requires API key setup first
    ccs glm "quick code fix"
    ```

    See [API Profiles](/providers/concepts/api-profiles) for setup.
  </Tab>
</Tabs>

<Note>
  Other supported routes such as GHCP, Gemini, iFlow, and Antigravity are
  documented in [Provider Overview](/providers/concepts/overview). This page
  keeps the first-run path focused on the safest baseline examples.
</Note>

## Step 2: Authenticate

On first run, CCS triggers OAuth automatically.

<Steps>
  <Step title="Browser opens">
    CCS spawns a local OAuth callback server and opens the provider login page.
    For Device Code providers (Kiro, Kimi), a code and URL are shown in
    the terminal instead.
  </Step>

  <Step title="Sign in">
    Complete login with the account for your chosen provider.
  </Step>

  <Step title="Token saved">
    OAuth credentials are cached at `~/.ccs/cliproxy/auth/`. Future runs skip
    this step.
  </Step>

  <Step title="Session starts">
    CCS launches the selected target runtime with the chosen provider injected
    as the API backend. By default, that target runtime is Claude Code.
  </Step>
</Steps>

## Step 3: Start Coding

```bash theme={null}
# Interactive session (default)
ccs codex

# One-shot with prompt
ccs kiro "what does this regex do: ^[a-z]+$"

# Pass a prompt directly
ccs glm "refactor this function to use async/await"
```

### How Profile Switching Works

Each `ccs <profile>` command injects different environment variables into the
active target runtime:

```
ccs codex   →  ANTHROPIC_BASE_URL=http://127.0.0.1:8317/api/provider/codex
ccs kiro    →  ANTHROPIC_BASE_URL=http://127.0.0.1:8317/api/provider/kiro
ccs glm     →  ANTHROPIC_BASE_URL=https://api.z.ai/api/anthropic
ccs         →  Default Claude account (no proxy)
```

Switching takes under 1 second. Running `ccs codex` in one terminal and `ccs glm`
in another keeps those sessions separate and avoids conflicts.

## Dashboard

Open the visual configuration dashboard at any time:

```bash theme={null}
ccs config
```

The dashboard shows all profiles, OAuth provider status, quota usage, and lets
you manage API keys without editing files.

## Quick Examples

```bash theme={null}
# Switch between providers instantly
ccs "design the auth layer"         # Default Claude
ccs glm "implement user service"    # Z.AI GLM (cost-optimized)
ccs codex "security review"         # OpenAI Codex

# Extended thinking / reasoning
ccs --effort high "debug this regression"
ccs codex --effort xhigh "complex refactor"
ccs km "reason through this architecture change"

# Multi-account: work vs personal
ccs work "review PR #123"
ccs personal "help with side project"
```

## Next Steps

<CardGroup cols={2}>
  <Card title="All Providers" icon="grid" href="/providers/concepts/overview">
    Compare OAuth providers, Claude accounts, and API profiles
  </Card>

  <Card title="Configuration" icon="gear" href="/getting-started/configuration">
    Config file format, precedence rules, and env vars
  </Card>

  <Card title="Claude Accounts" icon="users" href="/providers/concepts/claude-accounts">
    Run multiple Claude subscriptions simultaneously
  </Card>

  <Card title="API Profiles" icon="key" href="/providers/concepts/api-profiles">
    Bring your own API keys
  </Card>
</CardGroup>
