Skip to content

Questions · Published 2026-11-29 · Updated 2026-11-29 · AgentiSend

Resend CLI

Resend CLI is the resend command from the resend-cli package (2.30.1 on npm, Node.js 22 or newer).

Install the Resend CLI with npm install -g resend-cli, then run resend --version. On 28 November 2026 the npm latest tag, the GitHub release v2.30.1, and package.json on the default branch were all 2.30.1, and that package requires Node.js 22 or newer. The command list below is the one in github.com/resend/resend-cli at commit 198a52f (27 November 2026). We did not run a send.

We make AgentiSend. The labelled section near the end is our CLI. The rest of this page is Resend's, read that day from the repository, from resend.com/docs/cli, from resend.com/docs/cli-agents, from the npm registry, and from npx skills add resend/resend-cli --list with the skills installer at 1.9.1.

Install

MethodCommand, as the README prints itWhat we checked
npmnpm install -g resend-cliRegistry: version 2.30.1, bin resend → dist/cli.cjs, license MIT, engines.node >=22, published 2026-11-27T17:12:23Z. 80 versions exist. The package depends on resend, commander, and others
Homebrewbrew install resend/cli/resendresend/homebrew-cli Formula/resend.rb points at the v2.30.1 release tarballs for macOS and Linux, arm64 and x64. We did not run Homebrew
macOS and Linux scriptcurl -fsSL https://resend.com/install.sh then the README pipes it to bashThat URL returned the script, 12,392 bytes. The script's own comment says the default directory is ~/.resend, overridable with RESEND_INSTALL. We did not pipe it to a shell
Windowsirm https://resend.com/install.ps1 then the README pipes it to iexresend.com/install.ps1 returned 8,277 bytes. The README also points at the .exe on the GitHub releases page

The two script lines, copied from the README:

curl -fsSL https://resend.com/install.sh | bash
irm https://resend.com/install.ps1 | iex

The release v2.30.1 was published 2026-11-27T17:10:04Z. The default-branch commit that bumps the package to 2.30.1 is 198a52f10974ab7b45f58bde8a2c7bcaf993fce2. GitHub reported 417 stars and the MIT license. After install, resend --version prints resend-cli v2.30.1 when that build is the one on the path. We did not install it on this machine.

Sign in

resend.com/docs/cli and resolveAuthentication in src/lib/config.ts use the same order. A flag wins, then the environment, then whatever resend login saved.

OrderSourceHow it is set
1--api-keyresend --api-key re_xxx emails send …
2RESEND_API_KEYThe environment. CI and agents should use this and skip resend login
3Saved loginresend login, resend login --key, or resend login --web

resend login in a terminal asks whether to approve in the browser or to type a key. The docs say the key is checked against the API before it is saved. --web prints a URL and waits up to 5 minutes; the browser has to be on the same machine. --key and --web cannot be combined. In a non-interactive shell the skill says to pass one of those two, because the command will not prompt.

Where the key is written depends on the machine. getCredentialBackend tries the OS store first: macOS Keychain (service name resend-cli), then Linux secret service, then Windows Credential Manager. When that store is available, credentials.json keeps the profile and storage: "secure_storage", and the key itself is not in the file. When the OS store is missing, or --insecure-storage forces the file backend, the key is written into the file at mode 0600. The directory is ~/.config/resend, or $XDG_CONFIG_HOME/resend, or %APPDATA%\resend on Windows.

The docs page describes the OS stores and does not mention credentials.json. The README describes ~/.config/resend/credentials.json at mode 0600 and does not mention Keychain. Both files are in the 2.30.1 tree. The source does both.

Other profile commands, from src/commands/auth and the docs page: resend auth list, resend auth switch [name], resend auth rename [old] [new], resend auth remove [name]. resend login and resend logout are also registered at the top level. resend whoami prints the current authentication status. --profile or RESEND_PROFILE picks a profile for one command.

Send one email

src/commands/emails/send.ts accepts these flags: --from, --to, --subject, --html, --html-file, --text, --text-file, --react-email, --cc, --bcc, --reply-to, --scheduled-at, --attachment, --attachments-file, --headers, --tags, --idempotency-key, --dry-run, --template, --var.

The docs page lists the same send flags except --dry-run and --attachments-file, and it writes --attachment as paths. The README's dry-run section says emails send, broadcasts create, and emails batch are the three commands that accept --dry-run. A dry run prints the payload and does not call the API. The README says emails batch --dry-run does not need an API key.

This is the docs page's send, plus an idempotency key and a dry run, so copying it does not send:

