CLI Overview

The sevk CLI is the SDK, wrapped for your shell. Every command maps to the same resource methods the SDKs expose, which is convenient for shell scripting, CI/CD, and poking at the API without writing code.

What the CLI Is

Think of the CLI as an alternative surface on top of the sevk SDKs. Anything you can do with sevk.emails.send() in code, you can do with sevk emails sendfrom your terminal. It exists so you don't have to boot a runtime for one-off tasks: firing a deploy email from a pipeline, importing contacts from a CSV, kicking off a broadcast on a schedule.

If you'd rather write code, see the SDKs. The two are interchangeable.

Install

macOS / Linux
curl -fsSL https://sevk.io/install.sh | bash
Windows (PowerShell)
irm https://sevk.io/install.ps1 | iex
Homebrew
brew install sevk-io/tap/sevk
npm
npm install -g sevk-cli
bun
bun install -g sevk-cli

Log In

sevk login writes your API key to a config file under your home directory. Run it once per machine; profiles let you keep keys for several projects side by side.

# Interactive - paste the key when prompted
sevk login
# Non-interactive (useful for provisioning scripts)
sevk login --key sevk_full_xxxxxxxx
# Named profile
sevk login --key sevk_full_prodxxxx --profile production

First Send

sevk emails send \
--from "[email protected]" \
--subject "First send" \
--text "It worked."

Run sevk doctor if something looks off; it checks your key, the API connection, and your config file in one shot.

Auth Resolution

The CLI picks an API key from the first source that has one:

1. --api-key flag
2. SEVK_API_KEY environment variable
3. Active profile in ~/.config/sevk/credentials.json

To switch profiles, use sevk auth switch or pass --profile production on any command. SEVK_PROFILE works too.

Global Flags

sevk [global flags] <command> [command flags]
--api-key <key> Override API key for this invocation
-p, --profile <name> Named profile to use
--base-url <url> Custom API base URL
--json Emit JSON instead of formatted output
-q, --quiet Suppress spinners and prompts (implies --json)

TTY vs Pipe

The CLI detects whether stdout is a terminal. In a terminal you get tables, colors, spinners, and interactive prompts for missing flags. When output is piped or the CLI runs in CI, it drops colors and spinners, and missing required flags become errors instead of prompts so scripts fail fast. Pass --json (or --quiet) for JSON output you can parse. --json applies to the API-backed commands; the local markup commands emit their rendered output directly (sevk markup render prints HTML, sevk markup variables prints the variable list).

# TTY: pretty table
sevk domains list
# JSON, ready for jq
sevk domains list --json | jq '.[].domain'
# Force JSON in a terminal
sevk domains list --json