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

# Authentication

> Authenticate the Rime CLI using rime login, rime logout, and rime key.

## `rime login`

Authenticate with Rime. Opens your browser to the Rime dashboard for OAuth-based authentication. A local callback server receives the API key and saves it to `~/.rime/rime.toml`.

```bash theme={null}
rime login
```

<img src="https://mintcdn.com/rimelabs/hWWUVCw6mopaejUP/images/cli/login-demo.gif?s=adaf31b9d84cc8b652f44958968e2ae2" alt="Demo of the rime login command" width="1080" height="720" data-path="images/cli/login-demo.gif" />

No flags. The command validates the API key before saving.

***

## `rime logout`

Remove your saved API key by deleting the config file at `~/.rime/rime.toml`.

```bash theme={null}
rime logout
```

No flags.

***

## `rime key`

Print the resolved API key (no trailing newline). Useful in shell scripts and as a subexpression — `rime curl` uses `$(rime key)` in its generated commands.

```bash theme={null}
rime key
```

No flags. Resolves the key from config or `RIME_CLI_API_KEY`, using the active environment.
