# ccp auth



{/* Generated by scripts/sync-cli-reference.ts */}

Manage authentication

```text
Usage: ccp auth [OPTIONS] <COMMAND>
```

| Argument   | Type or values | Default | Parser environment variable | Description |
| ---------- | -------------- | ------- | --------------------------- | ----------- |
| --help, -h | flag           | —       | —                           | Print help  |

## `ccp auth login` [#ccp-auth-login]

Log in with Cluster

```text
Usage: ccp auth login [OPTIONS]
```

| Argument   | Type or values | Default | Parser environment variable | Description                                     |
| ---------- | -------------- | ------- | --------------------------- | ----------------------------------------------- |
| --device   | flag           | false   | —                           | Use device authorization for SSH/headless login |
| --browser  | flag           | false   | —                           | Force browser login with a localhost callback   |
| --help, -h | flag           | —       | —                           | Print help                                      |

## `ccp auth logout` [#ccp-auth-logout]

Log out and clear credentials

```text
Usage: ccp auth logout [OPTIONS]
```

| Argument   | Type or values | Default | Parser environment variable | Description |
| ---------- | -------------- | ------- | --------------------------- | ----------- |
| --help, -h | flag           | —       | —                           | Print help  |

## `ccp auth export-access-token` [#ccp-auth-export-access-token]

Print export TOKEN="..." for eval

```text
Usage: ccp auth export-access-token [OPTIONS]
```

| Argument   | Type or values | Default | Parser environment variable | Description |
| ---------- | -------------- | ------- | --------------------------- | ----------- |
| --help, -h | flag           | —       | —                           | Print help  |

## `ccp auth print-access-token` [#ccp-auth-print-access-token]

Print raw access token to stdout

```text
Usage: ccp auth print-access-token [OPTIONS]
```

| Argument   | Type or values | Default | Parser environment variable | Description                   |
| ---------- | -------------- | ------- | --------------------------- | ----------------------------- |
| --json     | flag           | false   | —                           | Emit an `access_token` object |
| --help, -h | flag           | —       | —                           | Print help                    |

## `ccp auth shell-setup` [#ccp-auth-shell-setup]

Print shell wrapper function for \~/.zshrc

```text
Usage: ccp auth shell-setup [OPTIONS]
```

| Argument   | Type or values | Default | Parser environment variable | Description |
| ---------- | -------------- | ------- | --------------------------- | ----------- |
| --help, -h | flag           | —       | —                           | Print help  |

## Example [#example]

```bash
ccp auth login --device
```

## Global options [#global-options]

Set `CCP_CONTEXT` to choose a named context. An explicit `--context` takes precedence. See [organization selection](/docs/ccp/organizations) for organization defaults.

| Argument  | Type or values | Default | Parser environment variable | Description                                         |
| --------- | -------------- | ------- | --------------------------- | --------------------------------------------------- |
| --context | text           | —       | —                           | Select a developer context from \~/.ccp/config.toml |
