Hi @andrew_c3, thanks for the interest in Mautic-CLI!
I think there might be a misunderstanding about how it works - Mautic-CLI runs on your local computer (your laptop/desktop), not on the server where Mautic is hosted. It connects to your Mautic instance remotely via the API over HTTPS, just like your browser does.
So shared hosting compatibility doesn’t matter at all. You just need to enable Basic Auth or OAuth2 in your Mautic instance so the CLI can authenticate.
On the Mautic side:
Go to Mautic Settings > API Settings
Enable the API
Enable Basic Authentication (simplest option) or set up OAuth2 credentials
On your local machine:
You don’t need to know Python at all. The recommended installer, uv, handles everything for you - Python included. Just run:
Install uv (one-time)
curl -LsSf ``https://astral.sh/uv/install.sh`` | sh
Install Mautic-CLI (uv downloads the right Python automatically)
uv tool install mautic-cli
Connect to your Mautic instance
mautic auth setup
That’s it. uv will download and manage the correct Python version behind the scenes - you never have to touch Python directly.
On Windows, the uv install command is different - check Installation | uv for details.
I initially missed the crucial detail that this is a remote Mautic CLI/API tool running on a desktop or workstation. Even so, it looks like a very powerful solution, and I can already imagine several use cases—I’m looking forward to trying it out soon.
I got particularly excited when I thought those commands might be available directly in a console on the Mautic server, as that would make it possible to call them programmatically from within a Mautic plugin or possibly in a C++ app on the same box.
Do you happen to know how feasible it would be to run this tool directly on the Mautic server in that way? Or are those command already available in the Mautic console on the server ?
Running mautic-cli on the server: Yes, it works fine on the server too. It’s just a Python CLI that makes HTTP calls, so it can run anywhere with network access to your Mautic instance, including the same machine. If running locally on the server, your base URL would just be http://localhost (or whatever our local Mautic address is). You’d install it the same way with uv, and you could call it from a PHP plugin via exec() / shell_exec() or from a C++ app via system() / popen(). The JSON output mode (the default) makes it straightforward to parse the results programmatically.
Mautic’s built-in console: Mautic does ship with its own console at bin/console (Symfony-based), but it serves a different purpose. Those commands are mostly for administration and background processing:
mautic:campaigns:trigger - process campaign events
mautic:emails:send - send queued emails
mautic:import - run CSV imports
cache:clear, doctrine:migrations:migrate, etc.
They don’t provide the CRUD API operations that mautic-cli offers (list/search/create/edit/delete contacts, send specific emails, manage forms, etc.). So the two tools complement each other rather than overlap: bin/console handles background jobs and maintenance, while mautic-cli handles data operations through the API.