PitchHut logo
A powerful CLI for managing Resend emails and more.
Pitch

Resend CLI provides full API coverage for emails, domains, contacts, and more with a user-friendly command-line interface. It is script and CI ready, offers flexible authentication, and ensures deterministic output. Seamlessly integrate Resend's features into workflows with easy installation and usage.

Description

Resend CLI

Resend CLI serves as an unofficial command-line interface for Resend, allowing users to interact with a diverse range of features efficiently.

Key Features

  • Comprehensive API Coverage: Manage emails, domains, contacts, broadcasts, webhooks, keys, segments, topics, and templates seamlessly.
  • Script and CI Ready: Built to integrate smoothly with scripts, it supports --json, pagination, and consistent exit codes for automation.
  • Flexible Authentication: Options include using named keys and the RESEND_API_KEY environment variable, along with completion functionalities for ease of use.
  • Agent-Friendly Design: Adheres to a behavior contract for predictable outputs.

Quick Start Example

  1. Authenticate the CLI:
    resend auth login
    
  2. Send an email:
    resend emails send --from "you@yourdomain.com" --to "user@example.com" --subject "Hi" --html "<p>Hello!</p>"
    
  3. List recent emails in JSON format:
    resend emails list --json --limit 5
    
  4. Alternatively, use an environmental variable for authentication:
    RESEND_API_KEY="re_xxx" resend emails list --json
    

Authentication

The CLI requires a Resend API key, which can be set in one of two ways:

  1. Environment Variable: Set the RESEND_API_KEY in the environment or .env file, which takes precedence.
  2. Saved Key: Use a key saved from resend auth login if the environment variable is not set.

For detailed command usage, refer to the Commands documentation and explore the Agents section for more features.

Contributors can find guidelines in the CONTRIBUTING.md file.

0 comments

No comments yet.

Sign in to be the first to comment.