resend-cli
Original:🇺🇸 English
Not Translated
Operate the Resend platform from the terminal — send emails (including React Email .tsx templates via --react-email), manage domains, contacts, broadcasts, templates, webhooks, and API keys via the `resend` CLI. Use when the user wants to run Resend commands in the shell, scripts, or CI/CD pipelines, or send/preview React Email templates. Always load this skill before running `resend` commands — it contains the non-interactive flag contract and gotchas that prevent silent failures.
5installs
Sourceresend/resend-skills
Added on
NPX Install
npx skill4agent add resend/resend-skills resend-cliSKILL.md Content
Resend CLI
Agent Protocol
The CLI auto-detects non-TTY environments and outputs JSON — no flag needed.
--jsonRules for agents:
- Supply ALL required flags. The CLI will NOT prompt when stdin is not a TTY.
- Pass (or
--quiet) to suppress spinners and status messages.-q - Exit = success,
0= error.1 - Error JSON goes to stderr, success JSON goes to stdout:
json
{"error":{"message":"...","code":"..."}} - Use or
--api-keyenv var. Never rely on interactive login.RESEND_API_KEY - All /
deletecommands requirermin non-interactive mode.--yes
Authentication
Auth resolves: flag > env > config file (). Use or for multi-profile.
--api-keyRESEND_API_KEYresend login --key--profileRESEND_PROFILEGlobal Flags
| Flag | Description |
|---|---|
| Override API key for this invocation |
| Select stored profile |
| Force JSON output (auto in non-TTY) |
| Suppress spinners/status (implies |
Available Commands
| Command Group | What it does |
|---|---|
| send, get, list, batch, cancel, update |
| list, get, attachments, forward, listen |
| create, verify, update, delete, list |
| create, list, delete |
| create, send, update, delete, list |
| create, update, delete, segments, topics |
| create, update, delete, list |
| create, get, list, delete |
| create, publish, duplicate, delete, list |
| create, update, delete, list |
| create, update, listen, delete, list |
| login, logout, switch, rename, remove |
| Utility commands |
Read the matching reference file for detailed flags and output shapes.
Common Mistakes
| # | Mistake | Fix |
|---|---|---|
| 1 | Forgetting | All |
| 2 | Not saving webhook | |
| 3 | Omitting | Without |
| 4 | Using | Batch sending does not support |
| 5 | Expecting | List returns summaries only — use |
| 6 | Sending a dashboard-created broadcast via CLI | Only API-created broadcasts can be sent with |
| 7 | Passing | |
Common Patterns
Send an email:
bash
resend emails send --from "you@domain.com" --to user@example.com --subject "Hello" --text "Body"Send a React Email template (.tsx):
bash
resend emails send --from "you@domain.com" --to user@example.com --subject "Welcome" --react-email ./emails/welcome.tsxDomain setup flow:
bash
resend domains create --name example.com --region us-east-1
# Configure DNS records from output, then:
resend domains verify <domain-id>
resend domains get <domain-id> # check statusCreate and send a broadcast:
bash
resend broadcasts create --from "news@domain.com" --subject "Update" --segment-id <id> --html "<h1>Hi</h1>" --sendCI/CD (no login needed):
bash
RESEND_API_KEY=re_xxx resend emails send --from ... --to ... --subject ... --text ...Check environment health:
bash
resend doctor -qWhen to Load References
- Sending or reading emails → references/emails.md
- Setting up or verifying a domain → references/domains.md
- Managing API keys → references/api-keys.md
- Creating or sending broadcasts → references/broadcasts.md
- Managing contacts, segments, or topics → references/contacts.md, references/segments.md, references/topics.md
- Defining contact properties → references/contact-properties.md
- Working with templates → references/templates.md
- Setting up webhooks or listening for events → references/webhooks.md
- Auth, profiles, or health checks → references/auth.md
- Multi-step recipes (setup, CI/CD, broadcast workflow) → references/workflows.md
- Command failed with an error → references/error-codes.md
- Resend SDK integration (Node.js, Python, Go, etc.) → Install the skill
resend - AI agent email inbox → Install the skill
agent-email-inbox