Skip to main content
@senderkit/cli is a single-binary senderkit command that sends notifications, lists templates, and inspects message history from your terminal. It wraps the same REST surface as the TypeScript SDK and bundles the MCP server.

Install

Requires Node.js 18 or newer. After installing, verify it’s on your path:

Authenticate

Every command (except --help and --version) needs an API key. The CLI looks in three places, in this order:
  1. The --api-key <key> flag on the command.
  2. The SENDERKIT_API_KEY environment variable.
  3. ~/.senderkit/config.json — populated by senderkit login or senderkit config set apiKey ….
For interactive setup, login is the easiest path. It prompts, verifies the key against the API by listing your templates, and saves it with 0600 permissions:
For non-interactive setup (CI provisioning, dotfiles), set the value directly:
Or pass it inline for one-off scripts:
Mode (live vs test) is encoded in the key prefix — sk_live_… sends real mail; sk_test_… synthesizes the full lifecycle without leaving the building. See Environments.

Global flags

These work on every command and resolve before the subcommand runs.
API key. Overrides SENDERKIT_API_KEY and ~/.senderkit/config.json.
Override the API base URL. Also resolvable via SENDERKIT_BASE_URL or senderkit config set baseUrl …. Useful for staging environments and self-hosted deployments.
Print the raw JSON response instead of human-readable text. The shape matches the REST response for the underlying endpoint, so it pipes cleanly into jq or a downstream script.
Print the CLI version and exit.
Print contextual help. Works at any level — senderkit --help, senderkit messages list --help.

Managing config

~/.senderkit/config.json stores apiKey and baseUrl. Three subcommands manage it:
The file is written with 0600 permissions so other users on the machine can’t read your key.

Output and exit codes

The CLI is built for both humans and pipelines:
  • Human mode (default) prints aligned tables for list commands and key: value blocks for object responses, with a green on successful sends.
  • JSON mode (--json) prints the raw SDK response — same shape as the REST API.
  • Exit codes: 0 on success, 1 on any error (auth failure, validation, rate limit, network, anything else). Errors print to stderr; results print to stdout, so you can pipe results without losing error visibility.

Utility commands

senderkit context

Report the connected workspace and the active send mode:
Fetches GET /v1/context so the result is authoritative and workspace-aware. Add --json to get { workspace: { id, slug, name }, mode } as structured output.

MCP server

The CLI also bundles the SenderKit MCP server, exposed as senderkit mcp and senderkit mcp install. That surface is documented separately — see MCP Server.

send

Fire a template or raw send from the terminal.

templates

List and inspect templates by slug.

messages

Query message history and filter by status, channel, or template.

MCP Server

Hand the same operations to Claude, Cursor, and other AI clients.