pp-customer-io
Original:🇺🇸 English
Translated
Every Customer.io action a marketer or ops engineer takes — campaigns, broadcasts, segments, deliveries, exports, suppressions, Reverse-ETL — wrapped in named verbs, backed by a local SQLite cache, and served through a bundled MCP server. Trigger phrases: `use customer-io`, `run customer-io`, `trigger a customer.io broadcast`, `send a customer.io transactional message`, `export a customer.io segment`, `check customer.io delivery health`, `audit customer.io suppressions`, `what fraction of segment X opened journey Y in customer.io`.
7installs
Added on
NPX Install
npx skill4agent add mvanhorn/printing-press-library pp-customer-ioTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Customer.io — Printing Press CLI
Prerequisites: Install the CLI
This skill drives the binary. You must verify the CLI is installed before invoking any command from this skill. If it is missing, install it first:
customer-io-pp-cli- Install via the Printing Press installer:
bash
npx -y @mvanhorn/printing-press install customer-io --cli-only - Verify:
customer-io-pp-cli --version - Ensure (or
$GOPATH/bin) is on$HOME/go/bin.$PATH
If the install fails (no Node, offline, etc.), fall back to a direct Go install (requires Go 1.23+):
npxbash
go install github.com/mvanhorn/printing-press-library/library/other/customer-io/cmd/customer-io-pp-cli@latestIf reports "command not found" after install, the install step did not put the binary on . Do not proceed with skill commands until verification succeeds.
--version$PATHThe official customerio/cli exposes the API as raw passthrough. This CLI gives you typed commands for every meaningful workflow, plus eight commands no other tool has — journey funnels cross-cut by segment, multi-segment overlap, customer 360 timelines, broadcast pre-flight, suppression audit trails, Reverse-ETL health, bulk suppress with provenance, and incident-ready delivery triage bundles. It is also the only Customer.io tool that ships an MCP server.
When to Use This CLI
Reach for this CLI when you need to do anything in Customer.io that's tedious in the web UI: bulk suppressions with an audit trail, journey funnels cross-cut by segment, customer-360 timelines for incident triage, broadcast pre-flight before a high-stakes send, or Reverse-ETL health checks. It is also the right tool when an agent needs to drive Customer.io — the bundled MCP server exposes the same verbs over stdio and HTTP transports. For raw event ingestion (the Track API) or per-source CDP write keys, prefer one of the official server-side SDKs.
Unique Capabilities
These capabilities aren't available in any other tool for this API.
Local state that compounds
-
— Render a step-by-step journey funnel (sent → delivered → opened → clicked → converted) for one campaign, optionally cross-cut by segment.
campaigns funnelReach for this when an agent is asked 'what fraction of segment X completed journey Y' — the answer is one query against synced data, not two exports and a spreadsheet.bashcustomer-io campaigns funnel cmp_482 --segment seg_19 --since 30d --json -
— Compute pairwise and multi-way Venn diagrams of segment memberships from the local store.
segments overlapUse when validating audience design — 'are my churned-risk and high-value segments overlapping?' — without exporting twice.bashcustomer-io segments overlap seg_19 seg_42 seg_88 --json -
— Chronological per-customer event stream merging identifies, deliveries, suppressions, and segment-membership events from the local store.
customers timelineReach for this on incident triage or 'did the welcome SMS go out to this user?' — one command instead of a UI scroll-fest.bashcustomer-io customers timeline alice@example.com --since 30d --json
Send-time safety
-
— Before triggering a broadcast, check target segment size, suppression overlap, and last-sent recency from the local deliveries cache; emit a green/yellow/red verdict with structured reasons.
broadcasts preflightUse before any broadcast to avoid double-sending, accidental over-mailing, or 429 storms.bashcustomer-io broadcasts preflight 123457 bcr_77 --segment seg_19 --json -
— Attribute every suppression in a window to the triggering bounce or complaint delivery (or 'manual' if no preceding event).
suppressions auditUse when an ops engineer needs to explain why a customer is suppressed, or when auditing complaint-driven churn.bashcustomer-io suppressions audit --since 30d --reason bounce --json -
— Named verb over Reverse-ETL run history with status, row counts, error reasons, and an optional --watch poll mode.
cdp-reverse-etl healthUse as the daily standup question 'are warehouse syncs healthy?' — replaces three separate api calls + jq filters.bashcustomer-io cdp-reverse-etl health --since 24h --watch
Audit and provenance
-
— Read a CSV or JSONL of email/customer-id, fan out real suppress calls with adaptive throttle, append every call to a local JSONL audit log keyed by date.
suppressions bulk addUse for compliance-driven bulk actions where you need to defend later 'who got suppressed when, by whom, with what status code'.bashcustomer-io suppressions bulk add --from-csv complaints.csv --reason complaint --dry-run -
— Filter live + local deliveries by template + status + window, write a self-contained bundle (summary.md with SQL group-by error reasons, deliveries.jsonl, recipients.txt) ready to paste into an incident doc.
deliveries triagePipe the bundle into Claude or a Notion doc for one-shot incident handoff; replaces 30+ minutes of UI scrolling.bashcustomer-io deliveries triage --template tx_91 --status bounced --since 1h --bundle ./incident-2026-05-07
Command Reference
broadcasts — List, inspect, and trigger one-off broadcasts (1 req / 10 s rate-limited)
- — Get one broadcast
customer-io-pp-cli broadcasts get - — List broadcasts in an environment
customer-io-pp-cli broadcasts list - — Read metrics for one broadcast
customer-io-pp-cli broadcasts metrics - — Trigger a broadcast (rate-limited to 1 req / 10 s)
customer-io-pp-cli broadcasts trigger
campaigns — List campaigns and read campaign + journey metrics
- — Get one campaign
customer-io-pp-cli campaigns get - — Read step-by-step journey funnel metrics
customer-io-pp-cli campaigns journey_metrics - — List campaigns in an environment
customer-io-pp-cli campaigns list - — Read aggregate metrics for a campaign
customer-io-pp-cli campaigns metrics
cdp_destinations — List CDP destinations (Premium feature)
- — List CDP destinations
customer-io-pp-cli cdp_destinations
cdp_reverse_etl — List Reverse-ETL syncs (Premium feature)
- — List Reverse-ETL syncs
customer-io-pp-cli cdp_reverse_etl
cdp_sources — List CDP data sources (Premium feature)
- — List CDP sources
customer-io-pp-cli cdp_sources
customers — Manage Customer.io customer profiles within an environment (workspace)
- — Get a customer's attributes
customer-io-pp-cli customers get - — List activity events for a customer
customer-io-pp-cli customers list_activities - — List messages sent to a customer
customer-io-pp-cli customers list_messages - — List the segments a customer belongs to
customer-io-pp-cli customers list_segments
deliveries — Inspect delivery events (sends, opens, clicks, bounces, complaints)
- — Get one delivery
customer-io-pp-cli deliveries get - — List recent deliveries
customer-io-pp-cli deliveries list
exports — Start, monitor, and download data exports (segment members, deliveries, customers, etc.)
- — Get the signed download URL for a finished export
customer-io-pp-cli exports download - — Get the status of an export
customer-io-pp-cli exports get - — List recent exports
customer-io-pp-cli exports list
segments — List segments and inspect segment membership
- — Get the customer count for a segment
customer-io-pp-cli segments customer_count - — Get one segment
customer-io-pp-cli segments get - — List segments in an environment
customer-io-pp-cli segments list - — List customer IDs in a segment
customer-io-pp-cli segments members
suppressions — Suppress and unsuppress customers; the official audit surface for compliance actions
- — Suppress a customer
customer-io-pp-cli suppressions add - — Get the count of suppressed customers in an environment (Customer.io has no list endpoint; use 'exports...
customer-io-pp-cli suppressions count - — Remove a suppression
customer-io-pp-cli suppressions remove
transactional — Inspect transactional templates and metrics
- — Get one transactional template
customer-io-pp-cli transactional get_template - — List transactional templates
customer-io-pp-cli transactional list_templates - — Read metrics for one transactional template
customer-io-pp-cli transactional template_metrics
webhooks — Manage Reporting Webhooks for delivery + engagement events
- — Get one Reporting Webhook
customer-io-pp-cli webhooks get - — List Reporting Webhooks
customer-io-pp-cli webhooks list
workspaces — List the environments (workspaces) visible to the Service Account
- — Get the current account details
customer-io-pp-cli workspaces account - — Read the current account, including environment_ids visible to the SA token
customer-io-pp-cli workspaces list
Finding the right command
When you know what you want to do but not which command does it, ask the CLI directly:
bash
customer-io-pp-cli which "<capability in your own words>"which02--helpRecipes
Find which high-value customers haven't engaged with the welcome journey
bash
customer-io campaigns funnel cmp_welcome --segment seg_high_value --since 90d --agent --select steps.delivered.count,steps.opened.count,steps.clicked.count,non_engaged.recipientsThe funnel command joins synced deliveries with segment members; --agent + --select narrows the deeply-nested funnel response to just the counts and the non-engaged recipient list, keeping the agent's context lean.
Draft an incident bundle for a transactional bounce spike
bash
customer-io deliveries triage --template tx_password_reset --status bounced --since 2h --bundle ./incident-bounce-2026-05-07Writes summary.md with grouped error reasons, deliveries.jsonl with full delivery objects, and recipients.txt — paste-ready for a Notion incident doc or a Claude summarize prompt.
Prove that a broadcast is safe to trigger
bash
customer-io broadcasts preflight bcr_summer_promo --segment seg_active_30d --jsonReturns a green/yellow/red verdict with structured reasons (segment size, suppression overlap, last-sent recency from synced deliveries). Run before every broadcast at non-trivial scale.
Bulk-suppress a complaint list with provenance
bash
customer-io suppressions bulk add --from-csv complaints-2026-05.csv --reason complaint --dry-runDrop --dry-run to commit. Every call lands in with timestamp, recipient, status, and HTTP code — defensible later.
~/.customer-io/audit/suppressions-2026-05-07.jsonlWatch Reverse-ETL syncs in real time
bash
customer-io cdp-reverse-etl health --watch --since 24hPolls every 60 s and prints a status row per sync; pipe to to keep a log.
teeAuth Setup
Customer.io uses Service Account tokens ( prefix). The CLI exchanges the token for a short-lived JWT via the OAuth client-credentials endpoint at (or for EU workspaces) and uses the JWT as the Bearer for both the Journeys UI API () and the CDP control plane (). Run once; the cached JWT auto-refreshes. The Track API (separate Site ID + API Key auth) is intentionally out of scope for v1 — the SA token is the unified credential.
sa_live_*https://us.fly.customer.io/v1/service_accounts/oauth/tokeneu.fly.customer.io/v1/.../cdp/api/...customer-io auth login --sa-token $CIO_TOKEN --region usRun to verify setup.
customer-io-pp-cli doctorAgent Mode
Add to any command. Expands to: .
--agent--json --compact --no-input --no-color --yes-
Pipeable — JSON on stdout, errors on stderr
-
Filterable —keeps a subset of fields. Dotted paths descend into nested structures; arrays traverse element-wise. Critical for keeping context small on verbose APIs:
--selectbashcustomer-io-pp-cli broadcasts list mock-value --agent --select id,name,status -
Previewable —shows the request without sending
--dry-run -
Offline-friendly — sync/search commands can use the local SQLite store when available
-
Non-interactive — never prompts, every input is a flag
-
Explicit retries — useonly when an already-existing create should count as success
--idempotent
Response envelope
Commands that read from the local store or the API wrap output in a provenance envelope:
json
{
"meta": {"source": "live" | "local", "synced_at": "...", "reason": "..."},
"results": <data>
}Parse for data and to know whether it's live or local. A human-readable summary is printed to stderr only when stdout is a terminal — piped/agent consumers get pure JSON on stdout.
.results.meta.sourceN results (live)Agent Feedback
When you (or the agent) notice something off about this CLI, record it:
customer-io-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
customer-io-pp-cli feedback --stdin < notes.txt
customer-io-pp-cli feedback list --json --limit 10Entries are stored locally at . They are never POSTed unless is set AND either is passed or . Default behavior is local-only.
~/.customer-io-pp-cli/feedback.jsonlCUSTOMER_IO_FEEDBACK_ENDPOINT--sendCUSTOMER_IO_FEEDBACK_AUTO_SEND=trueWrite what surprised you, not a bug report. Short, specific, one line: that is the part that compounds.
Output Delivery
Every command accepts . The output goes to the named sink in addition to (or instead of) stdout, so agents can route command results without hand-piping. Three sinks are supported:
--deliver <sink>| Sink | Effect |
|---|---|
| Default; write to stdout only |
| Atomically write output to |
| POST the output body to the URL ( |
Unknown schemes are refused with a structured error naming the supported set. Webhook failures return non-zero and log the URL + HTTP status on stderr.
Named Profiles
A profile is a saved set of flag values, reused across invocations. Use it when a scheduled agent calls the same command every run with the same configuration - HeyGen's "Beacon" pattern.
customer-io-pp-cli profile save briefing --json
customer-io-pp-cli --profile briefing broadcasts list mock-value
customer-io-pp-cli profile list --json
customer-io-pp-cli profile show briefing
customer-io-pp-cli profile delete briefing --yesExplicit flags always win over profile values; profile values win over defaults. lists all available profiles under so introspecting agents discover them at runtime.
agent-contextavailable_profilesExit Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 2 | Usage error (wrong arguments) |
| 3 | Resource not found |
| 4 | Authentication required |
| 5 | API error (upstream issue) |
| 7 | Rate limited (wait and retry) |
| 10 | Config error |
Argument Parsing
Parse :
$ARGUMENTS- Empty, , or
help→ show--helpoutputcustomer-io-pp-cli --help - Starts with → ends with
install→ MCP installation; otherwise → see Prerequisites abovemcp - Anything else → Direct Use (execute as CLI command with )
--agent
MCP Server Installation
- Install the MCP server:
bash
go install github.com/mvanhorn/printing-press-library/library/other/customer-io/cmd/customer-io-pp-mcp@latest - Register with Claude Code:
bash
claude mcp add customer-io-pp-mcp -- customer-io-pp-mcp - Verify:
claude mcp list
Direct Use
- Check if installed: If not found, offer to install (see Prerequisites at the top of this skill).
which customer-io-pp-cli - Match the user query to the best command from the Unique Capabilities and Command Reference above.
- Execute with the flag:
--agentbashcustomer-io-pp-cli <command> [subcommand] [args] --agent - If ambiguous, drill into subcommand help: .
customer-io-pp-cli <command> --help