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

# aether auth

> Login, logout, and manage authentication

# aether auth

Manage CLI authentication. The CLI uses JWT tokens stored in `~/.aether/config.json`. You can also authenticate using the `AETHER_TOKEN` environment variable.

## Usage

```bash theme={null}
aether auth <subcommand> [flags]
```

## Subcommands

| Subcommand | Description                       |
| ---------- | --------------------------------- |
| `login`    | Authenticate with Aether          |
| `logout`   | Clear stored credentials          |
| `status`   | Show current authentication state |
| `token`    | Print the access token to stdout  |
| `signup`   | Create a new account              |

## aether auth login

Authenticate with the Aether API. Opens a browser for OAuth login by default.

```bash theme={null}
aether auth login [flags]
```

| Flag      | Description                             |
| --------- | --------------------------------------- |
| `--email` | Login with email (sends a magic link)   |
| `--token` | Authenticate with an existing JWT token |

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

```
Opening browser for authentication...
Logged in as user@example.com
Default project: my-app (proj_a1b2c3d4)
```

```bash theme={null}
# Email magic link
aether auth login --email user@example.com
```

```
Magic link sent to user@example.com. Check your inbox.
Waiting for confirmation...
Logged in as user@example.com
```

```bash theme={null}
# Token-based login (for CI/CD)
aether auth login --token "eyJhbG..."
```

## aether auth logout

Clear stored credentials from the config file.

```bash theme={null}
aether auth logout
```

```
Logged out.
```

## aether auth status

Show the current authentication state, token expiry, and default project.

```bash theme={null}
aether auth status
```

```
Authenticated:    yes
Email:            user@example.com
Token expires:    2025-02-15T10:30:00Z
Default project:  my-app (proj_a1b2c3d4)
```

When not authenticated:

```
Authenticated:    no
Run 'aether auth login' to authenticate.
```

## aether auth token

Print the current access token to stdout. Useful for piping to other commands or scripts.

```bash theme={null}
aether auth token
```

```bash theme={null}
# Use with curl
curl -H "Authorization: Bearer $(aether auth token)" https://api.runaether.dev/v1/projects
```

```bash theme={null}
# Set as environment variable
export AETHER_TOKEN=$(aether auth token)
```

## aether auth signup

Create a new Aether account.

```bash theme={null}
aether auth signup [flags]
```

| Flag      | Description                       |
| --------- | --------------------------------- |
| `--email` | Email address for the new account |

```bash theme={null}
aether auth signup --email user@example.com
```

```
Account created. Check your email to verify.
```
