pp-customer-io

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Customer.io — Printing Press CLI

Customer.io — Printing Press CLI

Prerequisites: Install the CLI

前提条件:安装CLI

This skill drives the
customer-io-pp-cli
binary. You must verify the CLI is installed before invoking any command from this skill. If it is missing, install it first:
  1. Install via the Printing Press installer:
    bash
    npx -y @mvanhorn/printing-press install customer-io --cli-only
  2. Verify:
    customer-io-pp-cli --version
  3. Ensure
    $GOPATH/bin
    (or
    $HOME/go/bin
    ) is on
    $PATH
    .
If the
npx
install fails (no Node, offline, etc.), fall back to a direct Go install (requires Go 1.23+):
bash
go install github.com/mvanhorn/printing-press-library/library/other/customer-io/cmd/customer-io-pp-cli@latest
If
--version
reports "command not found" after install, the install step did not put the binary on
$PATH
. Do not proceed with skill commands until verification succeeds.
The 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.
本技能基于
customer-io-pp-cli
二进制文件运行。在调用本技能的任何命令前,必须确认CLI已安装。如果未安装,请先执行以下步骤:
  1. 通过Printing Press安装程序安装:
    bash
    npx -y @mvanhorn/printing-press install customer-io --cli-only
  2. 验证安装:
    customer-io-pp-cli --version
  3. 确保
    $GOPATH/bin
    (或
    $HOME/go/bin
    )已添加到
    $PATH
    环境变量中。
如果npx安装失败(无Node环境、离线等),可以回退到直接通过Go安装(需要Go 1.23及以上版本):
bash
go install github.com/mvanhorn/printing-press-library/library/other/customer-io/cmd/customer-io-pp-cli@latest
如果安装后执行
--version
提示“command not found”,说明安装程序未将二进制文件添加到
$PATH
中。请在验证成功前不要执行技能命令。
官方的customerio/cli仅将API作为原始透传接口。本CLI为所有有意义的工作流提供了类型化命令,另外还具备八项其他工具没有的功能——按细分维度交叉分析旅程漏斗、多细分受众重叠分析、客户360度时间线、广播预检查、屏蔽审计追踪、Reverse-ETL健康检查、带溯源的批量屏蔽,以及可直接用于事件响应的交付分类包。它也是唯一内置MCP服务器的Customer.io工具。

When to Use This CLI

何时使用本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.
当你需要在Customer.io上执行Web UI中繁琐的操作时,可使用本CLI:带审计追踪的批量屏蔽、按细分维度交叉分析旅程漏斗、用于事件排查的客户360度时间线、高风险发送前的广播预检查,或Reverse-ETL健康检查。当需要通过Agent驱动Customer.io时,它也是合适的工具——内置的MCP服务器通过标准输入输出和HTTP传输暴露相同的动词接口。对于原始事件 ingestion(Track API)或按数据源划分的CDP写入密钥,建议使用官方的服务端SDK。

Unique Capabilities

独特功能

These capabilities aren't available in any other tool for this API.
这些功能是其他同类型API工具所不具备的。

Local state that compounds

