myagentmail-cli
v0.3.0
Published
Command-line interface for MyAgentMail. Provision inboxes, run LinkedIn intent signals, tunnel inbox events to localhost (Stripe-style), and drive every API surface from a shell or an agent loop. Token-economical alternative to the MCP server for long age
Downloads
57
Maintainers
Readme
myagentmail-cli
Command-line interface for MyAgentMail — provision inboxes, run LinkedIn intent signals, tunnel webhook events to localhost, and drive every API surface from a shell or an agent loop.
Why a CLI when there's an MCP server?
The MCP server is great inside Claude Desktop, Cursor, Windsurf, and Cline — the host loads its tool schemas eagerly into context and the agent gets typed function calls.
The CLI is the right surface in every other context:
- Long agent sessions (Claude Code, terminal-based agents) where MCP's
tool-schema tax compounds across hundreds of turns. The CLI's surface is
discovered lazily through
--helpinstead. - CI runners and shell scripts where MCP isn't available at all.
- Local-dev workflows where you want to forward production webhook events to your localhost handler without ngrok.
Both surfaces share auth (one credentials file, one API key), so you don't pick once forever — you pick per task.
Install
npm install -g myagentmail-cli
# or
npx myagentmail-cli --helpThe binary is published as both myagentmail and mam.
Auth
The default login flow is a Stripe-style browser handshake. No copy-pasting API keys.
myagentmail login
# Opens https://myagentmail.com/cli/auth?code=W3K-Q9T-LMP in your
# default browser. Click Approve in the dashboard. The CLI receives
# the key directly and writes it to ~/.config/myagentmail/credentials
# (mode 0600). The key never appears in the browser tab.Other paths:
# CI / scripts — skip the browser entirely.
myagentmail login --api-key tk_...
# Headless terminal — interactive paste fallback.
myagentmail login --paste
# Or just set the env var; every command honors it.
export MYAGENTMAIL_KEY=tk_…
myagentmail whoamiSign out with myagentmail logout (removes the credentials file).
Commands
# Sanity
myagentmail whoami
myagentmail doctor # full read-only health-check matrix
# Inboxes
myagentmail inboxes list
myagentmail inboxes create --username scout --display-name "Scout Bot"
myagentmail inboxes send <id> --to [email protected] --subject hi --body "hello"
myagentmail inboxes delete <id>
# LinkedIn signals
myagentmail linkedin signals list
myagentmail linkedin signals run <id>
myagentmail linkedin signals matches <id> --limit 20
myagentmail linkedin signals deliveries <id>
myagentmail linkedin signals test-webhook <id>
# Live event surfaces
myagentmail listen --inbox <id> --forward http://localhost:3000/webhook
myagentmail tail <id> # one JSON line per event
# MCP server tooling (delegates to npx myagentmail-mcp)
myagentmail mcp install-skill # ./.claude/skills/myagentmail/
myagentmail mcp install-skill --global # ~/.claude/skills/myagentmail/Every command supports --json to emit structured output for piping to jq.
The listen killer feature
stripe listen --forward-to ... is widely cited as the killer dev affordance
of Stripe's CLI. We do the same for inbox events:
myagentmail listen --inbox $INBOX_ID --forward http://localhost:3000/webhookThe CLI opens a WebSocket to wss://myagentmail.com/v1/ws?inboxId=…, then
POSTs every event to your local URL with the same shape your production
webhook handler will receive. No ngrok, no public URL. Reconnect with
exponential backoff if the connection drops.
License
MIT
