CLI

Create disposable inboxes and wait for verification codes from a terminal, a script, or an agent's shell. Requires Node.js 22.18 or newer.

Sign in

terminal
npx @smails/cli login

It prints a link (and opens your browser): sign in with GitHub and confirm the code. The session is saved in ~/.config/smails/credentials.json and shared with the local MCP server.

Get a code

terminal
smails create                       # → brave-otter-k3j9x2m8@smails.dev
smails wait --subject code --timeout 300
smails wait --json | jq -r .text     # in scripts

wait returns as soon as a matching message arrives and prints it in full. It exits with status 2 if nothing arrives before the timeout.

Commands

  • login, logout, whoami — account and today's quota
  • create — new mailbox; it becomes the current one
  • list — your active mailboxes
  • inbox [address] — messages in a mailbox (default: current)
  • read <id> — one message; a short id prefix works
  • wait [address] --from x --subject y --timeout s — wait for new mail
  • delete <id> — delete a message
  • mcp — run the MCP server over stdio (see MCP)

Add --json to any command for machine-readable output. Install it globally with npm i -g @smails/cli to type smails instead of npx @smails/cli.