用途:pp-resend 以 resend-pp-cli 二进制驱动 Resend 邮件服务的 API,适合智能体回答仪表盘或 SDK 难以一次完成的跨资源问题,例如某收件人收到过哪些邮件、联系人属于哪些受众、广播表现趋势、7 天退信率。一次性事务发送仍建议用 npx resend send,模板仍建议用 React Email,本工具定位为面向智能体的补充。
主要能力:覆盖 api-keys、audiences、automations、broadcasts、contact-properties、contacts、domains、emails、events、logs、segments、templates、topics、webhooks 等接口的增删改查。独有能力包括:emails to(某地址的全部邮件及状态、时间戳)、emails timeline(单封邮件事件链)、audiences inventory(受众汇总)、contacts where(联系人所处受众/分组/主题)、broadcasts performance(广播开盘点击退信率)、domains health(域名验证与 DKIM/SPF/DMARC)、deliverability summary(滚动窗口退信率等)、api-keys rotation(密钥年龄与使用情况),以及基于本地 SQLite 的 search。
使用方式:先安装 npx -y @mvanhorn/printing-press-library install resend --cli-only,验证 resend-pp-cli --version;失败可回退 go install github.com/mvanhorn/printing-press-library/library/productivity/resend/cmd/resend-pp-cli@latest(需 Go 1.26.6+)。认证用 resend-pp-cli auth setup 后 set-token,或设置 RESEND_API_KEY,再用 doctor 验证。任意命令可加 --agent(展开为 --json --compact --no-input --no-color --yes),支持 --select 字段筛选、--dry-run、--deliver 输出到 file: 或 webhook:、--profile 保存参数组合。
限制:需自行获取并配置令牌;部分 audiences 接口已标记弃用,建议改用 segments;search 需先执行 sync --full;输出信封中数据在 .results,来源在 .meta.source;缺失事实暂未提供。