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

# motus login

> Authenticate with Motus Cloud via browser-based OAuth.

Authenticate with Motus Cloud. Opens a browser-based OAuth flow and stores your credentials in `~/.motus/credentials.json`. You only need to run this once: credentials persist across sessions.

## Usage

```bash theme={null}
motus login [options]
```

## Options

| Flag        | Default                      | Description                                                                                    |
| ----------- | ---------------------------- | ---------------------------------------------------------------------------------------------- |
| `--api-url` | `https://api.lithosai.cloud` | Motus Cloud API endpoint URL. Can also be set via the `LITHOSAI_API_URL` environment variable. |

For CI environments where a browser is unavailable, set the `LITHOSAI_API_KEY` environment variable instead of running `motus login`. The environment variable takes precedence over the stored credential file.

## Examples

### Log in to Motus Cloud

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

### Log in to a custom API endpoint

```bash theme={null}
motus login --api-url https://api.staging.lithosai.cloud
```

### CI authentication via environment variable

```bash theme={null}
export LITHOSAI_API_KEY=your-api-key
motus deploy myapp:agent
```
