# resend
> Send and manage transactional emails from the terminal

## Summary
Official Resend CLI — send transactional emails, manage domains, API keys, audiences, and contacts from the terminal. Built for humans, AI agents, and CI/CD.

## Capabilities
- Send emails with plain text, HTML, or HTML file content
- Manage domains, API keys, audiences, and contacts
- Multi-profile support for switching accounts/teams
- Environment diagnostics via doctor command
- Automatic JSON output in piped/non-interactive contexts
- CC, BCC, and reply-to support
- AI agent detection and integration

## When to Use
- You need to send transactional emails from the terminal or scripts
- You want to manage Resend resources without the dashboard
- You need email sending in CI/CD pipelines

## When NOT to Use
- You don't have a Resend account or API key
- You need bulk marketing email campaigns

## Key Flags
- `--api-key`: Resend API key (overrides config)
- `--json`: Force JSON output
- `--from`: Sender email address
- `--to`: Recipient email address
- `--subject`: Email subject line

## Usage Patterns
### Send an email
```
resend emails send --from me@example.com --to user@example.com --subject 'Hello' --text 'Hi there'
```
Send a plain text email

### Send HTML email from file
```
resend emails send --from me@example.com --to user@example.com --subject 'Report' --html report.html
```
Send an email with HTML content from a file

### Run diagnostics
```
resend doctor
```
Check CLI version, API key, domains, and agent integrations

### Switch profile
```
resend auth switch
```
Switch between saved account profiles

## Input / Output
- **stdout**: Command results, JSON in piped contexts

## Installation
- **shell**: `curl -fsSL https://resend.com/install.sh | bash`
- **homebrew**: `brew install resend/cli/resend`
- **npm**: `npm install -g resend-cli`

---
Source: https://littlescripts.sh/tools/resend-cli
