pp-beehiiv

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
<!-- GENERATED FILE — DO NOT EDIT. This file is a verbatim mirror of library/marketing/beehiiv/SKILL.md, regenerated post-merge by tools/generate-skills/. Hand-edits here are silently overwritten on the next regen. Edit the library/ source instead. See AGENTS.md "Generated artifacts: registry.json, cli-skills/". -->
<!-- 生成文件 — 请勿编辑。 此文件是library/marketing/beehiiv/SKILL.md的精确镜像, 由tools/generate-skills/在合并后重新生成。此处的手动编辑会在下次生成时被静默覆盖。请改为编辑library/源文件。 参见AGENTS.md中的"生成产物:registry.json, cli-skills/"。 -->

Beehiiv — Printing Press CLI

Beehiiv — Printing Press CLI

Prerequisites: Install the CLI

前提条件:安装CLI

This skill drives the
beehiiv-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 beehiiv --cli-only
  2. Verify:
    beehiiv-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.26.3 or newer):
bash
go install github.com/mvanhorn/printing-press-library/library/marketing/beehiiv/cmd/beehiiv-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.
此技能驱动
beehiiv-pp-cli
二进制文件。在调用此技能的任何命令之前,您必须确认CLI已安装。如果未安装,请先执行以下步骤:
  1. 通过Printing Press安装程序安装:
    bash
    npx -y @mvanhorn/printing-press install beehiiv --cli-only
  2. 验证:
    beehiiv-pp-cli --version
  3. 确保
    $GOPATH/bin
    (或
    $HOME/go/bin
    )已添加到
    $PATH
    环境变量中。
如果npx安装失败(无Node环境、离线等),可以回退到直接通过Go安装(需要Go 1.26.3或更高版本):
bash
go install github.com/mvanhorn/printing-press-library/library/marketing/beehiiv/cmd/beehiiv-pp-cli@latest
如果安装后执行
--version
提示“command not found”,说明安装步骤未将二进制文件添加到
$PATH
中。在验证成功前,请勿继续使用此技能的命令。

Unique Capabilities

独特功能

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

Publication intelligence

出版物智能分析

  • insights growth-summary
    — Summarize publication, subscriber, post, referral, and custom-field health in one read-only response.
    Use this first when an agent needs a compact account-level picture before choosing a narrower Beehiiv endpoint.
    bash
    beehiiv-pp-cli insights growth-summary pub_00000000-0000-0000-0000-000000000000 --agent
  • insights post-performance
    — List recent posts with status, audience, publish timing, and any available expanded stats.
    Use this when an agent needs to inspect content output before drilling into one post.
    bash
    beehiiv-pp-cli insights post-performance pub_00000000-0000-0000-0000-000000000000 --limit 25 --agent
  • insights growth-summary
    — 在一个只读响应中汇总出版物、订阅者、帖子、推荐和自定义字段的健康状态。
    当Agent需要先获取账户级别的简洁概览,再选择更细分的Beehiiv接口时,请首先使用此命令。
    bash
    beehiiv-pp-cli insights growth-summary pub_00000000-0000-0000-0000-000000000000 --agent
  • insights post-performance
    — 列出近期帖子的状态、受众、发布时间及所有可用的扩展统计数据。
    当Agent需要先检查内容输出情况,再深入分析单个帖子时,请使用此命令。
    bash
    beehiiv-pp-cli insights post-performance pub_00000000-0000-0000-0000-000000000000 --limit 25 --agent

Audience intelligence

