CLI
@drin00/cli is the drin command line — full parity with the dashboard. Send mail, manage domains, inboxes, contacts, templates and webhooks, read delivery metrics, and launch the MCP server for AI agents, all from your terminal. Zero third-party dependencies; Node 20+.
01 Install
Install it globally for a drin command, or run it ad hoc with npx — no install required:
npm i -g @drin00/cli # then: drin --help
# or run ad hoc:
npx @drin00/cli emails list02 Authenticate
The CLI authenticates with a single API key. Set it once in your environment — create one in the dashboard under Settings → API Keys. If the key is account-wide rather than scoped to one project, also set DRIN_SENDER to a project externalId.
export DRIN_API_KEY=drin_your_key # Settings → API Keys in the dashboard
export DRIN_SENDER=your-product # only for account-wide keys
# optional: export DRIN_BASE_URL=https://api.drin.runEvery value can also be passed per-command with --api-key, --sender, and --base-url, which override the environment:
drin emails list \
--api-key drin_your_key \
--sender your-product \
--base-url https://api.drin.run03 Send mail
The send command takes a verified --from address, one or more --to recipients, and a body (--text, --html, or a --template-id). It also accepts --data, --header, --tag, --attach, and --cc / --bcc.
# One recipient
drin send --from "Acme <hi@acme.com>" --to you@example.com \
--subject "Hello" --text "It works"
# Several recipients (repeat --to, or comma-separate)
drin send --from hi@acme.com --to a@x.com --to b@y.com --html "<p>hi</p>"
# Merge variables + an attachment
drin send --from hi@acme.com --to you@example.com \
--template-id tmpl_123 --data '{"name":"Ada"}' --attach invoice.pdf04 Read mail & logs
The emails group lists and inspects messages in either direction. Pass --direction inbound to see received mail, and body / attachments to pull the full content.
drin emails list --direction inbound --limit 10
drin emails get <id>
drin emails body <id>
drin emails attachments <id>05 Domains
drin domains list --status verified
drin domains add mail.acme.com # prints the DNS records to publish
drin domains verify <id> # re-check verification now
drin domains receiving <id> --enabled true # turn on inbound (prints the MX)06 Inbound & conversations
Create an inbox on a receiving domain, read its threads, reply in-thread, and simulate inbound mail to test the pipeline without DNS:
drin inboxes create --address support --domain-id <id>
drin threads list --inbox-id <id>
drin emails reply <message-id> --text "On it — thanks!"
drin inbound simulate --to support@acme.com --from "C <c@x.com>" \
--subject Hi --text yo07 Everything else
Contacts, suppressions, templates, webhooks, API keys, metrics, and the cross-product account feed are all here too:
drin contacts create --email a@x.com --first-name Ada
drin suppressions add someone@example.com
drin templates create --name Welcome --subject "Hi {{name}}" --html-file welcome.html
drin webhooks create --url https://acme.com/hook --event delivery --event bounce
drin apikeys create --name "CI deploy"
drin metrics --from 2026-05-01 --to 2026-05-31
drin account messages --limit 20 # every product in the account08 JSON output
Add --json to any command to print the raw API response instead of a formatted table — exactly what a tool-using agent or a CI script wants:
# Human-readable table (default)
drin domains list
# Raw API JSON — pipe it into jq, an agent, or a script
drin domains list --json | jq '.data[].name'drin --help for the full command list, or drin <group> --help (e.g. drin domains --help) for the flags and subcommands of a single group.09 Command reference
| Group | Subcommands |
|---|---|
send | — (supports --data, --header, --tag, --attach, --template-id) |
emails | list, get, body, attachments, reply, batch |
domains | list, get, add, verify, delete, receiving |
inboxes | list, create, get, delete |
threads | list, get |
contacts | list, create, get, update, unsubscribe, resubscribe, delete |
suppressions | list, add, remove |
templates | list, get, create, update, delete, render, preview, gallery |
webhooks | list, get, create, update, delete |
apikeys | list, create, revoke |
inbound | simulate |
integrations | list, get, install, update, uninstall |
account | messages (tenant-wide, every product) |
metrics | — |
mcp | runs @drin00/mcp over stdio with your resolved env |
10 Launch the MCP server
The CLI bundles the MCP server. drin mcp launches @drin00/mcp over stdio using the same resolved environment — point an AI client at it and your agent gets all 54 tools:
drin mcp