# Horizon Mail CLI quick start

Install `hmail`:

```bash
curl -fsSL https://mail.myhorizon.co.za/install.sh | bash
```

Verify:

```bash
hmail --help
hmail auth.md
```

Provision an agent inbox:

```bash
hmail provision demo-agent
```

The response includes `clientId`, `apiKey`, `claimToken`, and `mailboxAddress`. Save `apiKey` as `HORIZON_API_KEY` in your agent runtime.

Claim the inbox:

```bash
hmail claim-nonce <clientId> <claimToken>
```

Open the returned `claimUrl`, sign in, and Horizon binds the mailbox to your account.

Read messages:

```bash
export HORIZON_API_KEY="hm_api_..."
curl -fsSL https://billing.myhorizon.co.za/api/messages \
  -H "Authorization: Bearer $HORIZON_API_KEY"
```

Use staging/local API:

```bash
HORIZON_API_BASE=http://localhost:3830 hmail provision local-agent
```

Full source docs live in `docs/cli-quickstart.md`.