可累积的本地状态

  • campaigns funnel
    — Render a step-by-step journey funnel (sent → delivered → opened → clicked → converted) for one campaign, optionally cross-cut by segment.
    Reach 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.
    bash
    customer-io campaigns funnel cmp_482 --segment seg_19 --since 30d --json
  • segments overlap
    — Compute pairwise and multi-way Venn diagrams of segment memberships from the local store.
    Use when validating audience design — 'are my churned-risk and high-value segments overlapping?' — without exporting twice.
    bash
    customer-io segments overlap seg_19 seg_42 seg_88 --json
  • customers timeline
    — Chronological per-customer event stream merging identifies, deliveries, suppressions, and segment-membership events from the local store.
    Reach for this on incident triage or 'did the welcome SMS go out to this user?' — one command instead of a UI scroll-fest.
    bash
    customer-io customers timeline alice@example.com --since 30d --json
  • campaigns funnel
    — 渲染单个营销活动的分步旅程漏斗(已发送 → 已交付 → 已打开 → 已点击 → 已转化),可选择按细分维度交叉分析。
    当Agent被问到“细分受众X中有多少比例完成了旅程Y”时,使用该命令——只需针对同步数据执行一次查询,无需两次导出再用电子表格计算。
    bash
    customer-io campaigns funnel cmp_482 --segment seg_19 --since 30d --json
  • segments overlap
    — 从本地存储计算细分受众成员的两两及多向维恩图重叠情况。
    用于验证受众设计——比如“我的高流失风险和高价值受众是否重叠?”——无需两次导出数据。
    bash
    customer-io segments overlap seg_19 seg_42 seg_88 --json
  • customers timeline
    — 按时间顺序合并单个客户的身份识别、消息交付、用户屏蔽和细分受众成员资格事件,数据来自本地存储。
    用于事件排查或“欢迎短信是否发送给了该用户?”这类问题——只需一条命令,无需在UI中反复滚动查找。
    bash
    customer-io customers timeline alice@example.com --since 30d --json

Send-time safety

发送时安全性

  • broadcasts preflight
    — 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.
    Use before any broadcast to avoid double-sending, accidental over-mailing, or 429 storms.
    bash
    customer-io broadcasts preflight 123457 bcr_77 --segment seg_19 --json
  • suppressions audit
    — Attribute every suppression in a window to the triggering bounce or complaint delivery (or 'manual' if no preceding event).
    Use when an ops engineer needs to explain why a customer is suppressed, or when auditing complaint-driven churn.
    bash
    customer-io suppressions audit --since 30d --reason bounce --json
  • cdp-reverse-etl health
    — Named verb over Reverse-ETL run history with status, row counts, error reasons, and an optional --watch poll mode.
    Use as the daily standup question 'are warehouse syncs healthy?' — replaces three separate api calls + jq filters.
    bash
    customer-io cdp-reverse-etl health --since 24h --watch
  • broadcasts preflight
    — 在触发广播前,检查目标细分受众规模、屏蔽重叠情况以及本地交付缓存中的最近发送记录;输出带有结构化原因的绿/黄/红判定结果。
    在任何广播前使用,避免重复发送、意外过度发送或429限流风暴。
    bash
    customer-io broadcasts preflight 123457 bcr_77 --segment seg_19 --json
  • suppressions audit
    — 将指定时间段内的每一项屏蔽操作归因于触发它的退信或投诉交付事件(如果没有前置事件则标记为“手动”)。
    当运维工程师需要解释客户被屏蔽的原因,或审计由投诉导致的客户流失时使用。
    bash
    customer-io suppressions audit --since 30d --reason bounce --json
  • cdp-reverse-etl health
    — 通过命名动词查看Reverse-ETL运行历史,包含状态、行数、错误原因,可选
    --watch
    轮询模式。
    用于日常站会中“仓库同步是否正常?”这类问题——替代三次独立API调用+jq过滤。
    bash
    customer-io cdp-reverse-etl health --since 24h --watch

Audit and provenance

