
resend/resend-cli
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
resend/resend-cli — это кандидат на навык агента, импортированный из https://github.com/resend/resend-cli.
Обзор
resend/resend-cli — это кандидат на навык агента, импортированный из https://github.com/resend/resend-cli.
Обзор (машинный перевод)
Официальный CLI для Resend.
Создано для людей, ИИ-агентов и CI/CD-конвейеров.
Установка
cURL
Node.js
Homebrew (macOS / Linux)
PowerShell (Windows)
Или скачайте .exe напрямую со страницы релизов на GitHub.
Быстрый старт
Навыки агента
Этот CLI поставляется с навыком агента, который обучает агентов кодирования ИИ (Cursor, Claude Code, Windsurf и др.) эффективному использованию Resend CLI, включая неинтерактивные флаги, форматы вывода и распространённые подводные камни.
Чтобы установить навыки для полной платформы Ressend (API, CLI, React Email, лучшие практики электронной почты) из центрального хранилища навыков:
Местное развитие
Используйте это, когда хотите изменить CLI и запускать сборку локально.
Требования
- Node.js 20+
Подготовка
-
Клонировать репо
-
Установка зависимости
-
Стройте локально
Выход: ./dist/cli.cjs
Локальное запуск CLI
Используйте скрипт разработки:
Или запустите собранный JS-пакет:
Изменения
После редактирования исходных файлов пересборка:
Построение нативных бинарностей
Чтобы построить автономный нативный бинарный файл:
Выход: ./dist/resend
Аутентификация
CLI разрешает ваш API-ключ с помощью следующей цепочки приоритетов:
Эта страница переведена автоматически. Технические детали смотрите в оригинале.
README
Показан фрагмент оригинального README. Открыть оригинал.
Resend CLI
The official CLI for Resend.
Built for humans, AI agents, and CI/CD pipelines.
██████╗ ███████╗███████╗███████╗███╗ ██╗██████╗
██╔══██╗██╔════╝██╔════╝██╔════╝████╗ ██║██╔══██╗
██████╔╝█████╗ ███████╗█████╗ ██╔██╗ ██║██║ ██║
██╔══██╗██╔══╝ ╚════██║██╔══╝ ██║╚██╗██║██║ ██║
██║ ██║███████╗███████║███████╗██║ ╚████║██████╔╝
╚═╝ ╚═╝╚══════╝╚══════╝╚══════╝╚═╝ ╚═══╝╚═════╝
Install
cURL
curl -fsSL https://resend.com/install.sh | bash
Node.js
npm install -g resend-cli
Homebrew (macOS / Linux)
brew install resend/cli/resend
PowerShell (Windows)
irm https://resend.com/install.ps1 | iex
Or download the .exe directly from the GitHub releases page.
Quickstart
# Authenticate
resend login
# Send an email
resend emails send \
--from "[email protected]" \
--to [email protected] \
--subject "Hello from Resend CLI" \
--text "Sent from my terminal."
# Check your environment
resend doctor
Agent skills
This CLI ships with an agent skill that teaches AI coding agents (Cursor, Claude Code, Windsurf, etc.) how to use the Resend CLI effectively, including non-interactive flags, output formats, and common pitfalls.
To install skills for Resend’s full platform (API, CLI, React Email, email best practices) from the central skills repository:
npx skills add resend/resend-skills
Local development
Use this when you want to change the CLI and run your build locally.
Prerequisites
- Node.js 20+
Setup
-
Clone the repo
git clone https://github.com/resend/resend-cli.git cd resend-cli -
Install dependencies
pnpm install -
Build locally
pnpm buildOutput:
./dist/cli.cjs
Running the CLI locally
Use the dev script:
pnpm dev --version
Or run the built JS bundle:
node dist/cli.cjs --version
Making changes
After editing source files, rebuild:
pnpm build
Building native binaries
To build a standalone native binary:
pnpm build:bin
Output: ./dist/resend
Authentication
The CLI resolves your API key using the following priority chain:
| Priority | Source | How to set |
|---|---|---|
| 1 (highest) | --api-key flag |
resend --api-key re_xxx emails send ... |
| 2 | RESEND_API_KEY env var |
export RESEND_API_KEY=re_xxx |
| 3 (lowest) | Config file | resend login |
If no key is found from any source, the CLI errors with code auth_error.
Commands
resend login
Рекомендуемые инструменты
Попробуйте другой запрос или уберите фильтр.
Установка
npx skillfish add resend/resend-cli