Resend CLI
The resend command-line tool sends emails, manages domains, broadcasts and webhooks and hands an agent the result as JSON
- 411 ★ on the repository
- Last commit
- MIT
Broad access
Why this level
- Sends real emails, broadcasts and replies from your domains, and a send cannot be recalled
- Manages domains, contacts, keys, webhooks and inboxes: inboxes, threads and labels have a `delete` command
- Stores the API key in `~/.config/resend/credentials.json`, and the install script runs downloaded code
Install
- Works in
Manual install
curl -fsSL https://resend.com/install.sh | bashThe first README option. Puts the binary in ~/.resend/bin/ (RESEND_INSTALL changes the path).
Access and checks
How we reviewBroad accessThe tool can change data, run commands or handle secrets.
- Sends real emails, broadcasts and replies from your domains, and a send cannot be recalled
- Manages domains, contacts, keys, webhooks and inboxes: inboxes, threads and labels have a `delete` command
- Stores the API key in `~/.config/resend/credentials.json`, and the install script runs downloaded code
This is third-party code. Review the repository files before installing.
What it does
Resend CLI is the official command-line tool for the Resend email service. `resend emails send` sends a message with text, HTML or an HTML file, with cc, bcc and a reply-to address. The same commands manage domains, contacts, broadcasts, templates, webhooks, API keys, logs, automations and events. A separate `resend inboxes` group runs mailboxes on your domains: threads, drafts, labels and the settings of a built-in agent. The tool is built for people, agents and CI. When output is piped or `--json` is set, it prints JSON only and writes errors to stderr with `message` and `code` fields and exit code 1. `resend commands` prints the whole command tree as JSON so an agent can find the right one. `--dry-run` validates a message and shows the request without sending. The key comes from the `--api-key` flag, the `RESEND_API_KEY` variable or the `~/.config/resend/credentials.json` file with 0600 permissions, and `resend auth switch` changes profiles. The repository also ships the skill `skills/resend-cli/SKILL.md`, which tells agents the non-interactive flags, output formats and common pitfalls.
Who it is for. Developers who send transactional and marketing email through Resend and want to run the service from a terminal, CI and an agent instead of clicking through the dashboard.
Good fit when
- A deploy-finished email goes out of GitHub Actions with one command and a key from secrets
- An agent checks the environment with `resend doctor` and sees whether a key is found and which domains are verified
- A React Email template is sent to the test address `delivered@resend.dev` straight from the terminal
- Webhooks and contacts are set up with a script, and the dashboard steps need no repeating
- An agent gets its own mailbox and handles incoming messages and draft replies
Not a fit when
- You send mail through another service: the tool talks only to the Resend API
- You need an MCP server: Resend ships a separate package for that and this tool does not serve as one
- An agent works on a shared machine and must not get a full API key that can change and delete account resources
- You want to check a message with no calls to the service: outside `--dry-run` the tool hits the API
Example request
Check the environment with resend doctor, then send a test email to delivered@resend.dev with the subject "Check" and show the email idLimitations
A Resend key starting with `re_` is required, and sending works only from a domain verified in the account. Most inbox commands need a full-access key, while a send-only key handles reply, forward, draft creation and sending. A key limited to one domain must match the inbox's domain. `--dry-run` works only for `emails send`, `broadcasts create` and `emails batch`; other commands run the action at once. A sent email and a deleted resource cannot be undone. Output is JSON when piped or in CI and formatted text in a terminal, so enable `--json` in scripts. The `curl ... | bash` installer runs downloaded code.
How to disable. Run `npm uninstall -g resend-cli` or delete the binary from `~/.resend/bin/` if you used the script. The key and profiles live in `~/.config/resend/credentials.json`: delete that file. Revoke the key in the Resend dashboard separately and remove the `resend-cli` skill from the agent's skills directory.
FAQ
How do I install Resend CLI?
With the script: `curl -fsSL https://resend.com/install.sh | bash`. Also available through npm (`npm install -g resend-cli`), Homebrew (`brew install resend/cli/resend`) or PowerShell (`irm https://resend.com/install.ps1 | iex`), or download the `.exe` from releases.
Where does the tool take the API key from?
First from the `--api-key` flag, then from the `RESEND_API_KEY` variable, then from the file after `resend login`. If there is no key anywhere, the command ends with `auth_error`.
How do I send an email from CI?
Set `RESEND_API_KEY` from secrets and call `resend emails send` with `--from`, `--to`, `--subject` and one of `--text`, `--html`, `--html-file`. `resend login` is not needed in CI.
How does an agent learn the command list?
Run `resend commands`: it prints the command tree with options and descriptions as JSON. When an agent runs the tool it switches to JSON by itself, because output is not going to a terminal.
Can I check an email without sending it?
Yes, add `--dry-run` to `resend emails send`, `resend broadcasts create` or `resend emails batch --file`. The tool prints the request and sends nothing; the batch check needs no key.
Discussion
No questions or reviews yet.
Related
CLI toolsResend's official MCP server: send and read email, manage contacts, broadcasts, domains and webhooks from your agent
Hycli turns a website URL and a goal into a typed CLI and MCP tools that run in your own browser session, with no cookie leaks.
A plugin and CLI catalog for agents: generates command-line interfaces for GUI apps like GIMP and Blender and installs ready ones via CLI-Hub
A language and runtime for skills an agent writes and a human approves: execution through allowlisted connectors and signatures
Open Agent Email — a self-hosted mail server for AI agents: inboxes, in-thread replies, human approval, webhooks and an MCP endpoint with 96 tools
A skill set that teaches an agent to work with Gmail, Slack, HubSpot, Salesforce and other apps through the Membrane CLI
Comparison with similar tools
Cards that share the main search query, and how they differ.
| Tool | Official | Authentication | Repository stars | Main difference |
|---|---|---|---|---|
| Resend CLI (this card) | yes | 411 | ||
| Resend MCP Server | yes | OAuth | 580 | Resend's MCP server for an agent; the CLI runs from a terminal and CI and works with JSON |
| Resend skills | no | API key | 212 | Resend's official skills on email, React Email and the CLI; here the tool itself and its bundled skill |
README in short
The page opens with four install routes and a three-command quickstart. Detailed command sections follow with flag and error-code tables, webhooks with event types and inboxes get their own parts, and the end collects global flags, output behavior and configuration paths.