August 2026 · Available on all plans.
What Shipped
brew-cli is the command-line surface of Brew. Every operation in
Public API v1 has a typed command. That
covers brands, AI design generation and edits, sending and scheduling,
automations, contacts and audiences, domain verification, and analytics.
Like the MCP server, it’s a thin layer over the
same API the dashboard uses. Same validation, same permissions, same credit
metering, same rate limits. Anything you can do in the app, you can script.
Three Ways to Install
Homebrew ships a self-contained binary with no runtime to manage. npm (npm install -g @brew.new/cli) needs Node 20 or newer. And npx @brew.new/cli
runs it without installing anything, which is what you want inside CI jobs and
agent sandboxes. Every GitHub release
also attaches standalone binaries for macOS, Linux, and Windows with a
checksums.txt alongside them.
The Conventions
Six rules hold across every command:- Two output modes. Human-readable in a terminal, exact API JSON when you
pass
--jsonor pipe the output. Data goes to stdout and progress to stderr, so pipes stay clean. - Structured inputs. Simple values are flags. Full request bodies go through
--input '<json>'or--input -to read stdin, and uploads through--file. - Safe by default. Irreversible commands ask for confirmation in a terminal
and refuse anywhere else until you pass
--yes. - Retry-safe writes.
--idempotency-keyon any create makes a retry replay instead of duplicate. - Pagination handled.
--limitand--cursoron every list command, or--allto follow the cursor and return every page as one result. - Typed errors. Failures print the API’s error envelope
with its stable
codeand arequestIdfor support.
Built for Agents
Where MCP gives an agent tools over a protocol, the CLI gives any harness that can run a shell command the same reach. And it’s cheap on context. JSON turns on by itself whenever stdout isn’t a terminal, which is every agent. Exit codes carry meaning:0 success, 1 API or runtime error, 2 usage
error, 3 auth error, 4 confirmation required. Nothing waits on stdin unless
stdin is a real terminal, so a command can’t hang a session.
The confirmation gate is the part worth knowing about. A real send, delete, or
trigger fire won’t execute non-interactively. It exits 4 and hands back an
envelope instead:
confirmCommand only after you
say yes. Test sends skip the gate, so QA stays fast while the irreversible path
stays deliberate.
For discovery, brew-cli docs --agent prints a JSON manifest of every command
with its flags, safety class, and the API route behind it. The repo also ships a
ready-made skill at
skills/brew-cli/SKILL.md.
It teaches Claude Code and compatible harnesses the whole contract in about
fifty lines.
The Escape Hatch
New platform capabilities land in the API before they get a dedicated command.brew-cli api covers the gap with a raw authenticated request that still
carries your key, brand header, and error handling: