Use when a user wants Sendmux terminal commands for agent inbox registration, owner invites, profiles, key-scope preflight, JSON output, or Management, Mailbox, and Sending operations.
Use when a user wants Sendmux terminal commands for agent inbox registration, owner invites, profiles, key-scope preflight, JSON output, or Management, Mailbox, and Sending operations.
license
Apache-2.0
metadata
{"author":"sendmux","version":"1.0"}
Sendmux CLI
Use this skill when the terminal is the right Sendmux surface.
Boundaries
Do not ask the user to paste API keys.
Use smx_root_ keys only for management:* commands.
Use smx_mbx_ keys or scoped smx_agent_ tokens for mailbox:* commands.
Durable agent profiles can read and receive mail while active, but cannot send until an invited owner accepts and approves sending.
After owner approval, sending:* commands with an agent profile automatically exchange and cache a one-hour delegated token.
Do not run destructive commands without explicit confirmation.
Use --json for agent-readable output.
Prefer task-specific Sendmux skills when the user needs strategy; use this skill for exact CLI mechanics.
Install
npm install -g @sendmux/cli
sendmux --help
The package exposes the sendmux binary.
Agent inbox onboarding
No existing Sendmux account or API key is required:
The CLI persists registration idempotency before the network request, stores the durable credential in the local profile with restricted permissions, never prints it, reloads it from disk, and waits up to 10 minutes for readiness. Rerun registration with the same profile and options to resume safely.
Read/receive access has no expiry date while the registration remains active. Sending remains blocked until the owner accepts and approves it. After approval, a command such as sending:send --profile my-agent automatically exchanges the durable credential for a one-hour email.send token and caches it until near expiry. Full registration revocation removes read access and every delegated token.
The inbox is capped at 500 MiB before approval. Enabling owner-approved sending first raises it to at least 5 GiB. Revoking sending does not itself change the current inbox storage allocation.
Profiles
Create separate profiles for root and mailbox keys.
Profile reads mask stored API keys and never reveal agent credentials. profiles:set reports key_kind as root or mailbox; agent:register creates a discriminated agent profile.
Authentication resolution:
--api-key, then SENDMUX_API_KEY.
If no direct key is present, --profile / -p, then SENDMUX_PROFILE, then the configured default profile.
Base URL comes from --base-url, then SENDMUX_BASE_URL, then the selected profile.
Preflight
The CLI infers key kind from the prefix before sending a request.
Command surface
Required key
management:*
smx_root_
mailbox:*
smx_mbx_ or scoped smx_agent_
sending:*
Send-capable smx_mbx_ key or owner-approved Sending-resource smx_agent_ token
For an agent profile, mailbox:* uses the durable read credential. sending:* obtains a delegated token only after owner approval. management:* rejects agent profiles before the request.
Wrong-key examples fail before network:
Command requires a root API key, but --api-key contains a mailbox API key.
Command requires a send-capable `smx_mbx_` key or owner-approved Sending-resource `smx_agent_` token, but --api-key contains a root API key.
Mailbox attachment upload commands share the 7,500,000 byte per-attachment cap. For larger files, split the file or host it externally and send a link.