受众智能分析

  • insights subscriber-sources
    — Group subscribers by UTM, channel, and referring-site fields to see where audience growth is coming from.
    Use this when the question is about acquisition channels rather than individual subscribers.
    bash
    beehiiv-pp-cli insights subscriber-sources pub_00000000-0000-0000-0000-000000000000 --limit 100 --agent
  • insights field-coverage
    — Inspect custom-field definitions alongside subscriber sample size for enrichment planning.
    Use this before importing, enriching, or auditing subscriber metadata.
    bash
    beehiiv-pp-cli insights field-coverage pub_00000000-0000-0000-0000-000000000000 --agent
  • insights subscriber-lookup
    — Find one subscriber by email or subscription ID and return a compact subscriber record.
    Use this when the task is about one subscriber and broad list calls would waste context.
    bash
    beehiiv-pp-cli insights subscriber-lookup pub_00000000-0000-0000-0000-000000000000 --email reader@example.com --agent
  • insights subscriber-sources
    — 按UTM参数、渠道和来源网站字段对订阅者进行分组,查看受众增长的来源。
    当问题聚焦于获客渠道而非单个订阅者时,请使用此命令。
    bash
    beehiiv-pp-cli insights subscriber-sources pub_00000000-0000-0000-0000-000000000000 --limit 100 --agent
  • insights field-coverage
    — 查看自定义字段定义及对应的订阅者样本量,用于规划受众数据 enrichment。
    在导入、丰富或审核订阅者元数据之前,请使用此命令。
    bash
    beehiiv-pp-cli insights field-coverage pub_00000000-0000-0000-0000-000000000000 --agent
  • insights subscriber-lookup
    — 通过邮箱或订阅ID查找单个订阅者,并返回简洁的订阅者记录。
    当任务仅针对单个订阅者,而调用宽泛的列表命令会浪费上下文时,请使用此命令。
    bash
    beehiiv-pp-cli insights subscriber-lookup pub_00000000-0000-0000-0000-000000000000 --email reader@example.com --agent

Growth loops

增长循环管理

  • insights referral-health
    — Summarize referral-program configuration and subscriber referral-code coverage.
    Use this when an agent needs to check whether referral growth is configured and visible in subscriber data.
    bash
    beehiiv-pp-cli insights referral-health pub_00000000-0000-0000-0000-000000000000 --agent
  • insights referral-health
    — 汇总推荐计划配置和订阅者推荐码覆盖情况。
    当Agent需要检查推荐增长是否已配置,且在订阅者数据中可见时,请使用此命令。
    bash
    beehiiv-pp-cli insights referral-health pub_00000000-0000-0000-0000-000000000000 --agent

Command Reference

命令参考

advertisement-opportunities — Manage advertisement opportunities
  • beehiiv-pp-cli advertisement-opportunities <publicationId>
    — Get advertisement opportunities <Badge intent='info' minimal outlined>OAuth Scope: posts:read</Badge>
authors — Manage authors
  • beehiiv-pp-cli authors index
    — Retrieve a list of authors available for the publication.
  • beehiiv-pp-cli authors show
    — Retrieve a single author from a publication.
automations — Manage automations
  • beehiiv-pp-cli automations index
    — List automations <Badge intent='info' minimal outlined>OAuth Scope: automations:read</Badge>
  • beehiiv-pp-cli automations show
    — Get automation <Badge intent='info' minimal outlined>OAuth Scope: automations:read</Badge>
bulk-subscription-updates — Manage bulk subscription updates
  • beehiiv-pp-cli bulk-subscription-updates index
    — List subscription updates <Badge intent='info' minimal outlined>OAuth Scope: subscriptions:read</Badge>
  • beehiiv-pp-cli bulk-subscription-updates show
    — Get subscription update <Badge intent='info' minimal outlined>OAuth Scope: subscriptions:read</Badge>
bulk-subscriptions — Manage bulk subscriptions
  • beehiiv-pp-cli bulk-subscriptions <publicationId>
    — Bulk create subscription <Badge intent='info' minimal outlined>OAuth Scope: subscriptions:write</Badge>
condition-sets — Manage condition sets
  • beehiiv-pp-cli condition-sets index
    — Retrieve all active condition sets for a publication. Condition sets define reusable audience segments for targeting...
  • beehiiv-pp-cli condition-sets show
    — Retrieve a single active dynamic content condition set for a publication. Use
    expand[]=stats
    to calculate and...
custom-fields — Manage custom fields
  • beehiiv-pp-cli custom-fields create
    — Create custom field <Badge intent='info' minimal outlined>OAuth Scope: custom_fields:write</Badge>
  • beehiiv-pp-cli custom-fields delete
    — Delete custom field <Badge intent='info' minimal outlined>OAuth Scope: custom_fields:write</Badge>
  • beehiiv-pp-cli custom-fields index
    — List custom fields <Badge intent='info' minimal outlined>OAuth Scope: custom_fields:read</Badge>
  • beehiiv-pp-cli custom-fields patch
    — Update custom field <Badge intent='info' minimal outlined>OAuth Scope: custom_fields:write</Badge>
  • beehiiv-pp-cli custom-fields put
    — Update custom field <Badge intent='info' minimal outlined>OAuth Scope: custom_fields:write</Badge>
  • beehiiv-pp-cli custom-fields show
    — Get custom field <Badge intent='info' minimal outlined>OAuth Scope: custom_fields:read</Badge>
