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 dev

Start the local development server with inbox UI at http://localhost:2525.

npx send0 dev
npx send0 dev --port 3001
  • Captures all emails sent via the SDK in dev mode
  • Beautiful inbox UI with email preview (desktop + mobile), text view, HTML source, and headers
  • Real-time updates (polls every 500ms)
  • No real emails sent — everything stays local

send0 preview <template>

Preview a template in the browser with live reload.

npx send0 preview welcome
  • Opens template preview in browser
  • Watches for file changes and auto-reloads
  • Test with sample data

send0 push

Push local templates to your send0 account.

SEND0_API_KEY=sk_live_... npx send0 push
  • Reads all templates from your configured template directory
  • Creates or updates templates on the server
  • Requires SEND0_API_KEY environment variable

send0 pull

Pull templates from your send0 account to local files.

SEND0_API_KEY=sk_live_... npx send0 pull
  • Downloads all templates from your account
  • Generates TSX files in your template directory

send0 validate

Validate all local templates. CI-friendly — exits with code 1 on errors.

npx send0 validate

Checks for:

  • Default export exists
  • send0/components import present
  • Template component usage
  • No email-unsafe patterns (e.g., position: fixed, JavaScript)

send0 whoami

Check your API key and workspace info.

SEND0_API_KEY=sk_live_... npx send0 whoami

Configuration file

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

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