Install and sign in
mailly-cli brings inboxes, sending, templates, campaigns and agent drafts to your terminal and your agents.
mailly-cli wraps the Mailly HTTP API. Every command accepts --json, so agents and scripts can use it as easily as people.
Install
Requires Node.js 18+.
npm install -g mailly-cli
mailly --helpSign in
# Sign in through the browser (device-code flow)
mailly login
# Remote machines without a browser: print the authorization URL only
mailly login --no-browser
# CI: paste an API key instead
mailly login <api-key>
mailly whoami
mailly balanceCredentials
In order of precedence:
--api-key <key>- The
MAILLY_API_KEYenvironment variable ~/.mailly/config.json, written bymailly loginwith mode0600
--base-url / MAILLY_BASE_URL default to https://api.mailly.site.
Never put passwords, codes, tokens or API keys in agent chat or in committed files.
First commands
# List your inboxes and read what arrives
mailly inbox addresses list
mailly inbox threads list --json
mailly inbox threads show <thread-id> --json
# Send an email
mailly send \
--to friend@example.com \
--subject "Hello from Mailly" \
--from-email your-inbox@mailly.site \
--html "<p>It works!</p>" \
--text "It works!"JSON output
Success exits with 0; failure exits with 1 and prints {"success":false,"error":"..."}.
mailly balance --jsonAgent skill
The CLI skill teaches agents how to use the CLI: JSON output, waiting for verification codes, reply drafts and the full command reference. Setting up an inbox doesn't need it; that is covered by Let an agent set up an inbox.
mkdir -p ~/.claude/skills/mailly
curl -fsSL https://raw.githubusercontent.com/superagents-lab/mailly-cli/main/skills/mailly/SKILL.md \
-o ~/.claude/skills/mailly/SKILL.md