data-privacy — Manage data privacy
  • beehiiv-pp-cli data-privacy data-deletion-create
    <Warning>This is a gated feature that requires enablement. Contact support to enable Data Deletion API access for...
  • beehiiv-pp-cli data-privacy data-deletion-index
    <Warning>This is a gated feature that requires enablement. Contact support to enable Data Deletion API access for...
  • beehiiv-pp-cli data-privacy data-deletion-show
    <Warning>This is a gated feature that requires enablement. Contact support to enable Data Deletion API access for...
email-blasts — Manage email blasts
  • beehiiv-pp-cli email-blasts index
    — List email blasts <Badge intent='info' minimal outlined>OAuth Scope: posts:read</Badge>
  • beehiiv-pp-cli email-blasts show
    — Get email blast <Badge intent='info' minimal outlined>OAuth Scope: posts:read</Badge>
engagements — Manage engagements
  • beehiiv-pp-cli engagements <publicationId>
    — Retrieve email engagement metrics for a specific publication over a defined date range and granularity.<br><br> By...
newsletter-lists — Manage newsletter lists
  • beehiiv-pp-cli newsletter-lists index
    <Note title='Currently in beta' icon='b'> Newsletter Lists is currently in beta, the API is subject to change....
  • beehiiv-pp-cli newsletter-lists show
    <Note title='Currently in beta' icon='b'> Newsletter Lists is currently in beta, the API is subject to change....
polls — Manage polls
  • beehiiv-pp-cli polls index
    — Retrieve all polls belonging to a specific publication. Poll choices are always included. Use
    expand[]=stats
    to...
  • beehiiv-pp-cli polls show
    — Retrieve detailed information about a specific poll belonging to a publication. Use
    expand[]=stats
    for aggregate...
post-templates — Manage post templates
  • beehiiv-pp-cli post-templates <publicationId>
    — Retrieve a list of post templates available for the publication.
posts — Manage posts
  • beehiiv-pp-cli posts aggregate-stats
    — Get aggregate stats <Badge intent='info' minimal outlined>OAuth Scope: posts:read</Badge>
  • beehiiv-pp-cli posts create
    <Note title='Currently in beta' icon='b'> This feature is currently in beta, the API is subject to change, and...
  • beehiiv-pp-cli posts delete
    — Delete or Archive a post. Any post that has been confirmed will have it's status changed to
    archived
    . Posts in the...
  • beehiiv-pp-cli posts index
    — List posts <Badge intent='info' minimal outlined>OAuth Scope: posts:read</Badge>
  • beehiiv-pp-cli posts show
    — Get post <Badge intent='info' minimal outlined>OAuth Scope: posts:read</Badge>
  • beehiiv-pp-cli posts update
    <Note title='Currently in beta' icon='b'> This feature is currently in beta, the API is subject to change, and...
publications — Manage publications
  • beehiiv-pp-cli publications index
    — List publications <Badge intent='info' minimal outlined>OAuth Scope: publications:read</Badge>
  • beehiiv-pp-cli publications show
    — Get publication <Badge intent='info' minimal outlined>OAuth Scope: publications:read</Badge>
referral-program — Manage referral program
  • beehiiv-pp-cli referral-program <publicationId>
    — Get referral program <Badge intent='info' minimal outlined>OAuth Scope: referral_program:read</Badge>
segments — Manage segments
  • beehiiv-pp-cli segments create
    — Create a new segment.<br><br> Manual segments — Use
    subscriptions
    or
    emails
    input to create a segment from...
  • beehiiv-pp-cli segments delete
    — Delete a segment. Deleting the segment does not effect the subscriptions in the segment.
  • beehiiv-pp-cli segments index
    — List segments <Badge intent='info' minimal outlined>OAuth Scope: segments:read</Badge>
  • beehiiv-pp-cli segments show
    — Get segment <Badge intent='info' minimal outlined>OAuth Scope: segments:read</Badge>
