|
16 | 16 |
|
17 | 17 | --- |
18 | 18 |
|
| 19 | +## How it works |
| 20 | + |
| 21 | +Mautic-CLI runs on **your local machine** (laptop, desktop, CI server) and connects to your Mautic instance remotely via its REST API. You don't install anything on your Mautic server - you just need to enable the API there. |
| 22 | + |
| 23 | +``` |
| 24 | +┌──────────────────┐ HTTPS ┌──────────────────┐ |
| 25 | +│ Your computer │ ────── API calls ─────▶│ Mautic server │ |
| 26 | +│ (mautic-cli) │ ◀──── JSON responses ──│ (any hosting) │ |
| 27 | +└──────────────────┘ └──────────────────┘ |
| 28 | +``` |
| 29 | + |
| 30 | +**On your Mautic server:** Go to Settings > API Settings, enable the API, and enable Basic Authentication (or set up OAuth2 credentials). |
| 31 | + |
| 32 | +**On your machine:** Install the CLI and run `mautic auth setup` - see Quick Start below. |
| 33 | + |
19 | 34 | ## What it does |
20 | 35 |
|
21 | 36 | | Category | Capabilities | |
|
41 | 56 |
|
42 | 57 | ## Quick Start |
43 | 58 |
|
| 59 | +No Python knowledge needed. The recommended installer, [uv](https://docs.astral.sh/uv/), handles everything including Python itself: |
| 60 | + |
44 | 61 | ```bash |
45 | | -# 1. Install (or upgrade) |
46 | | -uv tool install mautic-cli # or: pip install mautic-cli |
| 62 | +# 0. Install uv (one-time) — see https://docs.astral.sh/uv/getting-started/installation/ |
| 63 | +curl -LsSf https://astral.sh/uv/install.sh | sh # macOS / Linux |
| 64 | +# powershell -c "irm https://astral.sh/uv/install.ps1 | iex" # Windows |
| 65 | + |
| 66 | +# 1. Install mautic-cli (uv downloads the right Python automatically) |
| 67 | +uv tool install mautic-cli |
47 | 68 | uv tool install --upgrade mautic-cli # upgrade to latest |
48 | 69 |
|
49 | | -# 2. Authenticate |
| 70 | +# 2. Authenticate (connects to your remote Mautic instance) |
50 | 71 | mautic auth setup |
51 | 72 |
|
52 | 73 | # 3. Use it |
53 | 74 | mautic contacts list --limit 5 |
54 | 75 | mautic --format table emails list |
55 | 76 | ``` |
56 | 77 |
|
| 78 | +<details> |
| 79 | +<summary><strong>Alternative: install with pip</strong></summary> |
| 80 | + |
| 81 | +If you already have Python 3.11+ installed and prefer pip: |
| 82 | + |
| 83 | +```bash |
| 84 | +pip install mautic-cli |
| 85 | +``` |
| 86 | +</details> |
| 87 | + |
57 | 88 | 🤖 **Using an AI agent?** Add the [skill](skills/mautic/SKILL.md) and let your agent handle the rest: |
58 | 89 |
|
59 | 90 | ```bash |
|
0 commit comments