export RESEND_API_KEY="re_xxxxxxxxx"

resend emails send \
  --from "Acme <onboarding@resend.dev>" \
  --to delivered@resend.dev \
  --subject "Hello from Resend CLI" \
  --text "Sent from the terminal." \
  --idempotency-key cli-check/1 \
  --dry-run \
  --quiet

Drop --dry-run when you want the API call. The README's own quickstart uses you@example.com as the from address and delivered@resend.dev as the recipient. The docs page uses onboarding@resend.dev. A React Email file is --react-email ./emails/welcome.tsx. That path is also covered on React Email MCP.

--quiet implies --json. When stdout is not a terminal, the CLI already prints JSON and does not prompt. Missing required flags are an error that names the flags. Exit 0 is success and exit 1 is an error. Error JSON goes to stderr with message and code. The skill file adds one more rule: every delete command needs --yes when nobody is at the keyboard.

resend doctor checks the CLI version, the API key, credential storage, and domains. The docs page says exit 0 when every check passes or warns, and exit 1 when one fails. The sample JSON on that page still says "v1.7.0 (latest)". That string is the sample, not this release. This release is 2.30.1.

A GitHub Actions step from the docs page, with the key in the environment and no resend login:

env:
  RESEND_API_KEY: ${{ secrets.RESEND_API_KEY }}
steps:
  - run: |
      resend emails send \
        --from "Acme <onboarding@resend.dev>" \
        --to delivered@resend.dev \
        --subject "Deploy complete" \
        --text "Version ${{ github.sha }} deployed."

Commands in the 2.30.1 tree

src/cli.ts registers the root commands in this table. emails receiving is nested under emails, not a second root command, so that row's wording is ours. telemetry is registered with hidden: true and is not listed. Every other description is the .description() string in that tree. Subcommands are the new Command(...) names under that directory.

CommandWhat the source saysSubcommands in source
loginSave a Resend API keyAlso under auth
logoutRemove your saved Resend API keyAlso under auth
authManage authentication and profileslist, login, logout, remove, rename, switch
whoamiShow current authentication status—
doctorCheck CLI version, API key, and domain status—
emailsSend and manage emailssend, list, get, batch, cancel, update, share, metrics, attachments, attachment, receiving
emails receivingNested under emails. Inbound maillist, get, attachments, attachment, forward, listen
domainsManage verified sending and receiving domainscreate, list, get, verify, update, delete, claim, forge
api-keysManage API keys for authenticationcreate, list, update, delete
webhooksManage webhook endpoints for real-time event notificationscreate, list, get, update, delete, listen, rotate-signing-secret, events
broadcastsManage broadcastscreate, send, get, update, delete, list, cancel, duplicate, open, clicked-links, recipients
contactsManage contactscreate, update, delete, list, get, segments, add-segment, remove-segment, topics, update-topics, imports
contact-propertiesManage contact property definitionscreate, update, delete, list, get
segmentsManage segmentscreate, get, list, update, delete, contacts
topicsManage topics for contact subscription preferencescreate, update, delete, list, get
templatesManage templatescreate, publish, duplicate, delete, list, get, update, open
automationsManage automationscreate, get, list, update, delete, duplicate, stop, open, runs
eventsManage eventscreate, get, list, update, delete, send, open
logsView API request logslist, get, open
usageShow account-level usage and quota limits—
suppressionsManage the suppression list — addresses that will not receive your emailslist, add, get, delete, batch
inboxesManage inboxes — email addresses at your domains that send and receive mailcreate, list, get, update, delete, plus threads, labels, drafts, and agent
oauth-grantsManage OAuth grants (apps authorized to act on the team)list, revoke
careersBrowse open positions at Resend and apply from your terminallist (the default), apply
commandsPrint the command tree as JSON (for agents and tooling)—
completionGenerate shell completion scriptbash, zsh, fish, powershell on the docs page; --install writes the profile
docsOpen the Resend documentation in your browser—
openOpen the Resend dashboard in your browser—
updateCheck for available CLI updates—

oauth-grants, docs, commands, and completion are in src/cli.ts. The docs page fetched the same day does not name them. The README's command headings stop at login, emails send, doctor, webhooks, and inboxes, then global options. resend commands is the way to print the tree the binary actually has, including anything added after this page.

Global flags on every command, from src/cli.ts: --api-key, -p, --profile, --json, -q, --quiet, --insecure-storage, --version, --help. The README's global-options table omits --insecure-storage. The docs page includes it.

