We just released a CLI for Mailcoach. It lets you manage your entire email marketing setup straight from the terminal — lists, subscribers, campaigns, templates, transactional emails, automations, all of it. With the steep rise of AI agents, CLIs have gained a lot of importance. They’re no longer just for power users — they’re the interface your AI assistant uses to get things done. If you’ve seen us do the same for Flare recently, this follows the same idea.
Installation
composer global require spatie/mailcoach-cli
Then authenticate with your Mailcoach instance:
mailcoach login
You’ll be prompted for your instance URL and an API token. That’s it.
Built on the OpenAPI spec
The Mailcoach CLI is built on top of our OpenAPI specification. Every API endpoint automatically becomes a CLI command. That means when we add new features to the Mailcoach API, the CLI picks them up without needing a manual update. You always have access to the latest capabilities.
You can list your campaigns, manage subscribers, send test emails, check statistics, trigger automations — basically anything you can do through the API, you can now do from your terminal.
mailcoach list-campaigns
mailcoach list-subscribers --email-list=<uuid>
mailcoach send-campaign-test --campaign=<uuid>
mailcoach list-transactional-mails
The output is human-readable by default, but you can switch to JSON when you need to pipe things into other tools or scripts.
An AI skill for your coding agent
This is the part we’re most excited about. The CLI also ships as a skill for AI coding agents. If you’re using Claude Code, Cursor, GitHub Copilot, or any of the 40+ agents on skills.sh, you can install the Mailcoach skill and let your AI assistant manage your email marketing for you.
Imagine asking your coding agent “how many subscribers does my newsletter have?” or “send a test email for the March campaign” — and it just does it. No context-switching, no opening the dashboard, no copy-pasting between browser tabs.
The skill teaches your AI agent how to use every command, including how to chain them together for more complex workflows. It knows how to authenticate, how to filter and paginate results, and how to handle the different input formats.
You can install the skill through Laravel Boost or via skills.sh — both take a single command.
Getting started
Head over to the Mailcoach CLI docs for installation instructions and a full overview of what’s available. If you’re already using Mailcoach, you’ll be up and running in under a minute.