One command, fully set up. The CLI picks a provider, asks for credentials, optionally sets
defaults, and installs postboi if it isn’t already there.
What it does
- Prompts you to choose one of the supported providers.
- Collects that provider’s credentials (e.g. an API key, plus a domain for Mailgun).
- Optionally collects
from/toand other defaults applied to every send. - Writes only secrets (API keys, tokens) to your env file.
- Writes everything else — the provider, defaults, and non-secret options like a
Mailgun domain or SES region — to a committed
postboi.config.ts. - Installs
postboiif it isn’t installed yet.
The split means the best case (Resend, Postmark, SendGrid, Brevo, …) is a single env var — the API key — with the rest in version control.
After it finishes, mail() picks all of this up on every call — no further wiring needed.
Prefer to do it yourself?
Skip the CLI and write the config file plus the credential env vars by hand, or construct a provider instance directly. See Manual setup and Providers.