The Resend CLI is the official command-line interface for interacting with the Resend email API. It allows developers, AI agents, and CI/CD pipelines to manage and send emails directly from the terminal. The current stable version is 2.2.1, with frequent minor and patch releases, indicating active development and continuous feature additions. Key differentiators include its multi-platform installation methods (npm, cURL, Homebrew, PowerShell), built-in 'agent skill' support for AI coding agents, and robust authentication mechanisms. It provides commands for common tasks such as sending emails, managing domains, and checking the environment, aiming to streamline email operations programmatically and interactively.
npm install resend-cliVerified import paths — ran on the pinned version, not inferred.
Demonstrates authenticating the CLI, sending a basic text email, and checking the local environment configuration.
Review the changelog for v2.0.0 and update CLI commands/scripts to conform to the new API. Re-test any automated workflows.
Always explicitly use the `--api-key` flag for highest precedence, or ensure the `RESEND_API_KEY` environment variable is set correctly. Use `resend login` for local configuration as a fallback.
For non-interactive logins, use `resend login --key re_xxxxxxxxxxxxx` to provide the API key directly.
Upgrade your Node.js installation to version 20 or newer using a version manager like `nvm` or `fnm`.
Upgrade to `resend-cli` version 1.10.0 or newer immediately to mitigate potential terminal output injection risks.
Run `resend login` to store your API key, or export `RESEND_API_KEY=re_xxx` in your environment, or pass it via `--api-key re_xxx` flag.
Use `resend login --key re_xxxxxxxxxxxxx` to provide the API key when not in an interactive terminal.