审计与溯源

  • suppressions bulk add
    — 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.
    Use for compliance-driven bulk actions where you need to defend later 'who got suppressed when, by whom, with what status code'.
    bash
    customer-io suppressions bulk add --from-csv complaints.csv --reason complaint --dry-run
  • deliveries triage
    — 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.
    Pipe the bundle into Claude or a Notion doc for one-shot incident handoff; replaces 30+ minutes of UI scrolling.
    bash
    customer-io deliveries triage --template tx_91 --status bounced --since 1h --bundle ./incident-2026-05-07
  • suppressions bulk add
    — 读取CSV或JSONL格式的邮箱/客户ID列表,通过自适应限流批量执行屏蔽调用,并将每一次调用追加到按日期分类的本地JSONL审计日志中。
    用于合规驱动的批量操作,后续可追溯“谁在何时被屏蔽,执行方是谁,状态码是什么”。
    bash
    customer-io suppressions bulk add --from-csv complaints.csv --reason complaint --dry-run
  • deliveries triage
    — 按模板、状态和时间段过滤实时+本地交付数据,生成一个独立的打包文件(包含按错误原因分组的SQL汇总文件summary.md、deliveries.jsonl、recipients.txt),可直接粘贴到事件文档中。
    将打包文件导入Claude或Notion文档,即可一键完成事件交接;替代30分钟以上的UI滚动操作。
    bash
    customer-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)
  • customer-io-pp-cli broadcasts get
    — Get one broadcast
  • customer-io-pp-cli broadcasts list
    — List broadcasts in an environment
  • customer-io-pp-cli broadcasts metrics
    — Read metrics for one broadcast
  • customer-io-pp-cli broadcasts trigger
    — Trigger a broadcast (rate-limited to 1 req / 10 s)
campaigns — List campaigns and read campaign + journey metrics
  • customer-io-pp-cli campaigns get
    — Get one campaign
  • customer-io-pp-cli campaigns journey_metrics
    — Read step-by-step journey funnel metrics
  • customer-io-pp-cli campaigns list
    — List campaigns in an environment
  • customer-io-pp-cli campaigns metrics
    — Read aggregate metrics for a campaign
cdp_destinations — List CDP destinations (Premium feature)
  • customer-io-pp-cli cdp_destinations
    — List CDP destinations
cdp_reverse_etl — List Reverse-ETL syncs (Premium feature)
  • customer-io-pp-cli cdp_reverse_etl
    — List Reverse-ETL syncs
cdp_sources — List CDP data sources (Premium feature)
  • customer-io-pp-cli cdp_sources
    — List CDP sources
customers — Manage Customer.io customer profiles within an environment (workspace)
  • customer-io-pp-cli customers get
    — Get a customer's attributes
  • customer-io-pp-cli customers list_activities
    — List activity events for a customer
  • customer-io-pp-cli customers list_messages
    — List messages sent to a customer
  • customer-io-pp-cli customers list_segments
    — List the segments a customer belongs to
deliveries — Inspect delivery events (sends, opens, clicks, bounces, complaints)
  • customer-io-pp-cli deliveries get
    — Get one delivery
  • customer-io-pp-cli deliveries list
    — List recent deliveries
exports — Start, monitor, and download data exports (segment members, deliveries, customers, etc.)
  • customer-io-pp-cli exports download
    — Get the signed download URL for a finished export
  • customer-io-pp-cli exports get
    — Get the status of an export
  • customer-io-pp-cli exports list
    — List recent exports
segments — List segments and inspect segment membership
  • customer-io-pp-cli segments customer_count
    — Get the customer count for a segment
  • customer-io-pp-cli segments get
    — Get one segment
  • customer-io-pp-cli segments list
    — List segments in an environment
  • customer-io-pp-cli segments members
    — List customer IDs in a segment