subscriptions — Manage subscriptions
  • beehiiv-pp-cli subscriptions bulk-updates-patch
    — Update subscriptions <Badge intent='info' minimal outlined>OAuth Scope: subscriptions:write</Badge>
  • beehiiv-pp-cli subscriptions bulk-updates-patch-status
    — Update subscriptions' status <Badge intent='info' minimal outlined>OAuth Scope: subscriptions:write</Badge>
  • beehiiv-pp-cli subscriptions bulk-updates-put
    — Update subscriptions <Badge intent='info' minimal outlined>OAuth Scope: subscriptions:write</Badge>
  • beehiiv-pp-cli subscriptions bulk-updates-put-status
    — Update subscriptions' status <Badge intent='info' minimal outlined>OAuth Scope: subscriptions:write</Badge>
  • beehiiv-pp-cli subscriptions create
    — Create subscription <Badge intent='info' minimal outlined>OAuth Scope: subscriptions:write</Badge>
  • beehiiv-pp-cli subscriptions delete
    <Warning>This cannot be undone. All data associated with the subscription will also be deleted. We recommend...
  • beehiiv-pp-cli subscriptions get-by-email
    <Info>Please note that this endpoint requires the email to be URL encoded. Please reference your language's...
  • beehiiv-pp-cli subscriptions get-by-id
    <Info>In previous versions of the API, another endpoint existed to retrieve a subscription by the subscriber ID....
  • beehiiv-pp-cli subscriptions get-by-subscriber-id
    — Get subscription by subscriber ID <Badge intent='info' minimal outlined>OAuth Scope: subscriptions:read</Badge>
  • beehiiv-pp-cli subscriptions index
    — Retrieve all subscriptions belonging to a specific publication. <Info> New: This endpoint now supports...
  • beehiiv-pp-cli subscriptions patch
    — Update subscription by ID <Badge intent='info' minimal outlined>OAuth Scope: subscriptions:write</Badge>
  • beehiiv-pp-cli subscriptions put
    — Update subscription by ID <Badge intent='info' minimal outlined>OAuth Scope: subscriptions:write</Badge>
  • beehiiv-pp-cli subscriptions update-by-email
    — Update subscription by email <Badge intent='info' minimal outlined>OAuth Scope: subscriptions:write</Badge>
tiers — Manage tiers
  • beehiiv-pp-cli tiers create
    — Create a tier <Badge intent='info' minimal outlined>OAuth Scope: tiers:write</Badge>
  • beehiiv-pp-cli tiers index
    — List tiers <Badge intent='info' minimal outlined>OAuth Scope: tiers:read</Badge>
  • beehiiv-pp-cli tiers patch
    — Update a tier <Badge intent='info' minimal outlined>OAuth Scope: tiers:write</Badge>
  • beehiiv-pp-cli tiers put
    — Update a tier <Badge intent='info' minimal outlined>OAuth Scope: tiers:write</Badge>
  • beehiiv-pp-cli tiers show
    — Get tier <Badge intent='info' minimal outlined>OAuth Scope: tiers:read</Badge>
users — Manage users
  • beehiiv-pp-cli users
    — Identify user <Badge intent='info' minimal outlined>OAuth Scope: identify:read</Badge>
webhooks — Manage webhooks
  • beehiiv-pp-cli webhooks create
    — Create a webhook <Badge intent='info' minimal outlined>OAuth Scope: webhooks:write</Badge>
  • beehiiv-pp-cli webhooks delete
    — Delete a webhook <Badge intent='info' minimal outlined>OAuth Scope: webhooks:write</Badge>
  • beehiiv-pp-cli webhooks index
    — List webhooks <Badge intent='info' minimal outlined>OAuth Scope: webhooks:read</Badge>
  • beehiiv-pp-cli webhooks show
    — Get webhook <Badge intent='info' minimal outlined>OAuth Scope: webhooks:read</Badge>
  • beehiiv-pp-cli webhooks update
    — Update webhook <Badge intent='info' minimal outlined>OAuth Scope: webhooks:write</Badge>
