@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
Authenticate
Every command (except--help and --version) needs an API key. The CLI looks
in three places, in this order:
- The
--api-key <key>flag on the command. - The
SENDERKIT_API_KEYenvironment variable. ~/.senderkit/config.json— populated bysenderkit loginorsenderkit config set apiKey ….
login is the easiest path. It prompts, verifies the
key against the API by listing your templates, and saves it with 0600
permissions:
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 <key>
API key. Overrides
SENDERKIT_API_KEY and ~/.senderkit/config.json.--base-url <url>
Override the API base URL. Also resolvable via
SENDERKIT_BASE_URL or
senderkit config set baseUrl …. Useful for staging environments and
self-hosted deployments.--json
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.--version
Print the CLI version and exit.
--help
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:
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: valueblocks 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:
0on success,1on any error (auth failure, validation, rate limit, network, anything else). Errors print tostderr; results print tostdout, so you can pipe results without losing error visibility.
Utility commands
senderkit context
Report the connected workspace and the active send mode:
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 assenderkit 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.