Note: Resend now provides an official CLI. This project will no longer be the primary place for new CLI work; please use the official CLI instead (https://github.com/resend/resend-cli). I’ll be contributing to the official project going forward.
Unofficial CLI for Resend
- Full API coverage: emails, domains, contacts, broadcasts, webhooks, keys, segments, topics, templates
- Script & CI ready:
--json, pagination, consistent exit codes - Flexible auth: named keys,
RESEND_API_KEY, completions - Agent-friendly: behavior contract for deterministic output
npm (Node.js required):
npm install -g @shubhdeep12/resend-cliThen run resend --version to verify.
macOS / Linux (standalone binary, no Node required):
curl -fsSL https://raw.githubusercontent.com/Shubhdeep12/resend-cli/main/scripts/install.sh | bashThe script installs to /usr/local/bin (if writable) or ~/.local/bin. Then run resend --version. If resend isn’t found, add the printed directory to your PATH.
Windows (PowerShell, standalone binary):
irm https://raw.githubusercontent.com/Shubhdeep12/resend-cli/main/scripts/install.ps1 | iexThe script installs to %LOCALAPPDATA%\Programs\resend-cli and adds it to your user PATH. Restart the terminal, then run resend --version.
Manual: Download the latest binary for your OS/arch, extract, and run the executable.
# Authenticate once
resend auth login
# Send an email
resend emails send --from "you@yourdomain.com" --to "user@example.com" --subject "Hi" --html "<p>Hello!</p>"
# List recent emails as JSON
resend emails list --json --limit 5
# Use an env var instead of login
RESEND_API_KEY="re_xxx" resend emails list --jsonThe CLI needs a Resend API key. It is resolved in this order:
RESEND_API_KEY— Set in the environment or in a.envfile in the current working directory. If set, this is always used.- Saved key — From
resend auth login(orresend auth select). Used only whenRESEND_API_KEYis not set.
So: env (or .env) overrides saved keys. Put RESEND_API_KEY=re_xxx in .env or export it; run from the directory that contains .env if you use a file.
See CONTRIBUTING.md for development setup, testing, and release workflow.
MIT © Shubhdeep