workspaces — Manage workspaces
  • beehiiv-pp-cli workspaces identify
    — Identify workspace <Badge intent='info' minimal outlined>OAuth Scope: identify:read</Badge>
  • beehiiv-pp-cli workspaces publications-by-subscription-email
    — Retrieve all publications in the workspace that have a subscription for the specified email address. The workspace...
advertisement-opportunities — 管理广告投放机会
  • beehiiv-pp-cli advertisement-opportunities <publicationId>
    — 获取广告投放机会 <Badge intent='info' minimal outlined>OAuth权限:posts:read</Badge>
authors — 管理作者
  • beehiiv-pp-cli authors index
    — 获取出版物可用的作者列表。
  • beehiiv-pp-cli authors show
    — 获取出版物中单个作者的信息。
automations — 管理自动化任务
  • beehiiv-pp-cli automations index
    — 列出自动化任务 <Badge intent='info' minimal outlined>OAuth权限:automations:read</Badge>
  • beehiiv-pp-cli automations show
    — 获取单个自动化任务信息 <Badge intent='info' minimal outlined>OAuth权限:automations:read</Badge>
bulk-subscription-updates — 管理批量订阅更新
  • beehiiv-pp-cli bulk-subscription-updates index
    — 列出订阅更新记录 <Badge intent='info' minimal outlined>OAuth权限:subscriptions:read</Badge>
  • beehiiv-pp-cli bulk-subscription-updates show
    — 获取单个订阅更新记录 <Badge intent='info' minimal outlined>OAuth权限:subscriptions:read</Badge>
bulk-subscriptions — 管理批量订阅
  • beehiiv-pp-cli bulk-subscriptions <publicationId>
    — 批量创建订阅 <Badge intent='info' minimal outlined>OAuth权限:subscriptions:write</Badge>
condition-sets — 管理条件集合
  • beehiiv-pp-cli condition-sets index
    — 获取出版物的所有活跃条件集合。条件集合定义了可复用的受众细分群体,用于定向投放...
  • beehiiv-pp-cli condition-sets show
    — 获取出版物中单个活跃动态内容条件集合。使用
    expand[]=stats
    来计算并...
custom-fields — 管理自定义字段
  • beehiiv-pp-cli custom-fields create
    — 创建自定义字段 <Badge intent='info' minimal outlined>OAuth权限:custom_fields:write</Badge>
  • beehiiv-pp-cli custom-fields delete
    — 删除自定义字段 <Badge intent='info' minimal outlined>OAuth权限:custom_fields:write</Badge>
  • beehiiv-pp-cli custom-fields index
    — 列出自定义字段 <Badge intent='info' minimal outlined>OAuth权限:custom_fields:read</Badge>
  • beehiiv-pp-cli custom-fields patch
    — 更新自定义字段 <Badge intent='info' minimal outlined>OAuth权限:custom_fields:write</Badge>
  • beehiiv-pp-cli custom-fields put
    — 更新自定义字段 <Badge intent='info' minimal outlined>OAuth权限:custom_fields:write</Badge>
  • beehiiv-pp-cli custom-fields show
    — 获取单个自定义字段信息 <Badge intent='info' minimal outlined>OAuth权限:custom_fields:read</Badge>
data-privacy — 管理数据隐私
  • beehiiv-pp-cli data-privacy data-deletion-create
    <Warning>这是一项 gated 功能,需要启用权限。请联系支持团队以启用数据删除API访问权限...
  • beehiiv-pp-cli data-privacy data-deletion-index
    <Warning>这是一项 gated 功能,需要启用权限。请联系支持团队以启用数据删除API访问权限...
  • beehiiv-pp-cli data-privacy data-deletion-show
    <Warning>这是一项 gated 功能,需要启用权限。请联系支持团队以启用数据删除API访问权限...
email-blasts — 管理邮件群发
  • beehiiv-pp-cli email-blasts index
    — 列出邮件群发记录 <Badge intent='info' minimal outlined>OAuth权限:posts:read</Badge>
  • beehiiv-pp-cli email-blasts show
    — 获取单个邮件群发记录 <Badge intent='info' minimal outlined>OAuth权限:posts:read</Badge>
engagements — 管理互动数据
  • beehiiv-pp-cli engagements <publicationId>
    — 获取特定出版物在指定日期范围和粒度下的邮件互动指标。<br><br> 通过...