suppressions — Suppress and unsuppress customers; the official audit surface for compliance actions
  • customer-io-pp-cli suppressions add
    — Suppress a customer
  • customer-io-pp-cli suppressions count
    — Get the count of suppressed customers in an environment (Customer.io has no list endpoint; use 'exports...
  • customer-io-pp-cli suppressions remove
    — Remove a suppression
transactional — Inspect transactional templates and metrics
  • customer-io-pp-cli transactional get_template
    — Get one transactional template
  • customer-io-pp-cli transactional list_templates
    — List transactional templates
  • customer-io-pp-cli transactional template_metrics
    — Read metrics for one transactional template
webhooks — Manage Reporting Webhooks for delivery + engagement events
  • customer-io-pp-cli webhooks get
    — Get one Reporting Webhook
  • customer-io-pp-cli webhooks list
    — List Reporting Webhooks
workspaces — List the environments (workspaces) visible to the Service Account
  • customer-io-pp-cli workspaces account
    — Get the current account details
  • customer-io-pp-cli workspaces list
    — Read the current account, including environment_ids visible to the SA token
broadcasts — 列出、查看和触发一次性广播(速率限制:1请求/10秒)
  • customer-io-pp-cli broadcasts get
    — 获取单个广播信息
  • customer-io-pp-cli broadcasts list
    — 列出环境中的所有广播
  • customer-io-pp-cli broadcasts metrics
    — 读取单个广播的指标
  • customer-io-pp-cli broadcasts trigger
    — 触发广播(速率限制:1请求/10秒)
campaigns — 列出营销活动并读取营销活动+旅程指标
  • customer-io-pp-cli campaigns get
    — 获取单个营销活动信息
  • customer-io-pp-cli campaigns journey_metrics
    — 读取分步旅程漏斗指标
  • customer-io-pp-cli campaigns list
    — 列出环境中的所有营销活动
  • customer-io-pp-cli campaigns metrics
    — 读取营销活动的汇总指标
cdp_destinations — 列出CDP目标(高级功能)
  • customer-io-pp-cli cdp_destinations
    — 列出CDP目标
cdp_reverse_etl — 列出Reverse-ETL同步任务(高级功能)
  • customer-io-pp-cli cdp_reverse_etl
    — 列出Reverse-ETL同步任务
cdp_sources — 列出CDP数据源(高级功能)
  • customer-io-pp-cli cdp_sources
    — 列出CDP数据源
customers — 在环境(工作区)内管理Customer.io客户档案
  • customer-io-pp-cli customers get
    — 获取客户的属性信息
  • customer-io-pp-cli customers list_activities
    — 列出客户的活动事件
  • customer-io-pp-cli customers list_messages
    — 列出发送给客户的消息
  • customer-io-pp-cli customers list_segments
    — 列出客户所属的细分受众
deliveries — 查看交付事件(发送、打开、点击、退信、投诉)
  • customer-io-pp-cli deliveries get
    — 获取单个交付事件信息
  • customer-io-pp-cli deliveries list
    — 列出最近的交付事件
exports — 启动、监控和下载数据导出(细分受众成员、交付记录、客户数据等)
  • customer-io-pp-cli exports download
    — 获取已完成导出的签名下载链接
  • customer-io-pp-cli exports get
    — 获取导出任务的状态
  • customer-io-pp-cli exports list
    — 列出最近的导出任务
segments — 列出细分受众并查看细分受众成员
  • customer-io-pp-cli segments customer_count
    — 获取细分受众的客户数量
  • customer-io-pp-cli segments get
    — 获取单个细分受众信息
  • customer-io-pp-cli segments list
    — 列出环境中的所有细分受众
  • customer-io-pp-cli segments members
    — 列出细分受众中的客户ID
suppressions — 屏蔽和取消屏蔽客户;合规操作的官方审计接口
  • customer-io-pp-cli suppressions add
    — 屏蔽客户
  • customer-io-pp-cli suppressions count
    — 获取环境中被屏蔽客户的数量(Customer.io无列表端点;使用'exports...
  • customer-io-pp-cli suppressions remove
    — 取消客户屏蔽
transactional — 查看事务性模板和指标
  • customer-io-pp-cli transactional get_template
    — 获取单个事务性模板
  • customer-io-pp-cli transactional list_templates
    — 列出事务性模板
  • customer-io-pp-cli transactional template_metrics
    — 读取单个事务性模板的指标
webhooks — 管理交付+互动事件的报告Webhook
  • customer-io-pp-cli webhooks get
    — 获取单个报告Webhook
  • customer-io-pp-cli webhooks list
    — 列出报告Webhook
workspaces — 列出服务账号可见的环境(工作区)
  • customer-io-pp-cli workspaces account
    — 获取当前账号详情
  • customer-io-pp-cli workspaces list
    — 读取当前账号信息,包括服务账号令牌可见的环境ID

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>"
which
resolves a natural-language capability query to the best matching command from this CLI's curated feature index. Exit code
0
means at least one match; exit code
2
means no confident match — fall back to
--help
or use a narrower query.
当你知道要执行的操作但不知道对应的命令时,可直接询问CLI:
bash
customer-io-pp-cli which "<用自己的话描述功能>"
which
命令会将自然语言的功能查询解析为CLI精选功能索引中最匹配的命令。退出码
0
表示至少有一个匹配项;退出码
2
表示没有确定的匹配项——可回退到
--help
或使用更精确的查询。

Recipes

使用示例

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.recipients
The 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.
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.recipients
漏斗命令将同步的交付数据与细分受众成员关联;
--agent
+
--select
将深度嵌套的漏斗响应缩小为仅包含计数和未参与受众列表,保持Agent的上下文简洁。

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-07
Writes 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.
bash
customer-io deliveries triage --template tx_password_reset --status bounced --since 2h --bundle ./incident-bounce-2026-05-07
生成包含分组错误原因的summary.md、完整交付对象的deliveries.jsonl和recipients.txt——可直接粘贴到Notion事件文档或Claude汇总提示中。

Prove that a broadcast is safe to trigger

验证广播是否可安全触发

bash
customer-io broadcasts preflight bcr_summer_promo --segment seg_active_30d --json
Returns 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.
bash
customer-io broadcasts preflight bcr_summer_promo --segment seg_active_30d --json
返回带有结构化原因(细分受众规模、屏蔽重叠情况、同步交付数据中的最近发送记录)的绿/黄/红判定结果。在任何非小规模广播前执行此命令。

Bulk-suppress a complaint list with provenance

带溯源的批量屏蔽投诉列表

bash
customer-io suppressions bulk add --from-csv complaints-2026-05.csv --reason complaint --dry-run
Drop --dry-run to commit. Every call lands in
~/.customer-io/audit/suppressions-2026-05-07.jsonl
with timestamp, recipient, status, and HTTP code — defensible later.
bash
customer-io suppressions bulk add --from-csv complaints-2026-05.csv --reason complaint --dry-run
移除
--dry-run
参数即可执行实际操作。每一次调用都会记录到
~/.customer-io/audit/suppressions-2026-05-07.jsonl
中,包含时间戳、收件人、状态和HTTP状态码——后续可追溯。

Watch Reverse-ETL syncs in real time

实时监控Reverse-ETL同步任务

bash
customer-io cdp-reverse-etl health --watch --since 24h
Polls every 60 s and prints a status row per sync; pipe to
tee
to keep a log.
bash
customer-io cdp-reverse-etl health --watch --since 24h
每60秒轮询一次,并打印每个同步任务的状态行;可通过管道输出到
tee
命令保存日志。

Auth Setup

认证设置

Customer.io uses Service Account tokens (
sa_live_*
prefix). The CLI exchanges the token for a short-lived JWT via the OAuth client-credentials endpoint at
https://us.fly.customer.io/v1/service_accounts/oauth/token
(or
eu.fly.customer.io
for EU workspaces) and uses the JWT as the Bearer for both the Journeys UI API (
/v1/...
) and the CDP control plane (
/cdp/api/...
). Run
customer-io auth login --sa-token $CIO_TOKEN --region us
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.
Run
customer-io-pp-cli doctor
to verify setup.
Customer.io使用服务账号令牌(前缀为
sa_live_*
)。CLI会通过OAuth客户端凭证端点
https://us.fly.customer.io/v1/service_accounts/oauth/token
(欧盟工作区使用
eu.fly.customer.io
)将令牌交换为短期JWT,并使用该JWT作为Journeys UI API(
/v1/...
)和CDP控制平面(
/cdp/api/...
)的Bearer凭证。只需执行一次
customer-io auth login --sa-token $CIO_TOKEN --region us
;缓存的JWT会自动刷新。Track API(单独的站点ID+API密钥认证)在v1版本中未纳入范围——服务账号令牌是统一凭证。
执行
customer-io-pp-cli doctor
验证设置是否正确。

Agent Mode

Agent模式

Add
--agent
to any command. Expands to:
--json --compact --no-input --no-color --yes
.
  • Pipeable — JSON on stdout, errors on stderr
  • Filterable
    --select
    keeps a subset of fields. Dotted paths descend into nested structures; arrays traverse element-wise. Critical for keeping context small on verbose APIs:
    bash
    customer-io-pp-cli broadcasts list mock-value --agent --select id,name,status
  • Previewable
    --dry-run
    shows the request without sending
  • Offline-friendly — sync/search commands can use the local SQLite store when available
  • Non-interactive — never prompts, every input is a flag
  • Explicit retries — use
    --idempotent
    only when an already-existing create should count as success
在任何命令后添加
--agent
参数。等效于:
--json --compact --no-input --no-color --yes
  • 可管道化 — 标准输出为JSON,错误信息输出到标准错误
  • 可过滤
    --select
    参数保留字段子集。点路径可深入嵌套结构;数组可遍历元素。对于冗长的API,这对于保持上下文简洁至关重要:
    bash
    customer-io-pp-cli broadcasts list mock-value --agent --select id,name,status
  • 可预览
    --dry-run
    参数显示请求内容但不发送
  • 离线友好 — 同步/搜索命令在可用时可使用本地SQLite存储
  • 非交互式 — 从不提示,所有输入均通过参数传递
  • 显式重试 — 仅当已存在的创建操作应被视为成功时,使用
    --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
.results
for data and
.meta.source
to know whether it's live or local. A human-readable
N results (live)
summary is printed to stderr only when stdout is a terminal — piped/agent consumers get pure JSON on stdout.
从本地存储或API读取数据的命令会将输出封装在溯源信封中:
json
{
  "meta": {"source": "live" | "local", "synced_at": "...", "reason": "..."},
  "results": <data>
}
解析
.results
获取数据,
.meta.source
表示数据来自实时API还是本地存储。仅当标准输出为终端时,才会在标准错误输出中打印人类可读的
N results (live)
摘要——管道/Agent消费者仅会在标准输出中获取纯JSON。

Agent Feedback

Agent反馈

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 10
Entries are stored locally at
~/.customer-io-pp-cli/feedback.jsonl
. They are never POSTed unless
CUSTOMER_IO_FEEDBACK_ENDPOINT
is set AND either
--send
is passed or
CUSTOMER_IO_FEEDBACK_AUTO_SEND=true
. Default behavior is local-only.
Write what surprised you, not a bug report. Short, specific, one line: that is the part that compounds.
当你(或Agent)发现本CLI存在问题时,可记录反馈:
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 10
反馈条目存储在本地
~/.customer-io-pp-cli/feedback.jsonl
中。仅当设置了
CUSTOMER_IO_FEEDBACK_ENDPOINT
且传递了
--send
参数或
CUSTOMER_IO_FEEDBACK_AUTO_SEND=true
时,才会将反馈POST到指定端点。默认行为仅存储在本地。
写下让你感到意外的内容,而非正式的bug报告。简短、具体、单行描述:这类反馈的价值会不断累积。

Output Delivery

输出交付

Every command accepts
--deliver <sink>
. 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:
SinkEffect
stdout
Default; write to stdout only
file:<path>
Atomically write output to
<path>
(tmp + rename)
webhook:<url>
POST the output body to the URL (
application/json
or
application/x-ndjson
when
--compact
)
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.
所有命令都支持
--deliver <sink>
参数。输出会发送到指定的sink,同时(或替代)输出到标准输出,因此Agent无需手动管道即可路由命令结果。支持三种sink:
Sink效果
stdout
默认值;仅输出到标准输出
file:<path>
原子性地将输出写入
<path>
(先写入临时文件再重命名)
webhook:<url>
将输出体POST到指定URL(
application/json
格式,使用
--compact
时为
application/x-ndjson
格式)
不支持的scheme会返回结构化错误,并列出支持的类型。Webhook调用失败会返回非零退出码,并在标准错误输出中记录URL和HTTP状态。

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 --yes
Explicit flags always win over profile values; profile values win over defaults.
agent-context
lists all available profiles under
available_profiles
so introspecting agents discover them at runtime.
配置文件是一组保存的参数值,可在多次调用中复用。当定时Agent每次运行都使用相同配置执行同一命令时,可使用此功能——即HeyGen的“Beacon”模式。
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 --yes
显式参数始终优先于配置文件值;配置文件值优先于默认值。
agent-context
会在
available_profiles
下列出所有可用配置文件,因此自省Agent可在运行时发现这些配置文件。

Exit Codes

退出码

CodeMeaning
0Success
2Usage error (wrong arguments)
3Resource not found
4Authentication required
5API error (upstream issue)
7Rate limited (wait and retry)
10Config error
代码含义
0成功
2使用错误(参数错误)
3资源未找到
4需要认证
5API错误(上游问题)
7速率限制(等待后重试)
10配置错误

Argument Parsing

参数解析

Parse
$ARGUMENTS
:
  1. Empty,
    help
    , or
    --help
    → show
    customer-io-pp-cli --help
    output
  2. Starts with
    install
    → ends with
    mcp
    → MCP installation; otherwise → see Prerequisites above
  3. Anything else → Direct Use (execute as CLI command with
    --agent
    )
解析
$ARGUMENTS
的逻辑:
  1. 为空、
    help
    --help
    → 显示
    customer-io-pp-cli --help
    输出
  2. install
    开头
    → 若结尾为
    mcp
    → 安装MCP;否则 → 参考上方前提条件中的安装步骤
  3. 其他情况 → 直接使用(添加
    --agent
    参数执行CLI命令)

MCP Server Installation

MCP服务器安装

  1. Install the MCP server:
    bash
    go install github.com/mvanhorn/printing-press-library/library/other/customer-io/cmd/customer-io-pp-mcp@latest
  2. Register with Claude Code:
    bash
    claude mcp add customer-io-pp-mcp -- customer-io-pp-mcp
  3. Verify:
    claude mcp list
  1. 安装MCP服务器:
    bash
    go install github.com/mvanhorn/printing-press-library/library/other/customer-io/cmd/customer-io-pp-mcp@latest
  2. 在Claude Code中注册:
    bash
    claude mcp add customer-io-pp-mcp -- customer-io-pp-mcp
  3. 验证:
    claude mcp list

Direct Use

直接使用

  1. Check if installed:
    which customer-io-pp-cli
    If not found, offer to install (see Prerequisites at the top of this skill).
  2. Match the user query to the best command from the Unique Capabilities and Command Reference above.
  3. Execute with the
    --agent
    flag:
    bash
    customer-io-pp-cli <command> [subcommand] [args] --agent
  4. If ambiguous, drill into subcommand help:
    customer-io-pp-cli <command> --help
    .
  1. 检查是否安装:
    which customer-io-pp-cli
    若未找到,提供安装选项(参考顶部前提条件中的步骤)。
  2. 将用户查询与上方独特功能和命令参考中最匹配的命令对应。
  3. 添加
    --agent
    参数执行:
    bash
    customer-io-pp-cli <command> [subcommand] [args] --agent
  4. 若存在歧义,查看子命令帮助:
    customer-io-pp-cli <command> --help