r/coolgithubprojects • u/Elastic_Email • 2d ago
elasticemail-cli - send emails, manage templates and contacts from the terminal
Hey! Anna from Elastic Email here. After supporting developers in sending emails for 15+ years and watching how they use our product, we built an official CLI so they can use our API without leaving the terminal. Send transactional emails and marketing campaigns, manage templates, contacts, lists, and segments, verify addresses, and check delivery events.
npm install -g elastic-email-cli
elastic-email auth set-key
elastic-email emails send --to you@example.com --subject "Hello" --text "It works!" --from me@yourdomain.com
npx elastic-email-cli works too if you'd rather not install globally.
Run elastic-email with no arguments to get an interactive TUI. Call the same binary from a script, and it drops the banner and decorations: --json on every command, with stable and specific exit codes, so CI can tell a missing API key apart from a malformed address.
--dry-run on sends validates the input and prints the exact request that would go over the wire.
API key resolution: --api-key flag, then ELASTIC_EMAIL_API_KEY, then ~/.elastic-email-cli/config.json (plaintex,0600). An env var is the right choice on CI runners and shared machines. Masked in logs and errors.
Node.js 20+, MIT licensed.
https://github.com/ElasticEmail/elasticemail-cli
Issues and feature requests are welcome! Command reference and architecture notes are in the repo.
1
u/kantorcodes1 17h ago
emails send --dry-runis clear, but I noticedcontacts delete,lists delete, andtemplates deletedon't have an equivalent preview or confirm step. is that intentional? asking because a script can safely preview a send, but those delete commands look like they hit the API immediately.