newsletter-lists — 管理新闻通讯列表
  • beehiiv-pp-cli newsletter-lists index
    <Note title='当前处于测试版' icon='b'> 新闻通讯列表当前处于测试版,API可能会发生变更....
  • beehiiv-pp-cli newsletter-lists show
    <Note title='当前处于测试版' icon='b'> 新闻通讯列表当前处于测试版,API可能会发生变更....
polls — 管理投票
  • beehiiv-pp-cli polls index
    — 获取特定出版物的所有投票。投票选项会始终包含在内。使用
    expand[]=stats
    来...
  • beehiiv-pp-cli polls show
    — 获取出版物中单个投票的详细信息。使用
    expand[]=stats
    获取汇总...
post-templates — 管理帖子模板
  • beehiiv-pp-cli post-templates <publicationId>
    — 获取出版物可用的帖子模板列表。
posts — 管理帖子
  • beehiiv-pp-cli posts aggregate-stats
    — 获取汇总统计数据 <Badge intent='info' minimal outlined>OAuth权限:posts:read</Badge>
  • beehiiv-pp-cli posts create
    <Note title='当前处于测试版' icon='b'> 此功能当前处于测试版,API可能会发生变更,且...
  • beehiiv-pp-cli posts delete
    — 删除或归档帖子。任何已确认的帖子状态会变为
    archived
    。处于...状态的帖子...
  • beehiiv-pp-cli posts index
    — 列出帖子 <Badge intent='info' minimal outlined>OAuth权限:posts:read</Badge>
  • beehiiv-pp-cli posts show
    — 获取单个帖子信息 <Badge intent='info' minimal outlined>OAuth权限:posts:read</Badge>
  • beehiiv-pp-cli posts update
    <Note title='当前处于测试版' icon='b'> 此功能当前处于测试版,API可能会发生变更,且...
publications — 管理出版物
  • beehiiv-pp-cli publications index
    — 列出出版物 <Badge intent='info' minimal outlined>OAuth权限:publications:read</Badge>
  • beehiiv-pp-cli publications show
    — 获取单个出版物信息 <Badge intent='info' minimal outlined>OAuth权限:publications:read</Badge>
referral-program — 管理推荐计划
  • beehiiv-pp-cli referral-program <publicationId>
    — 获取推荐计划信息 <Badge intent='info' minimal outlined>OAuth权限:referral_program:read</Badge>
segments — 管理受众细分
  • beehiiv-pp-cli segments create
    — 创建新的受众细分。<br><br> 手动细分 — 使用
    subscriptions
    emails
    输入参数,从...创建细分群体
  • beehiiv-pp-cli segments delete
    — 删除受众细分。删除细分不会影响细分中的订阅者。
  • beehiiv-pp-cli segments index
    — 列出受众细分 <Badge intent='info' minimal outlined>OAuth权限:segments:read</Badge>
  • beehiiv-pp-cli segments show
    — 获取单个受众细分信息 <Badge intent='info' minimal outlined>OAuth权限:segments:read</Badge>
