CLI token

cli_token.created

A CLI token was issued via the device-code flow.

When it fires

After PollCliToken completes the device-code flow and CreateCliToken writes a new token row. The token's raw value is never in the payload.

The actor is the user who approved the device code in the dashboard (not the unauthenticated CLI poller).

Payload

ts
{
    type: 'cli_token.created',
    data: {
        cliToken: {
            id: string
            prefix: string           // e.g. 'env_cli_abc123' (first 12 chars)
            hostname: string | null
            os: string | null
            osVersion: string | null
            arch: string | null
            cliVersion: string | null
        }
    }
}

Example

json
{
    "type": "cli_token.created",
    "data": {
        "cliToken": {
            "id": "0192a1b2-c3d4-7000-8000-0000000000a0",
            "prefix": "env_cli_abc1",
            "hostname": "macbook.local",
            "os": "darwin",
            "osVersion": "14.5",
            "arch": "arm64",
            "cliVersion": "0.42.0"
        }
    }
}