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

# muna auth

> Login, logout, and manage your authentication.

The `auth` command group manages your authentication with Muna.

## Commands

| Command | Description |
| :- | :- |
| `muna auth login` | Login to Muna |
| `muna auth status` | Check authentication status |
| `muna auth logout` | Logout from Muna |

***

## muna auth login

Authenticate with Muna using your access key.

```bash icon="terminal" theme={null}
$ muna auth login ACCESS_KEY
```

| Argument | Description |
| :- | :- |
| `ACCESS_KEY` | Your Muna access key |

### Logging In

```bash icon="terminal" theme={null}
# 🔥 Login with your access key
$ muna auth login muna_xxxxxxxxxxxxxxxxxxxxxx
```

> [!TIP]
>
> Generate an access key from your [developer settings](https://muna.ai/settings/developer).

### Using Environment Variables

You can also set the `MUNA_ACCESS_KEY` environment variable:

```bash icon="terminal" theme={null}
# Set the environment variable
$ export MUNA_ACCESS_KEY=muna_xxxxxxxxxxxxxxxxxxxxxx

# Then login
$ muna auth login $MUNA_ACCESS_KEY
```

***

## muna auth status

Check your current authentication status.

```bash icon="terminal" theme={null}
$ muna auth status
```

This displays:

* Username
* Email
* Account status

***

## muna auth logout

Logout from Muna and clear stored credentials.

```bash icon="terminal" theme={null}
# 🔥 Logout
$ muna auth logout
```

> [!NOTE]
>
> After logging out, you'll need to run `muna auth login` again before using commands
> that require authentication.

***

## Security Best Practices

* Access keys are stored securely in your system's credential store
* Never share your access key or commit it to version control
* Rotate your access key periodically from the developer settings

> [!WARNING]
>
> If you believe your access key has been compromised, immediately regenerate it from
> your [developer settings](https://muna.ai/settings/developer).


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