The Resend CLI is the resend command at package 2.30.1 and it sends mail. The MCP server is tools at mcp.resend.com. The resend-cli skill is a SKILL.md file at version 2.26.0 and it does not send by itself.

Resend CLI, MCP, or skill

Use the Resend CLI when the agent should run a shell command. Use the Resend MCP server when the agent should call a tool. Use the skill when the agent should be taught the flags before it does either. The three install separately, and the official plugin can install the server and the skills together.

CLIMCP serverSkill
What it isThe resend binaryTools at https://mcp.resend.com/mcp, package resend-mcpA SKILL.md the agent reads
Install checked 28 November 2026npm install -g resend-cliThe lines are on the MCP pagenpx skills add resend/resend-cli (one skill). The collection is npx skills add resend/resend-skills
Sends mailresend emails send calls the API, unless you pass --dry-runThe agent calls a send toolNo. The file tells the agent which command to run
Sign-inRESEND_API_KEY, or resend loginOAuth in the browser, or an API keyWhatever the CLI or the MCP server already uses
When there is no terminalJSON on stdout, no prompts, exit 0 or 1The client speaks the tool protocolThe file still has to be in the agent's skill list
Version that dayPackage 2.30.1See the MCP page; this page did not re-count its toolsSkill metadata 2.26.0, which the file says is independent of the package version

npx skills add resend/resend-cli --list, run here with skills 1.9.1, printed one name, resend-cli, and stopped. It did not install the skill. resend.com/docs/cli-agents gives that install line. The CLI README also says npx skills add resend/resend-skills, which is the collection on Resend skills. That collection's resend-cli skill is marked as synced from this repository, and its frontmatter version there was also 2.26.0. The skill is 2.26.0 while the binary is 2.30.1, so a flag in the skill can lag the binary. resend --help and resend commands are the binary. The skill is the commentary.

The skill's own rule is to load it before running resend, because it records the non-interactive flags. It does not replace the binary, and the binary does not read the skill.

The same job on AgentiSend

AgentiSend's CLI is the agentisend command. On 28 November 2026 the npm latest for agentisend was 0.5.7, the bin name is agentisend, and the package requires Node.js 20 or newer. @agentisend/sdk-node exposes the same command. Run it once without a global install:

npx agentisend doctor

doctor reads the key, whether the API answers, whether a key is paused, whether budget remains, whether a domain is verified, and the account standing. It only reads. A missing key stops the report there.

The key is resolved in this order: --api-key, then AGENTISEND_API_KEY, then the current profile. agentisend profile set default --api-key as_… writes ~/.agentisend/config.json at mode 0600 (or $AGENTISEND_CONFIG when that is set) and the command prints the key prefix, not the key. --json is on when stdout is not a terminal. Exit 0 means the call succeeded, exit 1 means the API refused it, and exit 2 means the command line was wrong. A refusal is JSON on stderr with code, message, and fix.

Commands the binary actually dispatches:

CommandWhat it does
emails sendPOST /emails. Needs --from, --to, --subject, and --text or --html (or a file; - reads stdin). Optional: --cc, --bcc, --reply-to, --tag name=value, --scheduled-at, --timezone, --idempotency-key, --content-check (warn or off)
emails getOne message by id
emails listNewest first. --status and --limit
emails cancelCancel a scheduled or queued message
emails explainGET /emails/{id}/explain
domains listSending domains and their status
domains verifyPOST /domains/{id}/verify
domains setup-linkA page the person who owns DNS can open. Prints the URL
webhooks listenNeeds --secret and --forward-to, or --verify-only. Default port 4000. A delivery that fails verification is dropped
receiving listenThe help line says it is not open yet. The command is in the binary; do not build a receive flow on it
limits killPOST /limits/keys/{id}/kill. Optional --reason
limits resumeThe help line says a person signed in to the console does this, and a key is refused
trust standingThis account's standing and the reasons
doctorThe checks above
profile list, profile use, profile setSaved keys. profile set needs --api-key
completionsA script for bash, zsh, or fish
agent sign-upPOST /agent/sign-up with --name and --human. No key yet. The key is printed once
agent verifyPOST /agent/verify with --code and the key from sign-up
migrate --from resendScans a project. No file changes without --write

