Official beta CLI for the PostMX email testing API.
- Interactive inbox browser for development and debugging
- Scriptable terminal commands for CI and local workflows
- Message inspection with OTP, links, and text-only views
- Secure local credential storage when your OS keychain is available
Requires Node.js 18+.
npm install -g postmx-cliThe installed command is:
postmx --helppostmx login
postmx inbox create --label signup-test --lifecycle temporary --ttl 15
postmx inbox wait inb_abc123 --timeout 30
postmx message get msg_abc123 --content-mode otpIn interactive mode, creating an inbox now drops you straight into the live watch screen so you can wait for mail immediately.
Use POSTMX_API_KEY as the default auth path for automation:
export POSTMX_API_KEY=pmx_live_...For LLMs, coding agents, and CI jobs, prefer --agent. It forces JSON envelopes, disables prompts and TUI flows, and avoids browser-assisted login paths.
npx postmx-cli inbox create --label signup-test --agent
npx postmx-cli inbox wait inb_abc123 --agent
npx postmx-cli message get msg_abc123 --content-mode otp --agentIf you want JSON without the stricter agent defaults, use --output json or --json.
Agents can also discover the CLI contract directly:
postmx help --json
postmx version --jsonpostmx -i
postmx auth logout
postmx auth login --api-key pmx_live_...
postmx inbox list-msg inb_abc123 --limit 20
postmx messages list --recipient-email signup-test@postmx.email
postmx webhook create --label app-events --target-url https://example.com/webhooks/postmx- npm package name:
postmx-cli - installed executable:
postmx --agentimplies JSON output, no prompts, no browser flow, and no interactive mode- Homebrew support should only be documented publicly after the
postmxformula is live
MIT