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

# auth

> Authenticate with Landbase and manage your API key

Manage authentication and keep the CLI up to date.

## auth login

Sign in interactively — opens a browser to complete authentication.

**Usage**

```bash theme={null}
landbase-cli auth login
```

**Flags**

| Flag | Default | Description |
| - | - | - |
| `--key` | — | Paste an API key directly instead of using the browser flow |
| `--force` | — | Re-authenticate even if a valid session already exists (platform mode). Use this if a stale or partial session keeps failing. |

**Examples**

```bash theme={null}
# Browser-based login
landbase-cli auth login

# Force a fresh login if a stale session keeps causing errors
landbase-cli auth login --force

# Paste an API key directly
landbase-cli auth login --key
```

***

## auth status

Show the currently active API key and workspace.

**Usage**

```bash theme={null}
landbase-cli auth status
```

***

## auth logout

Remove the stored API key.

**Usage**

```bash theme={null}
landbase-cli auth logout
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.