DEV Community

Cover image for Sendmux CLI: email inbox API in your terminal
Roshan Jonnalagadda
Roshan Jonnalagadda

Posted on

Sendmux CLI: email inbox API in your terminal

Install Sendmux CLI

A lot of agent email testing starts with the same awkward loop: send a message, refresh a dashboard, copy JSON, then guess what your agent will see.

Sendmux CLI cuts that loop down to the terminal.

It gives developers and AI agents direct access to Sendmux: an email inbox API for AI agents and SaaS platforms. You can create and manage mailboxes, search inbound mail, send email, inspect API responses, and script the same workflows your app or agent will run later.

If your AI agent needs to receive email, triage messages, search an inbox, reply to a thread, or send outbound mail through a controlled email sending API, the CLI is the fastest way to prove the flow.

What Sendmux does

Sendmux gives software and AI agents a proper email layer.

Instead of stitching together a sending provider, IMAP access, inbound parsing, webhooks, API keys, mailbox storage, and agent tooling by hand, Sendmux puts those surfaces behind one API platform.

The complete email API platform includes the following:

  • Email Inbox API for receiving, searching, reading, and managing agent inboxes
  • Sending API for outbound email from a mailbox
  • Management API for teams, domains, mailboxes, API keys, routing, and platform controls
  • SDKs for TypeScript, Python, Go, PHP, and Ruby
  • MCP for authorised AI agent access
  • CLI for terminal workflows, scripts, debugging, and automation

That means Sendmux can act as an email inbox API, inbound email API, email sending API, SMTP API, and agent mailbox layer from one system.

Why the CLI exists

Email infrastructure gets painful when the first question is, "Where do I test this?"

With Sendmux CLI, the terminal becomes the control surface.

You can list mailboxes, inspect messages, search snippets, send test emails, and verify API behaviour in the same environment where your agent, scripts, or CI jobs already run.

Here's why that matters:

  • You can test an agent inbox before wiring it into an app
  • You can search inbound email without building a UI
  • You can send a controlled outbound email from a mailbox
  • You can debug API responses with machine-readable JSON
  • You can manage Sendmux resources in scripts
  • You can validate scoped API keys before handing them to an agent
  • You can prototype email workflows before moving them into an SDK

Install

brew install sendmux/tap/sendmux
Enter fullscreen mode Exit fullscreen mode

or:

npm install -g @sendmux/cli
Enter fullscreen mode Exit fullscreen mode

Then configure local profiles so you do not pass keys on every command:

sendmux profiles:set management --api-key smx_root_...
sendmux profiles:set mailbox --api-key smx_mbx_...
Enter fullscreen mode Exit fullscreen mode

Management commands use smx_root_ keys. Mailbox and sending commands use smx_mbx_ keys.

The CLI checks key prefixes before making the API call, so the wrong key type fails early instead of hitting the network.

Three workflows that show the shape of it

listing Sendmux mailboxes from the terminal

1. List agent mailboxes

A platform or agent operator can list the mailboxes available in a Sendmux workspace.

This helps before assigning inboxes to agents, checking mailbox provisioning, or confirming a management key can see the expected resources.

searching an inbox with the email inbox API

2. Search inbound email

Agents need more than raw email delivery. They need searchable, structured access to messages.

With the Email Inbox API through the CLI, you can search snippets in an agent inbox and return clean JSON for another process to read.

The result:

  • Find the latest invoice email
  • Search unread support messages
  • Pull matching messages into a triage script
  • Check whether an external service sent a verification email

sending email from a Sendmux mailbox

3. Send outbound mail

Sendmux also handles outbound email.

From the CLI, you can send through the Sending API using a mailbox-scoped key. You can include idempotency keys for safer retries and use JSON output when another tool needs to process the result.

This fits agent replies, transactional email tests, workflow notifications, and scripted operational mail.

Built for humans and agents

The CLI is designed for developers at a terminal and agents that need predictable output.

By default, API commands print readable JSON. Add --json when you need machine-readable output for scripts, agent tools, or automation.

The CLI also supports practical API flags:

  • --body for inline JSON request bodies
  • --body-file for request payloads from disk
  • --query for query parameters
  • --path for path parameters
  • --header for extra headers
  • --idempotency-key for safer send retries
  • --if-match and --if-none-match where supported by the API operation

The command set is generated from Sendmux public API surfaces. The current CLI includes 95 generated API operation commands: 40 Mailbox commands, 52 Management commands, and 3 Sending commands.

Where CLI fits beside MCP and SDKs

Sendmux gives you a few ways to work, depending on where the task lives.

Use MCP when an AI agent should call authorised Sendmux tools directly. Sendmux has Documentation MCP for searching docs and Product MCP for authorised Management, Mailbox, and Sending tools.

Use SDKs when you are building application code. Sendmux SDKs are available for TypeScript, Python, Go, PHP, and Ruby.

Use CLI when you want terminal control: one-off checks, local testing, scripts, CI jobs, debugging, and agent-friendly JSON workflows.

A simple way to choose:

  • MCP is for agent tool access
  • SDKs are for application code
  • CLI is for terminal workflows
  • APIs are the underlying contract

Why this matters for AI agents

