send0
CLI

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 --help

Commands

send0 init

Initialize send0 in your project. Creates a config file and starter templates.

npx send0 init

Creates:

  • send0.config.ts — configuration file
  • send0/templates/welcome.tsx — starter welcome template
  • send0/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_, or sk_restr_)
  • Stores the key in ~/.send0/credentials with chmod 600
  • Environment variable SEND0_API_KEY always takes priority if set

send0 whoami

Check your API key and workspace info.

npx send0 whoami

Shows 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>"
FlagRequiredDescription
--fromYesSender address
--toYesRecipient address
--subjectYesEmail subject
--htmlOne of --html or --textHTML body
--textOne of --html or --textPlain text body

send0 emails list

List recent emails from your workspace.

npx send0 emails list
npx send0 emails list --limit 5 --status delivered
FlagDefaultDescription
--limit10Number of emails to show
--statusFilter by status
--cursorPagination cursor

Domain commands

send0 domains add <domain>

Register a new sending domain.

npx send0 domains add acme.com

Prints 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_xxxx

Triggers 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+C to stop

Webhook commands

send0 webhooks test <id>

Fire a test webhook event to verify your endpoint.

npx send0 webhooks test wh_xxxx

Configuration file

// send0.config.ts
import { defineConfig } from 'send0';

export default defineConfig({
  templateDir: './send0/templates',
});