@esaart/posta-cli
v0.2.0
Published
Command-line client for the POSTA email API.
Maintainers
Readme
@esaart/posta-cli
Command-line client for the POSTA email API. Zero dependencies (Node 18+).
npm install -g @esaart/posta-cli
# or run ad-hoc:
npx @esaart/posta-cli helpAuth
export POSTA_API_KEY=pa_xxxxxxxx
export POSTA_BASE_URL=https://posta.esaart.studio # optional; this is the defaultCommands
posta send
posta send --from "App <[email protected]>" --to [email protected] \
--subject "Hi" --html "<p>Hello</p>"Flags: --from --to (comma-separate for multiple) --subject --html --text
--template <slug> --var key=value (repeatable) --reply-to
--header key=value (repeatable) --attach <file> (repeatable; base64-encoded
automatically) --idempotency-key <k> --send-at <iso8601>.
posta send --from "App <[email protected]>" --to [email protected],[email protected] \
--template welcome --var name=Alex \
--attach ./receipt.pdf --header X-Entity-Ref-ID=order_123 \
--idempotency-key order_123 --send-at 2026-06-20T09:00:00Zposta batch --file <emails.json>
Sends up to 100 emails. The file is a JSON array (or { "emails": [...] }) of
objects using API field names (from, to, subject, html/text/template,
reply_to, headers, attachments, …).
posta validate
posta validate --email [email protected]
posta validate --emails [email protected],[email protected]posta list [--limit <n>]
Lists recent emails for the key's project.
Exit codes
0 on success, 1 on error (the API error message is printed to stderr).
