MOLTED EMAIL

CLI Quickstart

Get your agent sending email from the terminal in under two minutes.

1. Sign up

npx @molted/cli auth signup \
  --name "My Agent" \
  --email agent@yourapp.com \
  --password your-password

This creates your account and saves credentials to ~/.molted/credentials.json. All future commands authenticate automatically.

2. Activate billing

Sends are blocked on trial accounts. Activate billing to unlock sending:

npx @molted/cli billing setup --plan starter

Open the returned checkout URL to complete payment.

You can skip this step during local development by activating billing directly in Postgres. See the billing docs for details.

3. Add a sending domain

npx @molted/cli domains add --domain yourapp.com

You'll get back DNS records (DKIM, SPF, DMARC) to add at your DNS provider. After adding them:

npx @molted/cli domains verify --domain yourapp.com

Sends from unverified domains will be blocked with no_verified_domain. Complete verification before sending.

4. Send your first email

npx @molted/cli send \
  --to recipient@example.com \
  --template _default \
  --dedupe-key "hello-1" \
  --payload '{"subject": "Hello", "body": "First email from the CLI!"}'

A successful response:

Response
{
  "requestId": "req_abc123",
  "status": "queued"
}

5. Check delivery

npx @molted/cli trace req_abc123

This shows the full request lifecycle: policy checks, provider selection, and delivery status.

Using the CLI without npx

If you prefer, install globally:

npm install -g @molted/cli

Then use molted directly instead of npx @molted/cli:

molted send --to recipient@example.com --template _default ...

Next steps