@sendmux/cli
v1.0.1
Published
[](https://www.npmjs.com/package/@sendmux/cli) [](https://github.com/Sendmux/sendmux-sdk/actions/workflows/ci.yml) [
Readme
@sendmux/cli
Agent-drivable command line interface for Sendmux.
Documentation
- Sendmux docs: docs.sendmux.ai
- Management API reference: docs.sendmux.ai/api/introduction
- Mailbox API reference: docs.sendmux.ai/mailbox-api/introduction
- Sending API reference: docs.sendmux.ai/sending-api/introduction
- Source repository: Sendmux/sendmux-sdk
Requirements
- npm global installs,
npx, or a downloaded release tarball. - A root
smx_root_*key for Management commands. - A mailbox-scoped
smx_mbx_*key for Mailbox and Sending commands.
Installation
npm install -g @sendmux/cliThe package exposes the sendmux binary.
Usage
Create profiles for each key type before running API commands.
sendmux profiles:set default --api-key smx_root_... --default
sendmux profiles:set mailbox --api-key smx_mbx_...
sendmux profiles:set sending --api-key smx_mbx_...Run commands with --json for machine-readable output.
sendmux management:domains:list --profile default --json
sendmux mailbox:messages:list --profile mailbox --query limit=25 --json
sendmux sending:send --profile sending --body '{"from":{"email":"[email protected]"},"to":{"email":"[email protected]"},"subject":"Hello","html_body":"<p>Hello.</p>","text_body":"Hello"}' --jsonCommands reject mismatched key types before making a network request.
Commands
The CLI includes 95 generated API operation commands:
40Mailbox commands, includingmailbox:messages:list,mailbox:messages:get,mailbox:send-message, andmailbox:list-granted-mailboxes.52Management commands, includingmanagement:domains:list,management:create-mailbox,management:get-spend-summary, andmanagement:create-webhook.3Sending commands:sending:get-open-api-spec,sending:send, andsending:send:batch.- Profile commands:
profiles:list,profiles:set, andprofiles:show.
Use command-level help for required path, query, header, and body fields.
sendmux management:domains:get --help
sendmux sending:send --helpGlobal API flags
Operation commands support:
--api-key--base-url--profile/-p--body--body-file--header--idempotency-key--if-match--if-none-match--path--query--json
--path, --query, and --header use name=value syntax and can be repeated when the operation accepts multiple values.
Support
Open an issue in Sendmux/sendmux-sdk with the CLI version, command, flags, and request ID from any API error.
Licence
MIT. See the licence file.
