mirror of
https://github.com/HKUDS/CLI-Anything.git
synced 2026-08-28 23:27:04 +08:00
fix: address mailchimp review blockers
This commit is contained in:
@@ -87,6 +87,7 @@
|
||||
!/macrocli/
|
||||
!/sbox/
|
||||
!/quietshrink/
|
||||
!/mailchimp/
|
||||
|
||||
# Step 5: Inside each software dir, ignore everything (including dotfiles)
|
||||
/gimp/*
|
||||
@@ -181,6 +182,8 @@
|
||||
/sbox/.*
|
||||
/quietshrink/*
|
||||
/quietshrink/.*
|
||||
/mailchimp/*
|
||||
/mailchimp/.*
|
||||
|
||||
# Step 6: ...except agent-harness/
|
||||
!/gimp/agent-harness/
|
||||
@@ -235,6 +238,7 @@
|
||||
!/macrocli/agent-harness/
|
||||
!/sbox/agent-harness/
|
||||
!/quietshrink/agent-harness/
|
||||
!/mailchimp/agent-harness/
|
||||
|
||||
# Exclude non-gedit demo macros from macrocli (local only)
|
||||
/macrocli/agent-harness/cli_anything/macrocli/macro_definitions/demo/flameshot*
|
||||
|
||||
@@ -866,7 +866,7 @@ Each application received complete, production-ready CLI interfaces — not demo
|
||||
<td>Email Marketing & Automation</td>
|
||||
<td><code>cli-anything-mailchimp</code></td>
|
||||
<td>Mailchimp Marketing API v3.0</td>
|
||||
<td align="center">✅ <a href="mailchimp/agent-harness/">292 cmds</a></td>
|
||||
<td align="center">✅ <a href="mailchimp/agent-harness/">303 cmds</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><strong>📚 <a href="zotero/agent-harness/">Zotero</a></strong></td>
|
||||
@@ -1169,7 +1169,7 @@ cli-anything/
|
||||
├── 🎵 audacity/agent-harness/ # Audacity CLI (161 tests)
|
||||
├── 🌐 browser/agent-harness/ # Browser CLI (DOMShell MCP, new)
|
||||
├── 📄 libreoffice/agent-harness/ # LibreOffice CLI (158 tests)
|
||||
├── 📧 mailchimp/agent-harness/ # Mailchimp Marketing API CLI (292 commands, 27 unit tests)
|
||||
├── 📧 mailchimp/agent-harness/ # Mailchimp Marketing API CLI (303 commands, 36 unit tests)
|
||||
├── 📚 zotero/agent-harness/ # Zotero CLI (new, write import support)
|
||||
├── 📝 mubu/agent-harness/ # Mubu CLI (96 tests)
|
||||
├── 📹 obs-studio/agent-harness/ # OBS Studio CLI (153 tests)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
`cli-anything-mailchimp` makes the [Mailchimp Marketing API v3.0](https://mailchimp.com/developer/marketing/docs/fundamentals/) fully agent-native. Every endpoint from the official Swagger spec is exposed as a typed Click command, with JSON output and REPL mode.
|
||||
|
||||
**292 commands across 30 resource groups**, covering the full Marketing API surface.
|
||||
**303 commands across 30 resource groups**, covering the full Marketing API surface.
|
||||
|
||||
---
|
||||
|
||||
@@ -114,7 +114,7 @@ Collection commands expose Mailchimp's native `count` and `offset` query paramet
|
||||
|
||||
## Design Decisions
|
||||
|
||||
1. **Code generation from spec** — 292 commands are auto-generated from Mailchimp's public Swagger 2.0 spec via `_codegen/generate.py`. Generated files are committed so end-users get fast `--help` without downloading the spec.
|
||||
1. **Code generation from spec** — 303 commands are auto-generated from Mailchimp's public Swagger 2.0 spec via `_codegen/generate.py`. Generated files are committed so end-users get fast `--help` without downloading the spec.
|
||||
|
||||
2. **Env-var-only auth** — per CLI-Anything convention, no config files. `MAILCHIMP_API_KEY` is the single source of truth.
|
||||
|
||||
|
||||
@@ -50,7 +50,10 @@ class MailchimpClient:
|
||||
"Export it before use: export MAILCHIMP_API_KEY=<key>-<dc>"
|
||||
)
|
||||
self._key = key
|
||||
self._dc = _server_prefix(key)
|
||||
try:
|
||||
self._dc = _server_prefix(key)
|
||||
except ValueError as e:
|
||||
raise MailchimpAuthError(str(e)) from e
|
||||
self._base = _BASE.format(dc=self._dc)
|
||||
self._session = requests.Session()
|
||||
self._session.auth = ("anystring", key)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: cli-anything-mailchimp
|
||||
description: CLI harness for the Mailchimp Marketing API v3.0 — 292 commands across 30 resource groups (lists, campaigns, reports, automations, ecommerce, templates, and more). Supports JSON output and interactive REPL mode.
|
||||
description: CLI harness for the Mailchimp Marketing API v3.0 — 303 commands across 30 resource groups (lists, campaigns, reports, automations, ecommerce, templates, and more). Supports JSON output and interactive REPL mode.
|
||||
---
|
||||
|
||||
# cli-anything-mailchimp
|
||||
|
||||
@@ -80,6 +80,21 @@ class TestMailchimpClient(unittest.TestCase):
|
||||
if orig:
|
||||
os.environ["MAILCHIMP_API_KEY"] = orig
|
||||
|
||||
def test_get_client_exits_cleanly_on_key_without_suffix(self):
|
||||
from cli_anything.mailchimp.core.client import get_client
|
||||
import os
|
||||
|
||||
orig = os.environ.get("MAILCHIMP_API_KEY")
|
||||
os.environ["MAILCHIMP_API_KEY"] = "invalid"
|
||||
try:
|
||||
with self.assertRaises(SystemExit):
|
||||
get_client()
|
||||
finally:
|
||||
if orig is None:
|
||||
os.environ.pop("MAILCHIMP_API_KEY", None)
|
||||
else:
|
||||
os.environ["MAILCHIMP_API_KEY"] = orig
|
||||
|
||||
@resp_lib.activate
|
||||
def test_get_success(self):
|
||||
from cli_anything.mailchimp.core.client import MailchimpClient
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: cli-anything-mailchimp
|
||||
description: CLI harness for the Mailchimp Marketing API v3.0 — 292 commands across 30 resource groups (lists, campaigns, reports, automations, ecommerce, templates, and more). Supports JSON output and interactive REPL mode.
|
||||
description: CLI harness for the Mailchimp Marketing API v3.0 — 303 commands across 30 resource groups (lists, campaigns, reports, automations, ecommerce, templates, and more). Supports JSON output and interactive REPL mode.
|
||||
---
|
||||
|
||||
# cli-anything-mailchimp
|
||||
|
||||
Reference in New Issue
Block a user