There is no preflight subcommand. The check that sends nothing is POST /emails/preflight. Run it before POST /emails when the agent is deciding whether a send is allowed. ```bash curl -sS -X POST https://api.agentisend.com/emails/preflight \ -H "Authorization: Bearer $AGENTISEND_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{"from":"billing@yourdomain.com","to":"delivered@simulator.agentisend.com","subject":"Your receipt","text":"Thanks — the details are attached."}'

200 { "ok": true, "simulated": true, "error": null, "checks": { "validation": { "ok": true }, "domain_scope": { "ok": true }, "suppression": { "ok": true, "kept": [], "suppressed": [] }, "account": { "ok": true, "status": "approved" }, "trust": { "ok": true, "state": "ok" }, "verifier": { "ok": true, "risky": [] }, "domain": { "ok": true, "registered": false, "status": null }, "budget": { "ok": true, "remaining": null, "would_cost": 0, "simulated": true }, "loop": { "ok": true, "decision": null }, "content": { "ok": true, "verdict": "clean", "findings": [] } } }


A send to the simulator does not reach an inbox. This is the command, and the HTTP call under it:

npx agentisend emails send \ --from "Acme <onboarding@agentisend.com>" \ --to delivered@simulator.agentisend.com \ --subject "Hello from the CLI" \ --text "Sent from the terminal." \ --idempotency-key cli-check/1

curl -sS -X POST https://api.agentisend.com/emails \ -H "Authorization: Bearer $AGENTISEND_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{"from":"billing@yourdomain.com","to":"delivered@simulator.agentisend.com","subject":"Your receipt","text":"Thanks — the details are attached."}'

201 { "id": "9c8f8f0e-3d1a-4d3f-9a1e-2b7c1a0f5e42", "simulated": true, "warnings": [] }


`onboarding@agentisend.com` delivers real mail only to the sign-in addresses on the account. An address ending in `@simulator.agentisend.com` costs nothing and reaches nobody, including before a domain is verified. Anyone else needs a verified domain. The longer command notes are on [Agents](/docs/guides/agents#the-cli) and [SDKs](/docs/guides/sdks).

An app that already calls Resend's SDK can keep the calls. The [compatibility guide](/docs/guides/resend-compatibility) lists each method. Yearly plans are 52% cheaper than Resend, compared with Resend's monthly price because Resend sells no yearly plan. Lifetime plans are up to 75% cheaper than Resend for the same emails. The tables are on [Resend alternative pricing](/resend-alternative-pricing).

The guardrails that are not a flag on `resend` sit on the AgentiSend key: a budget, a kill switch (`POST /limits/keys/{id}/kill`), and a preflight that creates no message. The [AgentiSend MCP server](/agentisend-mcp-server) exposes the same send as tools (125 tools, 48 listed at first). The [AgentiSend skills](/agentisend-skills) tell an agent to run `doctor`, then preflight, then send.

## FAQ

### How do I install the Resend CLI?

Run npm install -g resend-cli. The package on npm on 28 November 2026 was resend-cli 2.30.1, the command is resend, and it needs Node.js 22 or newer. Homebrew, the shell installer, and the Windows script are the other three lines in the README.

### Should I use the Resend CLI or the MCP server?

Use the Resend CLI when the agent runs a shell command and can hold RESEND_API_KEY. Use the MCP server at https://mcp.resend.com/mcp when the agent calls tools and can sign in with OAuth. The resend-cli skill is a third thing: it teaches the flags and does not send.

### Which Node.js version does the Resend CLI need?

Node.js 22 or newer. That is engines.node in resend-cli 2.30.1. AgentiSend's agentisend package on the same day required Node.js 20 or newer.

### Where does the Resend CLI store the API key?

resend login uses the OS credential store when it is available (macOS Keychain, service name resend-cli, or the Linux or Windows equivalent) and writes profile metadata to ~/.config/resend/credentials.json. Without that store, or with --insecure-storage, the key is in that file at mode 0600. RESEND_API_KEY overrides both.

### Does the Resend CLI prompt if I forget a flag?

Not when stdout is not a terminal, and not in CI. The command exits with an error that lists the missing flags. Pass --quiet in CI so spinners stay off stderr. Delete commands also need --yes in that mode.

### What is the AgentiSend command for the same send?

npx agentisend emails send, with --from, --to, --subject, and --text or --html. Point the first test at delivered@simulator.agentisend.com. doctor checks the key before that, and POST /emails/preflight is the call that sends nothing.

## Next

- [Resend skills](/resend-skills)
- [The Resend MCP server in Claude Code](/resend-mcp-server)
- [React Email MCP](/react-email-mcp)
- [Can Claude Code send emails?](/send-email-from-claude-code)
- [AgentiSend skills](/agentisend-skills)
- [AgentiSend API docs](/agentisend-api-docs)
- [Email for AI agents](/email-for-ai-agents)

Written by the AgentiSend team.