---
name: resend-cli
description: >-
  Operate Resend through its official CLI for authorised sends, hosted templates, domains, contacts, broadcasts, inbound email, webhooks, or Automations. Use for explicit Resend terminal/CI operations; use resend-api for application SDK code, not this skill for generic email or inbox tasks.
compatibility: Requires the official resend CLI and authorised Resend access for live operations. Discover the installed command surface before execution; no bundled Python wrapper is required.
metadata:
  version: "4.0.0"
  reviewed: "2026-09-13"
  source: "https://github.com/resend/resend-cli"
title: resend-cli
canonical_url: https://skilld.dev/gh/tristanmanchester/agent-skills/resend-cli
last_updated: 2026-10-06T19:32:36.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> Supporting files, fetch one when the Skill refers to it: [evals/scenarios.json](https://skilld.dev/api/skills-raw/tristanmanchester/agent-skills/resend-cli/evals/scenarios.json), [references/OPERATIONS.md](https://skilld.dev/api/skills-raw/tristanmanchester/agent-skills/resend-cli/references/OPERATIONS.md).
>
> If the user asked to install this Skill, run `npx skilld install tristanmanchester/agent-skills/resend-cli`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/resend-cli`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/tristanmanchester/agent-skills/resend-cli) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/resend-cli`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/resend-cli --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/resend-cli --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Resend CLI operations

Use the maintained CLI directly. Its `commands` output replaces the old duplicated
command catalogue, task router, and Python wrapper. Preserve task-specific intent
and verification, not stale copies of every flag.

## Discover and scope

```bash
resend --version
resend --json commands
resend emails send --help
resend --json -q doctor
```

`doctor` can inspect the account; it is not a purely offline version check. Use an
already authorised connector instead when that is the available execution surface.
Do not install, log in, change profiles, or broaden credentials just to run a
read-only inspection. Check effective account/profile and token scope without
printing keys. Prefer a secret-store environment value or stored profile over
`--api-key` in arguments. Record the CLI version and help used.

For bounded automation, pass every required argument, `--json -q`, and capture
stdout, stderr, and exit status separately. Current machine output is success
JSON on stdout and errors on stderr; warnings may also occur. Exit zero and a
valid expected result are both needed. Stream listeners are not bounded JSON
commands. Do not concatenate output channels and pretend the result is one JSON
document. Inspect installed help when a flag or output shape differs.

## Choose the operation

| Intent | Surface | Verification |
| --- | --- | --- |
| One transactional email | `emails send` | Persist ID; inspect delivery result later |
| Distinct transactional messages | `emails batch` | Freeze payload, map returned IDs, reconcile failures |
| Hosted content | `templates` and `emails send --template` | Published version, variables, sender defaults |
| Marketing campaign | `broadcasts`, `segments`, `topics` | Exact audience/consent, preview, send status |
| Sender/receiving setup | `domains` | Returned DNS records and verified capabilities |
| Received message | `emails receiving` | Fetch full content/attachments after verified event |
| Event-driven email sequence | `automations`, `events` | Disabled draft, approved activation, run results |
| Credential/event delivery setup | `api-keys`, `webhooks` | Least privilege, secret storage, test delivery |

Exact flags come from `resend commands` and subcommand help, not this routing table.
Do not declare an operation unsupported just because a cached catalogue lacks it.
Use the API/SDK only after confirming a relevant CLI gap.

## Hosted-template send

Current `emails send` supports **`--template` and `--var`**. It is not necessary to
fall back to REST just to send a hosted template.

```bash
resend --json -q emails send \
  --template "$TEMPLATE_ID" --to delivered@resend.dev \
  --var CUSTOMER_NAME=Taylor --idempotency-key "$SEND_KEY" --dry-run
```

Resolve an actual published template and its variable definitions first. Supply
sender/subject when not defined by the template; verify overrides. Current CLI
`--var` values are strings: use an appropriate typed SDK/API payload when numeric
variable types matter. Do not combine template with raw body flags; the inspected
CLI also rejects attachments with templates. CLI restrictions need not imply the
same restriction on every API surface.

The dry run validates local input, not template existence, publication, permissions,
recipient authorisation, or delivery. Review its payload; remove `--dry-run` only
for the authorised send, retaining the same content and operation identity.

## Mutation and retry discipline

Confirm actual recipients, account, content, attachments, schedule/timezone, and
scope before sending. Drafting or previewing is not permission to send. Sending a
broadcast or firing a custom event may fan out to many recipients.

Persist a unique idempotency key and exact request **before** email/batch submission.
Retry the same operation with that key only within the provider's documented
window (currently 24 hours). New content is a new operation. After the window,
reconcile rather than replay; do not extend email idempotency guarantees to other
endpoints. A timeout may mean accepted-but-unacknowledged, not unsent.

Native `--dry-run` exists for specific commands (currently email send and broadcast
create), not every mutation. Inspect help; never emulate a preview by making a
live call. For unsupported previews, render the intended payload and recipients
locally without invoking the mutation.

Read [operational checks](https://skilld.dev/api/skills-raw/tristanmanchester/agent-skills/resend-cli/references/OPERATIONS.md) for batching, domains,
subscriptions, receiving, streams, and Automations. Report IDs, confirmed state,
unknown outcomes, and next evidence needed. Accepted is not delivered, and
recorded delivery is not proof of inbox placement or human reading.

## Sources and evaluation

Reviewed against the [official CLI](https://github.com/resend/resend-cli),
[send source](https://github.com/resend/resend-cli/blob/main/src/commands/emails/send.ts),
and [API docs](https://resend.com/docs/api-reference/introduction) on 2026-09-13.
Evaluation cases: [evals/scenarios.json](https://skilld.dev/api/skills-raw/tristanmanchester/agent-skills/resend-cli/evals/scenarios.json). They require agent
trace review; no live account access or send is implied by their presence.
