Resend CLI
$ resend Official Med RiskResend CLI (resend) manages Resend domains, transactional emails, audiences, broadcasts, and local webhook listeners (resend webhooks listen). Designed explicitly for both humans and coding agents, it automatically emits structured JSON when stdout is not a TTY or when --json is passed.
brew install resend/cli/resend Use resend CLI for resend doctor, local webhooks listen, and React Email .tsx sends; use Resend MCP when composing emails inside chat-only hosts.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Automatically outputs structured JSON in non-TTY environments and supports --json and RESEND_API_KEY cleanly.
- Non-TTY auto-JSON behavior built specifically for agents and CI
- Dedicated
resend doctordiagnostics command
Supports restricted API keys and safe test addresses ([email protected]), though live email sends cannot be undone.
- Resend supports sending-only vs full-access API keys
- Test sink addresses like
[email protected]prevent external spam
Available via npm, Homebrew tap, and curl/PowerShell installers across macOS, Linux, and Windows.
npm install -g resend-cliandbrew install resend/cli/resend
Covers emails, domains, webhooks, broadcasts, and local webhooks listen tunneling.
- Includes React Email
.tsx/.jsxrendering and local webhook forwarding
Official Resend repository (resend/resend-cli) maintained under MIT.
- Official Resend GitHub organization
Clear official CLI docs and examples covering agent/CI usage.
- Official docs at resend.com/docs/cli
Security, Auth & Guardrails
Stores session keys under ~/.config/resend/ or reads RESEND_API_KEY directly from environment variables.
CLI is free (MIT); Resend includes a free tier (3,000 emails/month) with paid volume plans.
# Resend CLI Agent Rules - For automated smoke tests, only send to `[email protected]` or team test addresses; NEVER email external users autonomously. - Use `RESEND_API_KEY` scoped with sending-only permissions where appropriate. - Background `resend webhooks listen` with an explicit timeout so it does not hang the session.
Agent-Ready Command Recipes
Safe Read-Only Queries
resend doctor --json
Verifies API key validity, configuration status, and connectivity without sending mail.
resend domains list --json
Returns configured sending domains and DNS verification status in JSON.
Controlled Writes & Previews
resend emails send --from [email protected] --to [email protected] --subject "Agent Smoke Test" --text "Hello" --json
Sends a smoke-test message strictly to Resend's [email protected] sink address.
Strengths for Agents
- + Auto-detects non-TTY pipes to output machine-readable JSON without extra boilerplate.
- + Built-in
resend webhooks listenenables local webhook testing without ngrok. - + Includes
resend doctorand supports Resend sink addresses ([email protected]) for safe verification.
Caveats & Pitfalls
- ! Sent emails to real external addresses cannot be recalled or dry-run.
- !
resend webhooks listenis a long-lived stream that blocks if run synchronously.