CLI
Developer CLI for local development, template management, and more.
Installation
The CLI is included with the SDK package. No separate install required.
npm install send0
npx send0 --helpCommands
send0 init
Initialize send0 in your project. Creates a config file and starter templates.
npx send0 initCreates:
send0.config.ts— configuration filesend0/templates/welcome.tsx— starter welcome templatesend0/templates/reset-password.tsx— starter reset password template
send0 login
Save your API key to ~/.send0/credentials for persistent authentication. Avoids needing SEND0_API_KEY in every command.
npx send0 login- Prompts for your API key interactively
- Validates the key prefix (
sk_live_,sk_test_, orsk_restr_) - Stores the key in
~/.send0/credentialswithchmod 600 - Environment variable
SEND0_API_KEYalways takes priority if set
send0 whoami
Check your API key and workspace info.
npx send0 whoamiShows your masked API key and mode (live, test, or restricted).
Email commands
send0 emails send
Send a single email from the CLI.
npx send0 emails send \
--from "hello@acme.com" \
--to "user@example.com" \
--subject "Hello" \
--html "<p>Hello from the CLI</p>"| Flag | Required | Description |
|---|---|---|
--from | Yes | Sender address |
--to | Yes | Recipient address |
--subject | Yes | Email subject |
--html | One of --html or --text | HTML body |
--text | One of --html or --text | Plain text body |
send0 emails list
List recent emails from your workspace.
npx send0 emails list
npx send0 emails list --limit 5 --status delivered| Flag | Default | Description |
|---|---|---|
--limit | 10 | Number of emails to show |
--status | — | Filter by status |
--cursor | — | Pagination cursor |
Domain commands
send0 domains add <domain>
Register a new sending domain.
npx send0 domains add acme.comPrints the DNS records you need to configure with your DNS provider.
send0 domains verify <id>
Verify a domain's DNS records.
npx send0 domains verify dom_xxxxTriggers DNS verification and shows the health status (DKIM, SPF, DMARC).
Event commands
send0 events tail
Tail live events from your workspace. Polls every 2 seconds.
npx send0 events tail
npx send0 events tail --limit 20- Color-coded by event type (green = delivered, red = bounced/failed, cyan = opened/clicked)
- Press
Ctrl+Cto stop
Webhook commands
send0 webhooks test <id>
Fire a test webhook event to verify your endpoint.
npx send0 webhooks test wh_xxxxConfiguration file
// send0.config.ts
import { defineConfig } from 'send0';
export default defineConfig({
templateDir: './send0/templates',
});