# `frontline auth`

Manage Public API authentication (API key + saved base URL per profile)

```bash
frontline auth [options] [command]
```

## `frontline auth login`

Store an API key for the current (or specified) profile. Does NOT verify the key.

```bash
frontline auth login [options] <api-key>
```

**Options**

| Flag | Description | Default |
|  --- | --- | --- |
| `--base-url <url>` | Advanced: Public API base URL (default: https://prod-api.getfrontline.ai/public/v1) |  |
| `--profile <name>` | Profile name (default: current profile) |  |
| `--json` | Output the saved profile as JSON |  |


## `frontline auth logout`

Remove the API key and saved base URL from a profile (default: current profile)

```bash
frontline auth logout [options]
```

**Options**

| Flag | Description | Default |
|  --- | --- | --- |
| `--profile <name>` | Profile to remove (default: current profile) |  |


## `frontline auth whoami`

Hit GET /me with the resolved API key to show the account/user tied to the key

```bash
frontline auth whoami [options]
```

**Options**

| Flag | Description | Default |
|  --- | --- | --- |
| `--api-key <key>` | Override API key for this run (else FRONTLINE_API_KEY env, else stored profile key) |  |
| `--base-url <url>` | Advanced: override Public API base URL for this run |  |
| `--profile <name>` | Credentials profile: uses that profile's saved API key and Public API base URL (see `frontline auth profiles list`) |  |
| `--debug` | Show debug info on stderr (token is redacted) |  |
| `--pretty` | Pretty-print human-readable output (instead of default JSON) |  |
| `--table` | Render list results as a table (implies --pretty) |  |
| `--json` | Output raw JSON (default behavior — accepted as a no-op) |  |


## `frontline auth profiles`

List and switch credentials profiles

```bash
frontline auth profiles [options] [command]
```

### `frontline auth profiles list`

Show all profiles, which one is active, and each profile's redacted key + base URL

```bash
frontline auth profiles list [options]
```

**Options**

| Flag | Description | Default |
|  --- | --- | --- |
| `--pretty` | Human-readable output (instead of default JSON) |  |
| `--table` | Alias of --pretty for listings |  |
| `--json` | Output raw JSON (default behavior — accepted as a no-op) |  |


### `frontline auth profiles use`

Switch the active profile (must already exist)

```bash
frontline auth profiles use [options] <profile>
```