@drin00/cli
v0.1.1
Published
Command line for the Drin transactional email API — send mail, manage domains/inboxes/contacts, read metrics, and run the MCP server.
Downloads
162
Maintainers
Readme
@drin00/cli
The drin command line for the Drin transactional email API. Send mail,
manage domains, inboxes, contacts, suppressions, templates, webhooks, API keys
and integrations, read delivery metrics — full parity with the dashboard — and
launch the MCP server for AI agents, all from your terminal.
Zero third-party dependencies. Node 20+.
Install
npm i -g @drin00/cli # then: drin --help
# or run ad hoc:
npx @drin00/cli emails listSign in
drin login # paste an API key (Settings → API Keys); it's validated + saved
drin login --browser # or sign in through the dashboard (no copy-paste)
drin whoami # show the active account, product, and key
drin logout # remove the stored keydrin login saves your key to ~/.drin/config.json (created 0600), so every
later command just works with no flags. drin login --browser opens a dashboard
page where you approve a short code shown in your terminal, and the CLI receives
a fresh key — nothing to copy.
Key resolution order (first one wins):
--api-key <key> > DRIN_API_KEY (env) > ~/.drin/config.jsonSo scripts/CI can stay stateless with an env var or --api-key, while an
interactive shell uses the saved login. --sender/DRIN_SENDER (for
account-wide keys) and --base-url/DRIN_BASE_URL follow the same precedence.
Use
# Send
drin send --from "Acme <[email protected]>" --to [email protected] \
--subject "Hello" --text "It works"
# Multiple recipients (repeat --to, or comma-separate)
drin send --from [email protected] --to [email protected] --to [email protected] --html "<p>hi</p>"
# Read mail
drin emails list --direction inbound --limit 10
drin emails get <id>
drin emails body <id>
# 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 MX)
# Inbound + conversations
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 [email protected] --from "C <[email protected]>" --subject Hi --text yo
# Contacts, suppressions, templates
drin contacts create --email [email protected] --first-name Ada
drin suppressions add [email protected]
drin templates create --name Welcome --subject "Hi {{name}}" --html-file welcome.html
# Webhooks + API keys (secrets shown once)
drin webhooks create --url https://acme.com/hook --event delivery --event bounce
drin apikeys create --name "CI deploy"
# Metrics + cross-product activity
drin metrics --from 2026-05-01 --to 2026-05-31
drin account messages --limit 20 # every product in the account
# Run the MCP server for AI agents (Claude, Cursor, …)
drin mcpAdd --json to any command to print the raw API response instead of a table.
Commands
| Group | Subcommands |
| --- | --- |
| login / logout / whoami | sign in (--browser for dashboard sign-in), sign out, show identity |
| 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 |
| account | messages (tenant-wide, all products) |
| integrations | list, get, install, update, uninstall |
| metrics | — |
| mcp | runs @drin00/mcp over stdio with your resolved env |
drin --help or drin <group> --help for details on any command.
MIT licensed.
