Skip to content

Commit bed7da6

Browse files
committed
docs: update README and SKILL.md for Phase 2 resources
- README: add all 12 new resources to capabilities table and commands, fix notes example (lead/text), add zsh ! escaping hint - SKILL.md: add Phase 2 resource sections and table field mappings - gitignore: exclude CLAUDE.md and PRD from repo
1 parent 0469480 commit bed7da6

4 files changed

Lines changed: 208 additions & 25 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@ build/
1010

1111
.claude/
1212
mantic-MCP/
13+
prd_mautic_cli.md
14+
CLAUDE.md
15+
docs/

README.md

Lines changed: 92 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
# mautic-cli
44

5-
**CLI for Mautic marketing automation - built for humans and AI agents.**
5+
**Control Mautic from the command line or any AI coding agent.**
66

77
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
88
[![Python 3.11+](https://img.shields.io/badge/python-3.11+-3776AB.svg)](https://python.org)
99
[![Mautic 4.x-7.x](https://img.shields.io/badge/mautic-4.x--7.x-4e5e9e.svg)](https://mautic.org)
1010

11-
[Quick Start](#quick-start) · [Commands](#commands) · [Output Formats](#output-formats) · [AI Agents](#ai-agents)
11+
[Quick Start](#quick-start) · [Commands](#commands) · [Output Formats](#output-formats)
1212

1313
</div>
1414

@@ -22,25 +22,45 @@
2222
| **Segments** | List, create, edit, delete, add/remove contacts |
2323
| **Emails** | List, create, edit, send to contact, send to segment |
2424
| **Campaigns** | List, create, edit, delete, clone (7+), add/remove contacts |
25+
| **Forms** | List, get, submissions, delete |
26+
| **Companies** | List, get, create, edit, delete, add/remove contacts |
27+
| **Notes** | List (per contact), get, create |
28+
| **Stages** | List, set contact stage |
29+
| **Assets** | List, get |
30+
| **Tags** | List, create |
31+
| **Categories** | List (with bundle filter), create |
32+
| **Pages** | List, get |
33+
| **Webhooks** | List, get, create, delete |
34+
| **Fields** | List, create |
35+
| **Reports** | List, get |
36+
| **Points** | List actions, list triggers |
2537
| **Auth** | Basic Auth, OAuth2 Client Credentials, multiple profiles |
2638
| **Output** | JSON, colored tables, CSV, NDJSON streaming |
2739

2840
## Quick Start
2941

3042
```bash
31-
# Install (pick one)
32-
uv tool install mautic-cli # recommended
33-
pip install mautic-cli # or with pip
34-
pipx install mautic-cli # or with pipx
43+
# 1. Install
44+
uv tool install mautic-cli # or: pip install mautic-cli
3545

36-
# Authenticate
46+
# 2. Authenticate
3747
mautic auth setup
3848

39-
# Use it
49+
# 3. Use it
4050
mautic contacts list --limit 5
4151
mautic --format table emails list
4252
```
4353

54+
🤖 **Using an AI agent?** Add the [skill](skills/mautic/SKILL.md) and let your agent handle the rest:
55+
56+
```bash
57+
npx skills add bloomidea/mautic-cli
58+
```
59+
60+
> *"list my mautic contacts"* / *"send email 5 to contact 42"* / *"export all contacts to CSV"*
61+
>
62+
> Works with [Claude Code, Cursor, Codex, Gemini, Windsurf, and 37+ agents](https://add-skill.org/).
63+
4464
## Commands
4565

4666
### Contacts
@@ -83,6 +103,69 @@ mautic campaigns contacts 1
83103
mautic campaigns clone 1 # Mautic 7+ only
84104
```
85105

106+
### Forms
107+
108+
```bash
109+
mautic forms list
110+
mautic forms get 1
111+
mautic forms submissions 1
112+
mautic forms delete 1
113+
```
114+
115+
### Companies
116+
117+
```bash
118+
mautic companies list
119+
mautic companies get 1
120+
mautic companies create --json '{"companyname":"Acme Inc"}'
121+
mautic companies edit 1 --json '{"companyname":"Updated"}'
122+
mautic companies delete 1
123+
mautic companies add-contact 1 42
124+
mautic companies remove-contact 1 42
125+
```
126+
127+
### Notes
128+
129+
```bash
130+
mautic notes list --contact 42
131+
mautic notes get 1
132+
mautic notes create --json '{"lead":42,"type":"general","text":"Called, no answer"}'
133+
```
134+
135+
### Stages & Points
136+
137+
```bash
138+
mautic stages list
139+
mautic stages set 42 1 # set contact 42 to stage 1
140+
mautic points list
141+
mautic points triggers list
142+
```
143+
144+
### Assets, Tags, Categories
145+
146+
```bash
147+
mautic assets list
148+
mautic assets get 1
149+
mautic tags list
150+
mautic tags create --json '{"tag":"vip"}'
151+
mautic categories list --bundle email
152+
mautic categories create --json '{"title":"Q1 2026","bundle":"email"}'
153+
```
154+
155+
### Pages, Webhooks, Fields, Reports
156+
157+
```bash
158+
mautic pages list
159+
mautic pages get 1
160+
mautic webhooks list
161+
mautic webhooks create --json '{"name":"New Lead","webhookUrl":"https://...","triggers":["mautic.lead_post_save_new"]}'
162+
mautic webhooks delete 1
163+
mautic fields list
164+
mautic fields create --json '{"label":"Company Size","type":"number","group":"professional"}'
165+
mautic reports list
166+
mautic reports get 1
167+
```
168+
86169
<details>
87170
<summary><strong>All write commands accept JSON from inline, file, or stdin</strong></summary>
88171

@@ -161,7 +244,7 @@ Supports **Basic Auth** and **OAuth2 Client Credentials** grant.
161244
```bash
162245
export MAUTIC_BASE_URL=https://mautic.example.com
163246
export MAUTIC_USERNAME=admin
164-
export MAUTIC_PASSWORD=secret
247+
export MAUTIC_PASSWORD=secret # zsh: use $'p@ss!' if password contains !
165248
```
166249

167250
### Profiles
@@ -208,18 +291,6 @@ Tab-completion for all commands, subcommands, and options:
208291
mautic completion # Shows install instructions for your shell
209292
```
210293

211-
## AI Agents
212-
213-
mautic-cli ships with an [agent skill](skills/mautic/SKILL.md) that teaches AI coding agents the full command reference, auth flow, and safety rules for write operations.
214-
215-
Install with [`npx skills`](https://github.com/vercel-labs/skills) (supports Claude Code, Cursor, Codex, Gemini, Windsurf, and [37+ agents](https://add-skill.org/)):
216-
217-
```bash
218-
npx skills add https://github.com/bloomidea/mautic-cli
219-
```
220-
221-
Then ask your agent: *"list my mautic contacts"* or *"send email 5 to contact 42"*.
222-
223294
## License
224295

225296
[MIT](LICENSE)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
55
[project]
66
name = "mautic-cli"
77
version = "0.1.0"
8-
description = "CLI for Mautic marketing automation - built for humans and AI agents."
8+
description = "Control Mautic from the command line or any AI coding agent."
99
readme = "README.md"
1010
license = "MIT"
1111
requires-python = ">=3.11"

skills/mautic/SKILL.md

Lines changed: 112 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
---
22
name: mautic
33
description: >-
4-
Mautic marketing automation: manage contacts, segments, emails, and campaigns.
5-
Use when the user asks to "list contacts", "send email", "create segment",
6-
"check campaign", "search contacts", "add to segment", "mautic", or any
4+
Mautic marketing automation: manage contacts, segments, emails, campaigns,
5+
forms, companies, notes, stages, assets, tags, categories, pages, webhooks,
6+
fields, reports, and points. Use when the user asks to "list contacts",
7+
"send email", "create segment", "check campaign", "search contacts",
8+
"add to segment", "list companies", "create webhook", "mautic", or any
79
marketing automation task involving Mautic.
810
---
911

@@ -111,6 +113,100 @@ mautic campaigns add-contact <CAMPAIGN_ID> <CONTACT_ID>
111113
mautic campaigns remove-contact <CAMPAIGN_ID> <CONTACT_ID>
112114
```
113115

116+
### forms
117+
118+
```bash
119+
mautic forms list [--search QUERY] [--limit N] [--offset N]
120+
mautic forms get <ID>
121+
mautic forms submissions <ID> [--limit N]
122+
mautic forms delete <ID>
123+
```
124+
125+
### companies
126+
127+
```bash
128+
mautic companies list [--search QUERY] [--limit N] [--offset N]
129+
mautic companies get <ID>
130+
mautic companies create --json '{"companyname":"Acme Inc"}'
131+
mautic companies edit <ID> --json '{"companyname":"Updated"}'
132+
mautic companies delete <ID>
133+
mautic companies add-contact <COMPANY_ID> <CONTACT_ID>
134+
mautic companies remove-contact <COMPANY_ID> <CONTACT_ID>
135+
```
136+
137+
### notes
138+
139+
```bash
140+
mautic notes list --contact <CONTACT_ID> [--search QUERY] [--limit N] [--offset N]
141+
mautic notes get <ID>
142+
mautic notes create --json '{"lead":42,"type":"general","text":"Called, no answer"}'
143+
```
144+
145+
### stages
146+
147+
```bash
148+
mautic stages list [--search QUERY] [--limit N] [--offset N]
149+
mautic stages set <CONTACT_ID> <STAGE_ID>
150+
```
151+
152+
### assets
153+
154+
```bash
155+
mautic assets list [--search QUERY] [--limit N] [--offset N]
156+
mautic assets get <ID>
157+
```
158+
159+
### tags
160+
161+
```bash
162+
mautic tags list [--search QUERY] [--limit N] [--offset N]
163+
mautic tags create --json '{"tag":"vip"}'
164+
```
165+
166+
### categories
167+
168+
```bash
169+
mautic categories list [--search QUERY] [--limit N] [--offset N] [--bundle TYPE]
170+
mautic categories create --json '{"title":"Q1 2026","bundle":"email"}'
171+
```
172+
173+
### pages
174+
175+
```bash
176+
mautic pages list [--search QUERY] [--limit N] [--offset N]
177+
mautic pages get <ID>
178+
```
179+
180+
### webhooks
181+
182+
```bash
183+
mautic webhooks list [--search QUERY] [--limit N] [--offset N]
184+
mautic webhooks get <ID>
185+
mautic webhooks create --json '{"name":"New Lead","webhookUrl":"https://...","triggers":["mautic.lead_post_save_new"]}'
186+
mautic webhooks delete <ID>
187+
```
188+
189+
### fields
190+
191+
```bash
192+
mautic fields list [--search QUERY] [--limit N] [--offset N]
193+
mautic fields create --json '{"label":"Company Size","type":"number","group":"professional"}'
194+
```
195+
196+
### reports
197+
198+
```bash
199+
mautic reports list [--search QUERY] [--limit N] [--offset N]
200+
mautic reports get <ID>
201+
```
202+
203+
### points
204+
205+
```bash
206+
mautic points list [--search QUERY] [--limit N] [--offset N]
207+
mautic points triggers list [--search QUERY] [--limit N] [--offset N]
208+
```
209+
114210
## JSON Input
115211

116212
All write commands (`create`, `edit`) accept JSON in three forms:
@@ -157,6 +253,19 @@ Table/CSV show these fields per resource:
157253
- **segments**: id, name, alias, isPublished, isGlobal
158254
- **emails**: id, name, subject, emailType, isPublished, readCount
159255
- **campaigns**: id, name, isPublished, dateAdded
256+
- **forms**: id, name, alias, isPublished, dateAdded
257+
- **companies**: id, companyname, companyemail, companycity, companywebsite
258+
- **notes**: id, text, type, dateTime
259+
- **stages**: id, name, weight, isPublished
260+
- **assets**: id, title, alias, downloadCount, isPublished
261+
- **tags**: id, tag
262+
- **categories**: id, title, alias, bundle, color
263+
- **pages**: id, title, alias, isPublished, hits
264+
- **webhooks**: id, name, webhookUrl, isPublished
265+
- **fields**: id, label, alias, type, group
266+
- **reports**: id, name, system, source
267+
- **points**: id, name, type, delta, isPublished
268+
- **triggers**: id, name, points, isPublished
160269

161270
## Safety Rules
162271

0 commit comments

Comments
 (0)