CLI Reference
Every molted command, generated from the CLI itself: arguments, options and the agent context each command prints with --help.
@molted/cli is the agent-facing command line for Molted. It wraps the API: it stores credentials, adds the Authorization header and your tenant ID to every request, and prints JSON.
npm install -g @molted/cli
molted --versionEvery page in this section is generated from the CLI's own help text (molted <command> --help), so it matches the published package built from the same source. For a guided first run, see CLI Quickstart.
Global options
Global options go before the command (molted --profile work send ...).
| Option | Description | Default |
|---|---|---|
-V, --version | output the version number | |
--base-url <url> | Override API base URL | |
--mailbox-url <url> | Override mailbox gateway URL (for agent endpoints) | |
--profile <name> | Use a named profile for credentials | |
--skill | Print the full agent skill reference (skill.md) and exit |
Agent context
Molted Email is an agent-native email control plane. The molted CLI handles authentication, headers, and tenant ID injection automatically so you can interact with the API using simple commands instead of raw HTTP calls.
After install (npm install -g @molted/cli), the molted binary is available in your PATH. Verify with: molted --version
Quick start (3 steps)
molted auth signup --name "My Agent" --email agent@example.com --password <password>
# → credentials stored in ~/.molted/profiles/default.json automatically
molted billing setup --plan solo
# → returns { "url": "https://checkout.stripe.com/...", "plan": "solo" }
# → sends are blocked until billing is active (trial_not_activated)
molted send --to alice@example.com --template _default \
--dedupe-key "hello-alice-1" --payload '{"subject":"Hello","html":"Hi!","text":"Hi!"}'
# → { "status": "queued", "requestId": "..." }If you already have an API key (mm_live_...), skip signup
molted auth init --key mm_live_xxxTo join an existing tenant as a new agent
molted adopt claim <token> # if you have an invite token (ma_inv_...)
molted adopt request # device flow (owner approves in the portal)Output format
- Success (exit 0): JSON to stdout
- Error (exit 1): JSON to stderr, { "error": "message", "detail"?: ... }
- Policy-blocked sends return exit 0 with "status": "blocked", so always check status
molted doctorhas its own exit codes (0 ready, 1 blocker found, 2 not fully verified)
- Credentials:
~/.molted/profiles/<profile>.json(auto-created, mode 0600) - Config dir override:
MOLTED_CONFIG_DIRenv var - API key override:
MOLTED_API_KEYenv var (withMOLTED_TENANT_IDalso set, the credentials file is not read at all) - Tenant override:
MOLTED_TENANT_IDenv var - Profile override:
--profileflag >MOLTED_PROFILEenv var > active_profile file > "default" - Base URL override:
--base-urlflag >MOLTED_BASE_URLenv var > credentials file > https://api.molted.email - Mailbox URL override:
--mailbox-urlflag >MOLTED_MAILBOX_URLenv var > credentials file > base URL
Requests go to the mailbox URL, except auth signup, auth login, auth init, adopt claim and adopt request, which call the base URL.
Run molted <command> --help for detailed context on any command. Run molted --skill to print the full agent skill reference.
Full reference: https://molted.email/cli-skill.md
Commands
| Command | Description |
|---|---|
molted adopt | Agent adoption flows (invite & device) |
molted agents | Multi-agent coordination |
molted alerts | Manage alert destinations |
molted analytics | Sending analytics and contact insights |
molted approvals | Read-only view of pending and decided send approvals |
molted attachments | Manage email attachments |
molted auth | Authentication commands |
molted billing | Billing and plan management |
molted budget | Check remaining send quota across monthly, daily and hourly windows |
molted capture | Capture an email address - upsert contact, subscribe to list, and optionally send confirmation |
molted classify | Classify an inbound email the way the inbound pipeline would (platform label, safety verdict, route) |
molted consent | Manage recipient consent records |
molted contacts | Manage contacts |
molted doctor | Can this key send yet, and why isn't mail flowing? Renders GET /v1/agent/setup plus the after-send checks. Exit code: 1 if any blocker is found (not ready to send); otherwise 2 if any check could not be fully verified; otherwise 0 -- 0 means ready to send and every check fully verified, safe to gate a script on. |
molted domains | Manage sending domains |
molted events | View message event timelines |
molted experiments | Run A/B or holdout experiments on journey steps |
molted humanizer | Manage email humanizer configuration |
molted inbound-hooks | Manage inbound webhook mappings for zero-code integrations |
molted incidents | List and acknowledge/resolve ops incidents |
molted journeys | Manage journey orchestration |
molted labels | Define labels and apply them to threads (your own business categories, per mailbox) |
molted listen | Connect to the SSE event stream — persistent event loop for agents |
molted lists | Manage email lists and send broadcasts |
molted mailboxes | Manage mailboxes |
molted messages | Retrieve message data |
molted next-action | Get the next best action for a contact |
molted outcomes | Track and query outcomes |
molted overrides | Human-in-the-loop overrides |
molted pause | Pause your entire account (blocks all sends across every mailbox) |
molted record-inbound | Record an inbound email |
molted resume | Resume a paused account (usually a human decision) |
molted rules | Manage mailbox rules for automated thread routing |
molted safety | Manage tenant safety settings |
molted search | Search your threads by subject, the other party's address or name, an attachment filename (fuzzy, typo tolerant), or whole words in the messages |
molted segments | Manage audience segments |
molted send | Send an email via the agent API |
molted settings | Manage tenant settings (cooldown, consent enforcement, etc.) |
molted suppressions | Manage email suppressions and suppressed domains |
molted team-addresses | List, add and remove verified team addresses (sends to them are free) |
molted templates | Manage email templates |
molted threads | Manage email threads |
molted timeline | Get the delivery event timeline for a send request |
molted trace | Get the full decision trace for a send request |
molted update | Update the Molted CLI to the latest version |
molted webhooks | Manage webhook endpoints for real-time event notifications |