sendry-cli
v0.1.0
Published
Official command-line interface for the Sendry email API
Downloads
112
Maintainers
Readme
Sendry CLI
Official command-line interface for the Sendry email API. Send transactional and marketing email, manage domains, contacts, campaigns, webhooks, and more — from your terminal.
Install
npm install -g sendry-cli
# or
bun add -g sendry-cliAfter installation, the sendry binary is on your PATH.
Authenticate
Run sendry login once to save an API key locally. The CLI stores it via the
conf package (under your OS config
directory, e.g. ~/Library/Application Support/sendry-nodejs/ on macOS).
sendry login
# Sendry API key: sn_live_...
sendry whoami
# API key: sn_live_abc1…
# Source: configYou can also skip the prompt by passing the key directly, or by exporting an environment variable (env always wins over the saved key):
sendry login --api-key "$SENDRY_API_KEY"
export SENDRY_API_KEY=sn_live_abc123
sendry emails list --limit 5Log out (deletes the saved key):
sendry logoutOutput format
By default the CLI prints human-readable tables. Pass --json to emit the raw
SDK response (suitable for piping to jq):
sendry domains list --json | jq '.data[] | select(.status == "verified") | .name'Common commands
# Send a transactional email
sendry emails send \
--from "[email protected]" \
--to "[email protected]" \
--subject "Welcome" \
--html "<h1>Hi there</h1>"
# Or read the HTML body from a file
sendry emails send \
--from "[email protected]" \
--to "[email protected]" \
--subject "Welcome" \
--from-file ./welcome.html
# List the latest 25 emails
sendry emails list --limit 25
# Domains
sendry domains list
sendry domains create example.com
sendry domains verify dom_abc123
# Contacts (upsert is idempotent — creates or updates by email)
sendry contacts upsert --email [email protected] --first-name Jane --last-name Doe
sendry contacts list --audience aud_abc123
# Campaigns
sendry campaigns list
sendry campaigns send cp_abc123
# API keys
sendry apikeys list
sendry apikeys create "CI key" --scope sending_access
# Webhooks
sendry webhooks list
# Analytics
sendry analytics overview --days 30 --domain dom_abc123For the full list, run sendry --help or sendry <group> --help.
License
Apache-2.0
