Resend-skills resend-cli
install
source · Clone the upstream repo
git clone https://github.com/resend/resend-skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/resend/resend-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/resend-cli" ~/.claude/skills/resend-resend-skills-resend-cli && rm -rf "$T"
manifest:
skills/resend-cli/SKILL.mdsource content
Resend CLI
Installation
Before running any
resend commands, check whether the CLI is installed:
resend --version
If the command is not found, install it using one of the methods below:
cURL (macOS / Linux):
curl -fsSL https://resend.com/install.sh | bash
Homebrew (macOS / Linux):
brew install resend/cli/resend
Node.js:
npm install -g resend-cli
PowerShell (Windows):
irm https://resend.com/install.ps1 | iex
After installing, verify:
resend --version
Agent Protocol
The CLI auto-detects non-TTY environments and outputs JSON — no
--json flag needed.
Rules 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:
{"error":{"message":"...","code":"..."}} - Use
or--api-key
env var. Never rely on interactive login.RESEND_API_KEY - All
/delete
commands requirerm
in non-interactive mode.--yes
Authentication
Auth resolves:
--api-key flag > RESEND_API_KEY env > config file (resend login --key). Use --profile or RESEND_PROFILE for multi-profile.
Global 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 |
| list, get, open |
| create, list, delete |
| create, get, list, update, delete, stop, open, runs |
| create, get, list, update, delete, send, open |
| create, send, update, delete, list |
| create, update, delete, segments, topics |
| create, update, delete, list |
| create, get, list, delete, contacts |
| 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.
Dry-run: Only
emails send and broadcasts create support --dry-run (payload validation before send/create). They print { "dryRun": true, "request": { ... } } on stdout without calling the API. There is no --dry-run on emails batch, broadcasts send, or other commands yet.
Common Mistakes
| # | Mistake | Fix |
|---|---|---|
| 1 | Forgetting on delete commands | All / subcommands require in non-interactive mode — otherwise the CLI exits with an error |
| 2 | Not saving webhook | shows the secret once only — it cannot be retrieved later. Capture it from command output immediately |
| 3 | Omitting in CI | Without , spinners and status text still go to stderr (not stdout). Use for JSON on stdout with no spinner noise on stderr |
| 4 | Using with batch | Batch sending does not support — use single instead |
| 5 | Expecting to include DNS records | List returns summaries only — use for the full array |
| 6 | Sending a dashboard-created broadcast via CLI | Only API-created broadcasts can be sent with — dashboard broadcasts must be sent from the dashboard |
| 7 | Passing to expecting additive behavior | replaces the entire subscription list — always pass the complete set |
| 8 | Expecting to include request/response bodies | List returns summary fields only — use for full and |
Common Patterns
Send an email:
resend emails send --from "you@domain.com" --to user@example.com --subject "Hello" --text "Body"
Send a React Email template (.tsx):
resend emails send --from "you@domain.com" --to user@example.com --subject "Welcome" --react-email ./emails/welcome.tsx
Domain setup flow:
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 status
Create and send a broadcast:
resend broadcasts create --from "news@domain.com" --subject "Update" --segment-id <id> --html "<h1>Hi</h1>" --send
CI/CD (no login needed):
RESEND_API_KEY=re_xxx resend emails send --from ... --to ... --subject ... --text ...
Check environment health:
resend doctor -q
When 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
- Viewing API request logs → references/logs.md
- Creating automations or sending events → references/automations.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
skillresend - AI agent email inbox → Install the
skillagent-email-inbox