Developer Experience

Your agent lives in the terminal. So does the entire platform.

Mailboxes, sends, journeys, segments, domains, billing, templates, threads, overrides, suppressions. Every platform capability has a CLI command. Install once, skip the HTTP boilerplate forever.

npm install -g @molted/cli

Two commands to ready

molted auth signup creates your account, provisions a tenant, and generates an API key. molted auth init --key if you already have one. Credentials land in ~/.molted/credentials.json with 0600 permissions. That's it.

Override with environment variables any time: MOLTED_API_KEY, MOLTED_BASE_URL, MOLTED_TENANT_ID. Useful in CI or when your agent runs across multiple environments.

Dry-run first, send second

Add --dry-run to any send. The CLI checks every policy rule (rate limits, suppressions, cooldowns, fatigue) and prints a human-readable verdict to stderr with JSON on stdout. Your agent sees exactly why a send would be blocked before attempting it. No email leaves the system.

$ molted send --dry-run --to alice@example.com --template welcome

  Dry-run result
  ──────────────

  Verdict:             ALLOWED
  From address:        noreply@yourdomain.com
  Rate limited:        no

$ molted send --to alice@example.com --template welcome \
    --dedupe-key "onboard-alice-1" \
    --payload '{"firstName": "Alice"}'

{
  "status": "queued",
  "requestId": "req_a1b2c3..."
}

Batch sends and interactive mode

Pass recipients inline or pipe a JSON array from stdin with --stdin. Each recipient gets individual policy evaluation. The response tells you who was queued and who was blocked, per recipient.

$ molted send batch --template promo --recipients '[
    {"email":"alice@bigcorp.com","dedupeKey":"promo-alice","payload":{"name":"Alice"}},
    {"email":"bob@startup.io","dedupeKey":"promo-bob","payload":{"name":"Bob"}}
  ]'

[
  { "email": "alice@bigcorp.com", "status": "queued", "requestId": "req_a1b2..." },
  { "email": "bob@startup.io", "status": "blocked", "reason": "cooldown_active" }
]

For humans (or agents that prefer prompts), molted send -i walks through every field interactively. It lists your mailboxes and templates so you can pick from what exists, and auto-generates dedupe keys if you skip that step.

Built for agents, not humans pretending to be agents

JSON in, JSON out

Success writes JSON to stdout (exit 0). Errors write JSON to stderr (exit 1). Policy blocks return exit 0 with status: "blocked" and the reason. Predictable, parseable.

Contextual help

Every command group includes recommended patterns, common mistakes, and worked examples. Designed for LLM consumption.

Built-in skill reference

molted --skill prints the full agent API reference. Your agent never leaves the terminal to read docs.

Everything, not just sends

Threads, journeys, segments, domains, suppressions, consent, outcomes, billing, templates, safety rules, attachments, the humanizer, analytics, overrides. Twenty-plus command groups. If you can do it through the API, you can do it from the terminal.

Dry-run everything

Single sends and batch sends both support --dry-run. Test before you commit.

A complete agent workflow

# Full agent workflow — five commands, zero HTTP boilerplate

molted billing status                    # check quota
molted analytics fatigue \
  --contact alice@example.com            # check fatigue
molted send --dry-run \
  --to alice@example.com \
  --template outreach                    # policy check
molted send --to alice@example.com \
  --template outreach \
  --dedupe-key "outreach-alice-1" \
  --payload '{"name":"Alice"}'           # send
molted threads followup <reqId> \
  --contact-email alice@example.com \
  --delay-hours 72 --cancel-on-reply     # auto followup

No dashboard required

Your agent installs the CLI, authenticates, and has the entire platform at its fingertips. Every command returns parseable JSON. Every flag has contextual help. Start sending in under two minutes.