subscriptions — 管理订阅
  • beehiiv-pp-cli subscriptions bulk-updates-patch
    — 更新订阅 <Badge intent='info' minimal outlined>OAuth权限:subscriptions:write</Badge>
  • beehiiv-pp-cli subscriptions bulk-updates-patch-status
    — 更新订阅状态 <Badge intent='info' minimal outlined>OAuth权限:subscriptions:write</Badge>
  • beehiiv-pp-cli subscriptions bulk-updates-put
    — 更新订阅 <Badge intent='info' minimal outlined>OAuth权限:subscriptions:write</Badge>
  • beehiiv-pp-cli subscriptions bulk-updates-put-status
    — 更新订阅状态 <Badge intent='info' minimal outlined>OAuth权限:subscriptions:write</Badge>
  • beehiiv-pp-cli subscriptions create
    — 创建订阅 <Badge intent='info' minimal outlined>OAuth权限:subscriptions:write</Badge>
  • beehiiv-pp-cli subscriptions delete
    <Warning>此操作不可撤销。与订阅相关的所有数据也会被删除。我们建议...
  • beehiiv-pp-cli subscriptions get-by-email
    <Info>请注意,此接口要求邮箱地址进行URL编码。请参考您使用的语言的...
  • beehiiv-pp-cli subscriptions get-by-id
    <Info>在API的早期版本中,存在另一个通过订阅者ID获取订阅信息的接口....
  • beehiiv-pp-cli subscriptions get-by-subscriber-id
    — 通过订阅者ID获取订阅信息 <Badge intent='info' minimal outlined>OAuth权限:subscriptions:read</Badge>
  • beehiiv-pp-cli subscriptions index
    — 获取特定出版物的所有订阅信息。<Info> 新增:此接口现在支持...
  • beehiiv-pp-cli subscriptions patch
    — 通过ID更新订阅信息 <Badge intent='info' minimal outlined>OAuth权限:subscriptions:write</Badge>
  • beehiiv-pp-cli subscriptions put
    — 通过ID更新订阅信息 <Badge intent='info' minimal outlined>OAuth权限:subscriptions:write</Badge>
  • beehiiv-pp-cli subscriptions update-by-email
    — 通过邮箱更新订阅信息 <Badge intent='info' minimal outlined>OAuth权限:subscriptions:write</Badge>
tiers — 管理订阅层级
  • beehiiv-pp-cli tiers create
    — 创建订阅层级 <Badge intent='info' minimal outlined>OAuth权限:tiers:write</Badge>
  • beehiiv-pp-cli tiers index
    — 列出订阅层级 <Badge intent='info' minimal outlined>OAuth权限:tiers:read</Badge>
  • beehiiv-pp-cli tiers patch
    — 更新订阅层级 <Badge intent='info' minimal outlined>OAuth权限:tiers:write</Badge>
  • beehiiv-pp-cli tiers put
    — 更新订阅层级 <Badge intent='info' minimal outlined>OAuth权限:tiers:write</Badge>
  • beehiiv-pp-cli tiers show
    — 获取单个订阅层级信息 <Badge intent='info' minimal outlined>OAuth权限:tiers:read</Badge>
users — 管理用户
  • beehiiv-pp-cli users
    — 识别用户 <Badge intent='info' minimal outlined>OAuth权限:identify:read</Badge>
webhooks — 管理Webhook
  • beehiiv-pp-cli webhooks create
    — 创建Webhook <Badge intent='info' minimal outlined>OAuth权限:webhooks:write</Badge>
  • beehiiv-pp-cli webhooks delete
    — 删除Webhook <Badge intent='info' minimal outlined>OAuth权限:webhooks:write</Badge>
  • beehiiv-pp-cli webhooks index
    — 列出Webhook <Badge intent='info' minimal outlined>OAuth权限:webhooks:read</Badge>
  • beehiiv-pp-cli webhooks show
    — 获取单个Webhook信息 <Badge intent='info' minimal outlined>OAuth权限:webhooks:read</Badge>
  • beehiiv-pp-cli webhooks update
    — 更新Webhook <Badge intent='info' minimal outlined>OAuth权限:webhooks:write</Badge>
workspaces — 管理工作区
  • beehiiv-pp-cli workspaces identify
    — 识别工作区 <Badge intent='info' minimal outlined>OAuth权限:identify:read</Badge>
  • beehiiv-pp-cli workspaces publications-by-subscription-email
    — 获取工作区中包含指定邮箱订阅的所有出版物。工作区...

Finding the right command

查找合适的命令

When you know what you want to do but not which command does it, ask the CLI directly:
bash
beehiiv-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
beehiiv-pp-cli which "<用您自己的语言描述功能>"
which
命令会将自然语言的功能查询解析为CLI精选功能索引中最匹配的命令。退出码
0
表示至少找到一个匹配项;退出码
2
表示没有找到明确匹配项 — 请回退使用
--help
或使用更精确的查询。

Auth Setup

认证设置

Store your access token:
bash
beehiiv-pp-cli auth set-token YOUR_TOKEN_HERE
Or set
BEEHIIV_BEARER_AUTH
as an environment variable.
Run
beehiiv-pp-cli doctor
to verify setup.
存储您的访问令牌:
bash
beehiiv-pp-cli auth set-token YOUR_TOKEN_HERE
或者将
BEEHIIV_BEARER_AUTH
设置为环境变量。
执行
beehiiv-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
    beehiiv-pp-cli advertisement-opportunities 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, and
    --ignore-missing
    only when a missing delete target should count as success
