# Installation

#### Install CLI

```bash
# Prereq: install uv
curl -LsSf https://astral.sh/uv/install.sh | sh

# Install the Mithril CLI
uv tool install -U --refresh mithril-client
```

#### First-time setup

```bash
ml setup # interactive onboarding
```

#### Verify setup

```bash
ml setup --check
```

**Non-interactive setup**

You can skip `ml setup` by setting environment variables:

* **API key**: get one at <https://app.mithril.ai/account/api-keys>
* **Project ID**: project `fid` from the projects API:

  ```bash
  curl -H "Authorization: Bearer <API_KEY>" https://api.mithril.ai/v2/projects
  ```

```bash
export MITHRIL_API_KEY=fkey_xxx
export MITHRIL_PROJECT=proj_xxx
```