AI agents increasingly need to deal with real-world systems that still use email.

Verification emails. Invoices. Support threads. Customer replies. Vendor notices. Billing alerts. Operational messages.

A normal inbox is built for a human with a mouse. An AI agent needs an API.

Sendmux gives agents a programmable inbox, outbound email, webhooks, Server-Sent Events for mailbox updates, scoped API keys, MCP tools, and SDKs. The CLI gives developers the quickest way to inspect and prove those workflows before shipping them.

Try it

Install the CLI, create a mailbox-scoped key, and run a small workflow:

  1. List a mailbox
  2. Search for a message
  3. Send a test email
  4. Repeat the same flow from an SDK or MCP-enabled agent

That is the point of Sendmux CLI: email infrastructure you can see, test, script, and hand to agents without leaving the terminal.

Top comments (11)

Collapse
 
alaadeen profile image
Alaadin

nice

Collapse
 
alaadeen profile image
Alaadin

You usually do not get real active YouTube subscribers for free on demand. You can get them over time without paying, yes. Very different thing. If someone promises a pile of “active subs” fast and free, it is usually low-quality traffic, sub-for-sub, or people who disappear after a day.

What still works is boring and repeatable.

Post on a schedule people can learn. Make the first 3 seconds better. Give one clear reason to stay. Ask for the subscribe only after you gave them something worth subscribing for. A lot of small channels ask too early and it lands flat.

Shorts can bring people in, but a lot of Shorts subs do not turn into loyal viewers unless the long videos match the same topic and tone. If your channel is mixing random subjects, active subscribers are hard to keep active. YouTube is pretty good at spotting what viewers return for, and so are viewers.

A few free methods that still pull their weight:

  • Reply to every early comment
  • Pin a comment that starts a real discussion
  • Make series, not one-off uploads
  • Put your best topic in the title and thumbnail, not buried in the middle
  • End videos by pointing to the next related video, not a generic “please subscribe”
  • Share in niche groups where your topic fits instead of dropping links everywhere

Also watch your returning viewers, click-through rate, and where people leave. If people click but bail in 20 seconds, more subscribers will not fix that. If nobody clicks, the packaging is the problem.

If you mean “free” as in no ad spend, that is possible. If you mean instant active subscribers with no work, no.

Some people also mess with engagement groups, swap communities, or tools in that lane, including upvote club. I would still put that in the side bucket. If the videos are not giving viewers a reason to come back, that kind of extra activity will not carry the channel for long.

Tight niche, better hooks, cleaner thumbnails, and consistency beat subscriber tricks most of the time. Might be different for your channel, but that pattern is pretty common.

Collapse
 
alaadeen profile image
Alaadin

You usually do not create totally different content from scratch for every platform. That burns time fast. Better approach is one core idea, then recut it for the way each platform is actually consumed.

I keep it to a simple flow: start with a source piece, pull out 3 to 7 usable angles, then rewrite each one to fit the feed. A webinar becomes a short video clip, a text post, a carousel, an email note, a quote graphic, maybe a longer article. Same idea, different packaging.

The part that matters most is not the asset. It is the platform behavior.

LinkedIn usually wants a stronger opening line and cleaner text. Instagram needs the visual doing more of the work. TikTok and Shorts live or die in the first seconds. X works better when the point is tight and easy to react to. If you paste the same caption everywhere, people can tell.

A few things that make this easier:

  • Build a content bank of themes, customer questions, proof points, and stories
  • Write in batches so you are not switching tone all day
  • Make one platform your "native" starting point
  • Track saves, replies, watch time, and clicks by platform instead of using one success metric for all of them
  • Leave room to rewrite hooks, endings, and calls to action each time

Also, not every platform needs the same posting volume. Two good posts in the right format can beat seven lazy cross-posts.

If your real question is whether one platform can do all of it, I do not think one tool replaces the adaptation work. Some teams keep planning or internal coordination in one place with communities, schedulers, or internal systems like A1. That might tidy the workflow a bit. The writing still has to be reshaped for each platform or it starts reading like copy-paste sludge.

That is the part people skip, and it is usually why multi-platform content falls flat.

Collapse
 
parita_c537d77b2bc23fbb8b profile image
parita

d

Collapse
 
kinjal_be17aebb086689cdf2 profile image
Kinjal

x

Collapse
 
kala_veda_d029faec8d372df profile image
Kala Veda

f

Collapse
 
thenos_bhai_6b3151e1fcff7 profile image
Thenos Bhai

r

Collapse
 
asmyshlyaev177 profile image
Alex

Interesting, but Gmail from script can do the trick as well.

Collapse
 
roshan_jonnalagadda_ced3c profile image
Roshan Jonnalagadda

Gmail doesn't provide agent-specific mailboxes, but we do :) so this would be ideal for that. We also let you monitor what your agents are up to with a unified inbox – something Gmail won't do either. And lastly, you can bring in any provider you like – set quotes (e.g., send 3 emails from this Gmail account, 2 from this Hotmail, etc.), and our system does just that – routes your emails with ease.

Collapse
 
vitthalbhai_dholiya_6cf72 profile image
VITTHALBHAI DHOLIYA

f

Collapse
 
m_muajhid profile image
M Muajhid

yutu