Email CLI Commands
CLI commands for managing email infrastructure.
Deploy and manage AWS SES email infrastructure with event tracking, analytics, and domain management.
Deploy new email infrastructure to your AWS account. This is the primary command for setting up Wraps email for the first time.
npx @wraps.dev/cli email init [options]-d, --domain <domain>Domain to configure for sending emails (e.g., yourdomain.com)
-r, --region <region>AWS region to deploy infrastructure (default: us-east-1)
--preset <preset>Configuration preset: starter, production, enterprise, or custom
-p, --provider <provider>Hosting provider: vercel, lambda, ecs, or ec2
--previewPreview infrastructure changes without deploying
Interactive setup (recommended for first time):
npx @wraps.dev/cli email initNon-interactive with all options:
npx @wraps.dev/cli email init --domain yourdomain.com --region us-west-2 --preset production --provider vercelDisplay detailed status for email infrastructure, including SES domains, verification status, and configuration details.
npx @wraps.dev/cli email statusManage domains in AWS SES. Add domains, list all configured domains, retrieve DKIM tokens, verify DNS records, and remove domains from SES.
Add a new domain to AWS SES with DKIM signing enabled.
npx @wraps.dev/cli email domains add -d <domain>-d, --domain <domain> (required) Domain name to addList all domains configured in AWS SES with their verification and DKIM status.
npx @wraps.dev/cli email domains listRetrieve DKIM tokens for a domain to configure DNS records.
npx @wraps.dev/cli email domains get-dkim -d <domain>-d, --domain <domain> (required) Domain name to get DKIM tokens forCheck the DNS verification status of a domain, including DKIM, SPF, and DMARC records.
npx @wraps.dev/cli email domains verify -d <domain>Remove a domain from AWS SES. This action cannot be undone.
npx @wraps.dev/cli email domains remove -d <domain>-d, --domain <domain> (required) Domain name to remove-f, --force Skip confirmation promptDeploy and manage inbound email receiving infrastructure. Receive emails at your domain, parse them automatically, and process with your application.
Deploy inbound email receiving infrastructure to your AWS account.
npx @wraps.dev/cli email inbound init [options]-d, --domain <domain> Domain to receive emails at-r, --region <region> AWS region (must support SES inbound)Display the status of inbound email infrastructure, including MX records and receipt rules.
npx @wraps.dev/cli email inbound statusSend a test email to verify your inbound configuration is working correctly.
npx @wraps.dev/cli email inbound test [options]Sends a test email to your configured inbound receiving domain. Accepts -r, --region and --json flags.
Check that DNS records for your inbound receiving domain(s) are correctly configured. Verifies MX records point to SES inbound SMTP and SPF records include amazonses.com. Also confirms the SES receipt rule set is active.
npx @wraps.dev/cli email inbound verify [options]-r, --region <region> AWS region to check--json Output result as JSONinbound-smtp.<region>.amazonaws.comamazonses.comAdd an additional receiving domain to your inbound email infrastructure. Requires inbound to already be deployed via wraps email inbound init. Updates the SES receipt rule and optionally auto-creates DNS records.
npx @wraps.dev/cli email inbound add [options]-d, --domain <domain> Parent domain for the new inbound subdomain--subdomain <name> Subdomain prefix (e.g., inbound, support)--root Use root domain instead of a subdomain-r, --region <region> AWS region (must support SES inbound)-y, --yes Skip confirmation promptsAdd a support subdomain interactively:
npx @wraps.dev/cli email inbound addAdd a specific subdomain non-interactively:
npx @wraps.dev/cli email inbound add --domain yourdomain.com --subdomain support --yesRemove an inbound receiving domain from SES receipt rules and metadata. Cannot remove the last domain — use wraps email inbound destroy to remove all inbound infrastructure instead.
npx @wraps.dev/cli email inbound remove [options]-d, --domain <domain> The receiving domain to remove (e.g., support.yourdomain.com)-r, --region <region> AWS region-y, --yes Skip confirmation promptRemove inbound email infrastructure. Stored emails in S3 will remain unless you delete the bucket manually.
npx @wraps.dev/cli email inbound destroy [options]-f, --force Skip confirmation promptConnect to existing AWS SES resources and add Wraps features non-destructively. Never modifies your existing SES setup.
npx @wraps.dev/cli email connect [options]--region <region>AWS region to scan for existing resources
--previewPreview infrastructure changes without deploying
wraps- prefixAdd additional features to your existing Wraps deployment. Upgrade from Starter to Production, or add individual features incrementally.
npx @wraps.dev/cli email upgrade [options]Synchronize local state with deployed infrastructure. Useful after CLI updates or manual AWS console changes.
npx @wraps.dev/cli email sync [options]Restore Wraps deployment from existing metadata. Useful if you've lost local configuration but infrastructure still exists in AWS.
npx @wraps.dev/cli email restore [options]Remove email infrastructure. Use this to remove only the email service while keeping other services intact.
npx @wraps.dev/cli email destroy [options]-f, --forceSkip confirmation prompt (use with caution)
--previewPreview what would be destroyed without making changes
Diagnose email infrastructure health by scanning your AWS account for all wraps-* resources and checking whether they are managed by a Pulumi stack or orphaned.
npx @wraps.dev/cli email doctor [options]-r, --region <region>AWS region to scan (auto-detected from metadata when omitted)
--cleanupInteractively delete orphaned wraps-* resources that have no Pulumi stack. Prompts for confirmation before deleting. If a Pulumi stack exists, suggests using wraps email destroy or wraps email upgrade instead.
--jsonOutput result as JSON
Scan for issues:
npx @wraps.dev/cli email doctorScan and clean up orphaned resources:
npx @wraps.dev/cli email doctor --cleanupSend a test email using the AWS SES mailbox simulator. Verify your email infrastructure is working without affecting your sender reputation.
npx @wraps.dev/cli email test [options]--to <email>Recipient email address (defaults to SES simulator address)
--scenario <type>Simulator scenario: bounce, complaint, or success
--jsonOutput result as JSON
Run a comprehensive deliverability audit on your domain. Checks all critical email authentication records and provides an overall deliverability score.
npx @wraps.dev/cli email check [options]--domain <domain>Domain to audit
-q, --quickQuick mode: check fewer DKIM selectors and only top blacklists
--verboseShow all checks including passing ones (e.g., full SPF lookup tree)
--dkimSelector <selector>Check a specific DKIM selector instead of scanning common ones. If omitted and a Wraps deployment exists, SES DKIM tokens are used automatically.
--skipBlacklistsSkip all blacklist checks entirely
--skipTlsSkip MX server TLS (STARTTLS) checks
--timeout <ms>DNS timeout in milliseconds
--jsonOutput result as JSON
Manage email templates as code. Initialize a templates directory, preview with hot-reload, and push compiled templates to SES and the Wraps dashboard.
Initialize a templates-as-code directory with an example template, configuration file, and brand file.
npx @wraps.dev/cli email templates initStart a local preview server with hot-reload for developing email templates. Defaults to port 3333.
npx @wraps.dev/cli email templates previewCompile and push templates to AWS SES and the Wraps dashboard.
npx @wraps.dev/cli email templates push [options]--template <name> Push a specific template by name--force Overwrite existing templates without confirmation--dry-run Preview what would be pushed without making changes--json Output result as JSONValidate and push email workflow definitions to the Wraps Platform.
Validate workflow definitions against the Wraps workflow schema. Catches errors before pushing to production.
npx @wraps.dev/cli email workflows validatePush workflow definitions to the Wraps Platform.
npx @wraps.dev/cli email workflows pushScaffold a workflows-as-code project with example workflow files and a configuration file. Creates a wraps/workflows/ directory in your current project with ready-to-edit examples.
npx @wraps.dev/cli workflow init [options]-y, --yesOverwrite existing example files without prompting
wraps/wraps.config.ts — Project configuration (org, from address, region)wraps/workflows/cart-recovery.ts — Cross-channel cascade example (email then SMS)wraps/workflows/welcome-sequence.ts — Welcome series with conditional branchingApply CLI configuration updates to deployed infrastructure. Syncs local configuration changes with your deployed AWS resources.
npx @wraps.dev/cli email config