在任何命令后添加
--agent
参数。此参数等价于:
--json --compact --no-input --no-color --yes
  • 可管道传输 — JSON输出到标准输出,错误信息输出到标准错误
  • 可过滤
    --select
    参数保留指定字段子集。点路径可深入嵌套结构;数组可遍历每个元素。对于输出冗长的API,这是缩小上下文范围的关键:
    bash
    beehiiv-pp-cli advertisement-opportunities mock-value --agent --select id,name,status
  • 可预览
    --dry-run
    参数显示请求内容但不发送
  • 离线友好 — 同步/搜索命令在可用时可使用本地SQLite存储
  • 非交互式 — 从不提示输入,所有输入均通过标志参数传递
  • 显式重试 — 仅当已存在的创建操作应被视为成功时使用
    --idempotent
    ,仅当缺失的删除目标应被视为成功时使用
    --ignore-missing

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
判断数据是实时的还是本地的。只有当标准输出是终端时,才会向标准错误输出人类可读的
N results (live)
摘要 — 管道/Agent消费者只会在标准输出获取纯JSON数据。

Agent Feedback

Agent反馈

When you (or the agent) notice something off about this CLI, record it:
beehiiv-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
beehiiv-pp-cli feedback --stdin < notes.txt
beehiiv-pp-cli feedback list --json --limit 10
Entries are stored locally at
~/.beehiiv-pp-cli/feedback.jsonl
. They are never POSTed unless
BEEHIIV_FEEDBACK_ENDPOINT
is set AND either
--send
is passed or
BEEHIIV_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存在问题时,可以记录反馈:
beehiiv-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
beehiiv-pp-cli feedback --stdin < notes.txt
beehiiv-pp-cli feedback list --json --limit 10
反馈条目会存储在本地
~/.beehiiv-pp-cli/feedback.jsonl
文件中。除非设置了
BEEHIIV_FEEDBACK_ENDPOINT
且传递了
--send
参数或设置了
BEEHIIV_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(当使用
--compact
时为
application/json
application/x-ndjson
格式)
不支持的协议会返回结构化错误,并列出支持的协议集合。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.
beehiiv-pp-cli profile save briefing --json
beehiiv-pp-cli --profile briefing advertisement-opportunities mock-value
beehiiv-pp-cli profile list --json
beehiiv-pp-cli profile show briefing
beehiiv-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"模式。
beehiiv-pp-cli profile save briefing --json
beehiiv-pp-cli --profile briefing advertisement-opportunities mock-value
beehiiv-pp-cli profile list --json
beehiiv-pp-cli profile show briefing
beehiiv-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
    beehiiv-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
    → 显示
    beehiiv-pp-cli --help
    输出
  2. install
    开头
    → 以
    mcp
    结尾 → MCP安装;否则 → 参见上方的前提条件
  3. 其他情况 → 直接使用(以
    --agent
    标志执行CLI命令)

MCP Server Installation

MCP服务器安装

Install the MCP binary from this CLI's published public-library entry or pre-built release, then register it:
bash
claude mcp add beehiiv-pp-mcp -- beehiiv-pp-mcp
Verify:
claude mcp list
从该CLI的已发布公共库条目或预构建版本安装MCP二进制文件,然后注册:
bash
claude mcp add beehiiv-pp-mcp -- beehiiv-pp-mcp
验证:
claude mcp list

Direct Use

直接使用

  1. Check if installed:
    which beehiiv-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
    beehiiv-pp-cli <command> [subcommand] [args] --agent
  4. If ambiguous, drill into subcommand help:
    beehiiv-pp-cli <command> --help
    .
  1. 检查是否已安装:
    which beehiiv-pp-cli
    如果未找到,提供安装选项(参见顶部的前提条件)。
  2. 将用户查询与上方独特功能和命令参考中最匹配的命令对应。
  3. 使用
    --agent
    标志执行命令:
    bash
    beehiiv-pp-cli <command> [subcommand] [args] --agent
  4. 如果存在歧义,查看子命令帮助:
    beehiiv-pp-cli <command> --help