pp-dub

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Dub — Printing Press CLI

Dub — Printing Press CLI

Prerequisites: Install the CLI

前提条件:安装CLI

This skill drives the
dub-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 dub --cli-only
  2. Verify:
    dub-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/marketing/dub/cmd/dub-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.
本技能驱动
dub-pp-cli
二进制文件。在调用本技能的任何命令之前,您必须确认CLI已安装。 如果未安装,请先执行以下步骤:
  1. 通过Printing Press安装器安装:
    bash
    npx -y @mvanhorn/printing-press install dub --cli-only
  2. 验证安装:
    dub-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/marketing/dub/cmd/dub-pp-cli@latest
若安装后执行
--version
提示“command not found”,说明安装未将二进制文件加入
$PATH
,请在验证成功前不要执行技能命令。

When to Use This CLI

何时使用该CLI

Use dub-pp-cli when an agent or operator needs to manage Dub at workspace scale — bulk link operations, campaign-wide UTM rewrites, partner program audits, bounty triage, or local cross-resource analysis. The CLI's local SQLite store makes joins across links, analytics, partners, commissions, and bounties cheap and offline. Reach for dub-pp-cli over the official
dub-cli
when you need anything beyond link shortening or workspace config.
当Agent或操作人员需要在工作区层面管理Dub时,可使用dub-pp-cli——包括批量链接操作、全活动范围的UTM重写、合作伙伴计划审计、赏金分类,或本地跨资源分析。CLI的本地SQLite存储可低成本地离线关联链接、分析数据、合作伙伴、佣金和赏金信息。当您需要链接缩短或工作区配置之外的功能时,优先选择dub-pp-cli而非官方
dub-cli

Unique Capabilities

独特功能

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

Local state that compounds

可累积的本地状态

  • links stale
    — Find archived, expired, or zero-traffic links across the workspace before they pile up.
    Use this to clean up dormant short links before a portfolio review or before bulk-archiving. The /analytics endpoint can't filter links by 'no clicks in N days' in a single call.
    bash
    dub-pp-cli links stale --days 90 --json --select id,key,clicks,archived
  • links drift
    — Detect links whose click rate dropped more than threshold percent week-over-week.
    Catches dying campaigns before reporting deadlines. Use this in a weekly automation to surface attribution links that quietly stopped converting.
    bash
    dub-pp-cli links drift --window 7d --threshold 30 --json
  • links duplicates
    — Find every link in the workspace pointing to the same destination URL.
    Surfaces accidental duplicates from bulk-create overruns and consolidation candidates after a migration.
    bash
    dub-pp-cli links duplicates --json
  • links lint
    — Audit short-key slugs for lookalike collisions, reserved-word violations, and brand-conflict hazards.
    Use this before a brand campaign launch to catch lookalike slugs that confuse partners or get reserved-word treatment.
    bash
    dub-pp-cli links lint --json
  • links rollup
    — Performance dashboard aggregated by tag or folder — clicks, leads, sales rolled up across every link wearing each label.
    Use this to compare campaign performance across tag dimensions without reconciling 5 separate API calls.
    bash
    dub-pp-cli links rollup --by clicks --group-by tag --json
  • funnel
    — Click-to-lead-to-sale conversion rates per link or campaign.
    Surfaces where prospects drop off in your attribution funnel. Use before quarterly reporting to spot links with high clicks and low conversion.
    bash
    dub-pp-cli funnel --link mylink --min-clicks 50 --json
  • customers journey
    — See every link a customer clicked, when they became a lead, and when they purchased — in one timeline.
    Use this for QBR-style account reviews or to debug attribution issues for a specific customer.
    bash
    dub-pp-cli customers journey cust_abc123 --json
  • links stale
    — 查找工作区内已归档、过期或无流量的链接,避免此类链接堆积。
    可用于在组合审查或批量归档前清理闲置短链接。/analytics端点无法通过单次调用筛选“N天内无点击”的链接。
    bash
    dub-pp-cli links stale --days 90 --json --select id,key,clicks,archived
  • links drift
    — 检测点击量周环比下降超过阈值百分比的链接。
    可在报告截止日期前发现效果衰退的活动。可将此命令加入每周自动化流程,找出转化率悄然下滑的归因链接。
    bash
    dub-pp-cli links drift --window 7d --threshold 30 --json
  • links duplicates
    — 查找工作区内指向同一目标URL的所有链接。
    可发现批量创建时意外生成的重复链接,以及迁移后可合并的候选链接。
    bash
    dub-pp-cli links duplicates --json
  • links lint
    — 审核短链接Key的slug,检查相似碰撞、保留词违规和品牌冲突风险。
    可在品牌活动启动前发现易混淆合作伙伴的相似slug,或会被判定为保留词的slug。
    bash
    dub-pp-cli links lint --json
  • links rollup
    — 按标签或文件夹聚合的性能仪表盘——汇总每个标签下所有链接的点击量、线索量和销售额。
    无需协调5次独立API调用,即可跨标签维度比较活动性能。
    bash
    dub-pp-cli links rollup --by clicks --group-by tag --json
  • funnel
    — 每个链接或活动的点击-线索-销售转化率。
    可发现潜在客户在归因漏斗中的流失点。可在季度报告前找出高点击、低转化的链接。
    bash
    dub-pp-cli funnel --link mylink --min-clicks 50 --json
  • customers journey
    — 查看客户点击过的所有链接、成为线索的时间以及购买时间——整合为一条时间线。
    可用于QBR风格的客户账户审查,或排查特定客户的归因问题。
    bash
    dub-pp-cli customers journey cust_abc123 --json

Agent-native plumbing

原生Agent适配

  • links rewrite
    — Show every link that would change and the exact patch BEFORE sending.
    Use this before any campaign-wide rewrite. Diff preview prevents the worst class of bulk-mutation mistakes.
    bash
    dub-pp-cli links rewrite --match 'utm_source=oldcampaign' --replace 'utm_source=newcampaign' --dry-run
  • health
    — Cross-resource Monday-morning report: rate-limit headroom, expired-but-active links, dead destination URLs, unverified domains, dormant tags, bounty submissions awaiting review.
    Use this as the first thing every morning, or as a CI canary. Surfaces what needs attention without dashboard hopping.
    bash
    dub-pp-cli health --json
  • since
    — What happened in the last N hours? Created, updated, deleted links plus partner approvals, new bounty submissions, and top-clicked entities.
    Use this in agent loops to summarize workspace activity since the last check-in. Cheap and idempotent.
    bash
    dub-pp-cli since 24h --json
  • links rewrite
    — 在发送请求前显示所有将被修改的链接及具体补丁内容。
    可在全活动范围重写前使用。差异预览可避免最严重的批量修改错误。
    bash
    dub-pp-cli links rewrite --match 'utm_source=oldcampaign' --replace 'utm_source=newcampaign' --dry-run
  • health
    — 跨资源的周一晨间报告:速率限制余量、已过期但仍活跃的链接、失效目标URL、未验证域名、闲置标签、待审核的赏金提交。
    可作为每日晨间第一项工作,或CI监控任务。无需切换仪表盘即可了解需关注的事项。
    bash
    dub-pp-cli health --json
  • since
    — 过去N小时内发生了什么?包括创建、更新、删除的链接,以及合作伙伴审批、新赏金提交和高点击实体。
    可在Agent循环中使用,总结自上次检查以来的工作区活动。成本低且具有幂等性。
    bash
    dub-pp-cli since 24h --json

Partner ops

合作伙伴运营

  • partners leaderboard
    — Rank partners by commission earned, conversion rate, and clicks generated.
    Use this to identify top performers before a partner-tier review, or dormant partners worth deactivating.
    bash
    dub-pp-cli partners leaderboard --by commission --top 10 --json
  • partners audit-commissions
    — Reconcile partners, commissions, bounties, and payouts to flag stale rates, missing payouts, and expired bounties still earning.
    Run this before a payout cycle to catch billing surprises. Use in CI before any commission-rate migration.
    bash
    dub-pp-cli partners audit-commissions --json
  • bounties triage
    — Group partner-submitted bounty proof by status, age, and bounty type. Surfaces backlog awaiting review.
    Run weekly to keep bounty submissions from rotting. Bounty programs lose partner trust when submissions sit unreviewed.
    bash
    dub-pp-cli bounties triage --status pending --older-than 7d --json
  • bounties payout-projection
    — Project upcoming payouts from approved-but-unpaid submissions multiplied by current commission rates.
    Use this for finance/marketing planning. Surfaces upcoming payout liability before the next payout cycle.
    bash
    dub-pp-cli bounties payout-projection --window 30d --json
  • partners leaderboard
    — 按赚取佣金、转化率和生成点击量对合作伙伴排名。
    可在合作伙伴层级审查前识别顶级执行者,或找出值得停用的闲置合作伙伴。
    bash
    dub-pp-cli partners leaderboard --by commission --top 10 --json
  • partners audit-commissions
    — 核对合作伙伴、佣金、赏金和付款记录,标记过时费率、缺失付款和仍在赚取佣金的过期赏金。
    可在付款周期前运行,避免账单意外。可在佣金费率迁移前加入CI流程。
    bash
    dub-pp-cli partners audit-commissions --json
  • bounties triage
    — 按状态、时长和赏金类型分组合作伙伴提交的赏金证明,显示待审核的积压任务。
    每周运行一次,避免赏金提交无人处理。当提交长期未审核时,赏金计划会失去合作伙伴信任。
    bash
    dub-pp-cli bounties triage --status pending --older-than 7d --json
  • bounties payout-projection
    — 根据已批准但未付款的提交记录乘以当前佣金费率,预测未来付款金额。
    可用于财务/营销规划。在下次付款周期前显示即将产生的付款负债。
    bash
    dub-pp-cli bounties payout-projection --window 30d --json

Command Reference

命令参考

bounties — Manage bounties
commissions — Manage commissions
  • dub-pp-cli commissions bulk-update
    — Bulk update up to 100 commissions with the same status.
  • dub-pp-cli commissions list
    — Retrieve a paginated list of commissions for your partner program.
  • dub-pp-cli commissions update
    — Update an existing commission amount. This is useful for handling refunds (partial or full) or fraudulent sales.
customers — Manage customers
  • dub-pp-cli customers delete
    — Delete a customer from a workspace.
  • dub-pp-cli customers get
    — Retrieve a paginated list of customers for the authenticated workspace.
  • dub-pp-cli customers get-id
    — Retrieve a customer by ID for the authenticated workspace. To retrieve a customer by external ID, prefix the ID with...
  • dub-pp-cli customers update
    — Update a customer for the authenticated workspace.
domains — Manage domains
  • dub-pp-cli domains check-status
    — Check if a domain name is available for purchase. You can check multiple domains at once.
  • dub-pp-cli domains create
    — Create a domain for the authenticated workspace.
  • dub-pp-cli domains delete
    — Delete a domain from a workspace. It cannot be undone. This will also delete all the links associated with the domain.
  • dub-pp-cli domains list
    — Retrieve a paginated list of domains for the authenticated workspace.
  • dub-pp-cli domains register
    — Register a domain for the authenticated workspace. Only available for Enterprise Plans.
  • dub-pp-cli domains update
    — Update a domain for the authenticated workspace.
dub-analytics — Manage dub analytics
  • dub-pp-cli dub-analytics
    — Retrieve analytics for a link, a domain, or the authenticated workspace. The response type depends on the
    event
    ...
events — Manage events
  • dub-pp-cli events
    — Retrieve a paginated list of events for the authenticated workspace.
folders — Manage folders
  • dub-pp-cli folders create
    — Create a folder for the authenticated workspace.
  • dub-pp-cli folders delete
    — Delete a folder from the workspace. All existing links will still work, but they will no longer be associated with...
  • dub-pp-cli folders list
    — Retrieve a paginated list of folders for the authenticated workspace.
  • dub-pp-cli folders update
    — Update a folder in the workspace.
links — Manage links
  • dub-pp-cli links bulk-create
    — Bulk create up to 100 links for the authenticated workspace.
  • dub-pp-cli links bulk-delete
    — Bulk delete up to 100 links for the authenticated workspace.
  • dub-pp-cli links bulk-update
    — Bulk update up to 100 links with the same data for the authenticated workspace.
  • dub-pp-cli links create
    — Create a link for the authenticated workspace.
  • dub-pp-cli links delete
    — Delete a link for the authenticated workspace.
  • dub-pp-cli links get
    — Retrieve a paginated list of links for the authenticated workspace.
  • dub-pp-cli links get-count
    — Retrieve the number of links for the authenticated workspace.
  • dub-pp-cli links get-info
    — Retrieve the info for a link.
  • dub-pp-cli links update
    — Update a link for the authenticated workspace. If there's no change, returns it as it is.
  • dub-pp-cli links upsert
    — Upsert a link for the authenticated workspace by its URL. If a link with the same URL already exists, return it (or...
partners — Manage partners
  • dub-pp-cli partners approve
    — Approve a pending partner application to your program. The partner will be enrolled in the specified group and...
  • dub-pp-cli partners ban
    — Ban a partner from your program. This will disable all links and mark all commissions as canceled.
  • dub-pp-cli partners create
    — Creates or updates a partner record (upsert behavior). If a partner with the same email already exists, their...
  • dub-pp-cli partners create-link
    — Create a link for a partner that is enrolled in your program.
  • dub-pp-cli partners deactivate
    — This will deactivate the partner from your program and disable all their active links. Their commissions and payouts...
  • dub-pp-cli partners list
    — List all partners for a partner program.
  • dub-pp-cli partners list-applications
    — Retrieve a paginated list of pending applications for your partner program.
  • dub-pp-cli partners reject
    — Reject a pending partner application to your program. The partner will be notified via email that their application...
  • dub-pp-cli partners retrieve-analytics
    — Retrieve analytics for a partner within a program. The response type vary based on the
    groupBy
    query parameter.
  • dub-pp-cli partners retrieve-links
    — Retrieve a partner's links by their partner ID or tenant ID.
  • dub-pp-cli partners upsert-link
    — Upsert a link for a partner that is enrolled in your program. If a link with the same URL already exists, return it...
payouts — Manage payouts
  • dub-pp-cli payouts
    — Retrieve a paginated list of payouts for your partner program.
qr — Manage qr
  • dub-pp-cli qr
    — Retrieve a QR code for a link.
tags — Manage tags
  • dub-pp-cli tags create
    — Create a tag for the authenticated workspace.
  • dub-pp-cli tags delete
    — Delete a tag from the workspace. All existing links will still work, but they will no longer be associated with this...
  • dub-pp-cli tags get
    — Retrieve a paginated list of tags for the authenticated workspace.
  • dub-pp-cli tags update
    — Update a tag in the workspace.
tokens — Manage tokens
  • dub-pp-cli tokens
    — Create a referrals embed token for the given partner/tenant. The endpoint first attempts to locate an existing...
track — Manage track
  • dub-pp-cli track lead
    — Track a lead for a short link.
  • dub-pp-cli track open
    — This endpoint is used to track when a user opens your app via a Dub-powered deep link (for both iOS and Android).
  • dub-pp-cli track sale
    — Track a sale for a short link.
bounties — 管理赏金
commissions — 管理佣金
  • dub-pp-cli commissions bulk-update
    — 批量更新最多100条佣金记录为同一状态。
  • dub-pp-cli commissions list
    — 检索合作伙伴计划的分页佣金列表。
  • dub-pp-cli commissions update
    — 更新现有佣金金额。适用于处理退款(部分或全额)或欺诈性销售。
customers — 管理客户
  • dub-pp-cli customers delete
    — 从工作区删除客户。
  • dub-pp-cli customers get
    — 检索已认证工作区的分页客户列表。
  • dub-pp-cli customers get-id
    — 通过ID检索已认证工作区的客户。若要通过外部ID检索,请在ID前添加...
  • dub-pp-cli customers update
    — 更新已认证工作区的客户信息。
domains — 管理域名
  • dub-pp-cli domains check-status
    — 检查域名是否可购买。可同时检查多个域名。
  • dub-pp-cli domains create
    — 为已认证工作区创建域名。
  • dub-pp-cli domains delete
    — 从工作区删除域名。此操作不可撤销,同时会删除该域名关联的所有链接。
  • dub-pp-cli domains list
    — 检索已认证工作区的分页域名列表。
  • dub-pp-cli domains register
    — 为已认证工作区注册域名。仅适用于企业版计划。
  • dub-pp-cli domains update
    — 更新已认证工作区的域名信息。
dub-analytics — 管理Dub分析数据
  • dub-pp-cli dub-analytics
    — 检索链接、域名或已认证工作区的分析数据。响应类型取决于
    event
    参数...
events — 管理事件
  • dub-pp-cli events
    — 检索已认证工作区的分页事件列表。
folders — 管理文件夹
  • dub-pp-cli folders create
    — 为已认证工作区创建文件夹。
  • dub-pp-cli folders delete
    — 从工作区删除文件夹。所有现有链接仍可正常使用,但不再与该文件夹关联...
  • dub-pp-cli folders list
    — 检索已认证工作区的分页文件夹列表。
  • dub-pp-cli folders update
    — 更新工作区中的文件夹信息。
links — 管理链接
  • dub-pp-cli links bulk-create
    — 为已认证工作区批量创建最多100条链接。
  • dub-pp-cli links bulk-delete
    — 为已认证工作区批量删除最多100条链接。
  • dub-pp-cli links bulk-update
    — 为已认证工作区批量更新最多100条链接为同一数据。
  • dub-pp-cli links create
    — 为已认证工作区创建链接。
  • dub-pp-cli links delete
    — 为已认证工作区删除链接。
  • dub-pp-cli links get
    — 检索已认证工作区的分页链接列表。
  • dub-pp-cli links get-count
    — 检索已认证工作区的链接数量。
  • dub-pp-cli links get-info
    — 检索链接的详细信息。
  • dub-pp-cli links update
    — 更新已认证工作区的链接信息。若无变更,则返回原链接信息。
  • dub-pp-cli links upsert
    — 通过URL为已认证工作区插入或更新链接。若同一URL的链接已存在,则返回该链接(或...
partners — 管理合作伙伴
  • dub-pp-cli partners approve
    — 批准合作伙伴计划的待处理申请。合作伙伴将被纳入指定群组并...
  • dub-pp-cli partners ban
    — 将合作伙伴从计划中封禁。这将禁用其所有链接,并将所有佣金标记为已取消。
  • dub-pp-cli partners create
    — 创建或更新合作伙伴记录(插入或更新行为)。若同一邮箱的合作伙伴已存在,则其...
  • dub-pp-cli partners create-link
    — 为已加入计划的合作伙伴创建链接。
  • dub-pp-cli partners deactivate
    — 将合作伙伴从计划中停用,并禁用其所有活跃链接。其佣金和付款...
  • dub-pp-cli partners list
    — 列出合作伙伴计划的所有合作伙伴。
  • dub-pp-cli partners list-applications
    — 检索合作伙伴计划的待处理申请分页列表。
  • dub-pp-cli partners reject
    — 拒绝合作伙伴计划的待处理申请。合作伙伴将收到邮件通知其申请...
  • dub-pp-cli partners retrieve-analytics
    — 检索计划内合作伙伴的分析数据。响应类型取决于
    groupBy
    查询参数。
  • dub-pp-cli partners retrieve-links
    — 通过合作伙伴ID或租户ID检索合作伙伴的链接。
  • dub-pp-cli partners upsert-link
    — 为已加入计划的合作伙伴插入或更新链接。若同一URL的链接已存在,则返回该链接...
payouts — 管理付款
  • dub-pp-cli payouts
    — 检索合作伙伴计划的分页付款列表。
qr — 管理二维码
  • dub-pp-cli qr
    — 检索链接对应的二维码。
tags — 管理标签
  • dub-pp-cli tags create
    — 为已认证工作区创建标签。
  • dub-pp-cli tags delete
    — 从工作区删除标签。所有现有链接仍可正常使用,但不再与该标签关联...
  • dub-pp-cli tags get
    — 检索已认证工作区的分页标签列表。
  • dub-pp-cli tags update
    — 更新工作区中的标签信息。
tokens — 管理令牌
  • dub-pp-cli tokens
    — 为指定合作伙伴/租户创建推荐嵌入令牌。端点首先尝试查找现有...
track — 管理追踪
  • dub-pp-cli track lead
    — 追踪短链接产生的线索。
  • dub-pp-cli track open
    — 用于追踪用户通过Dub驱动的深度链接打开应用的行为(支持iOS和Android)。
  • dub-pp-cli track sale
    — 追踪短链接产生的销售。

Finding the right command

查找合适的命令

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

Recipes

使用示例

Find dormant links worth archiving

查找值得归档的闲置链接

bash
dub-pp-cli sync && dub-pp-cli links stale --days 60 --json --select key,url,clicks,createdAt
Sync first, then ask for links with zero clicks in the last 60 days. Pipe through
jq
to filter further or build an archive batch.
bash
dub-pp-cli sync && dub-pp-cli links stale --days 60 --json --select key,url,clicks,createdAt
先同步数据,再查找过去60天内无点击的链接。可通过管道传递给
jq
进一步筛选或生成归档批次。

Preview a campaign-wide UTM swap before sending

在执行全活动范围UTM替换前预览变更

bash
dub-pp-cli links rewrite --match 'utm_source=launch' --replace 'utm_source=summer' --dry-run --json
The diff preview shows every link that would change. Drop
--dry-run
only after reading the patch.
bash
dub-pp-cli links rewrite --match 'utm_source=launch' --replace 'utm_source=summer' --dry-run --json
差异预览会显示所有将被修改的链接。只有在仔细查看补丁内容后,才可移除
--dry-run
参数。

Triage bounty submissions waiting more than 7 days

分类等待超过7天的赏金提交

bash
dub-pp-cli bounties triage --status pending --older-than 7d --json --select id,partnerId,bountyType,submittedAt
Surfaces the partner submissions rotting in the queue. Pipe through
jq
to group by
partnerId
for outreach lists.
bash
dub-pp-cli bounties triage --status pending --older-than 7d --json --select id,partnerId,bountyType,submittedAt
显示队列中积压的合作伙伴提交记录。可通过管道传递给
jq
partnerId
分组,生成触达列表。

Per-partner ROI for the top 10 partners

前10名合作伙伴的每合作伙伴ROI

bash
dub-pp-cli partners leaderboard --by commission --top 10 --agent --select 'partnerId,partnerName,clicks,leads,sales,commission'
Combines /partners/analytics with local commissions and payouts. Use
--select
with dotted paths to keep the response small for agents — leaderboards return wide rows by default.
bash
dub-pp-cli partners leaderboard --by commission --top 10 --agent --select 'partnerId,partnerName,clicks,leads,sales,commission'
整合/partners/analytics数据与本地佣金和付款记录。对于Agent,使用
--select
指定字段可缩小响应内容——默认情况下排行榜会返回大量数据。

Sync, then run the full Monday-morning health check

同步后运行完整的周一晨间健康检查

bash
dub-pp-cli sync && dub-pp-cli health --json
Combined report across rate-limit headroom, expired-but-active links, dead destination URLs, unverified domains, and bounty submissions awaiting review.
bash
dub-pp-cli sync && dub-pp-cli health --json
整合报告包含速率限制余量、已过期但仍活跃的链接、失效目标URL、未验证域名和待审核的赏金提交。

Auth Setup

认证设置

dub-pp-cli reads DUB_API_KEY from the environment (Speakeasy convention; DUB_TOKEN also accepted for compatibility with prior community CLIs). The key is workspace-scoped — the workspace is implicit in the key. Get one from dub.co/settings/tokens and run
dub-pp-cli doctor
to verify connectivity.
Run
dub-pp-cli doctor
to verify setup.
dub-pp-cli从环境变量中读取DUB_API_KEY(遵循Speakeasy约定;同时兼容DUB_TOKEN以适配早期社区CLI)。该密钥与工作区绑定——工作区信息隐含在密钥中。可从dub.co/settings/tokens获取密钥,并运行
dub-pp-cli doctor
验证连接性。
运行
dub-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
    dub-pp-cli commissions list --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
在任何命令后添加
--agent
参数。该参数等价于:
--json --compact --no-input --no-color --yes
  • 可管道传输 — 标准输出为JSON,错误信息输出到标准错误
  • 可筛选
    --select
    参数保留指定字段子集。点路径可深入嵌套结构;数组可遍历元素。对于输出内容较多的API,这是缩小上下文范围的关键:
    bash
    dub-pp-cli commissions list --agent --select id,name,status
  • 可预览
    --dry-run
    参数显示请求内容但不发送
  • 离线友好 — 同步/搜索命令可在本地SQLite存储可用时使用该存储
  • 非交互式 — 从不提示用户,所有输入均通过标志参数提供

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:
dub-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
dub-pp-cli feedback --stdin < notes.txt
dub-pp-cli feedback list --json --limit 10
Entries are stored locally at
~/.dub-pp-cli/feedback.jsonl
. They are never POSTed unless
DUB_FEEDBACK_ENDPOINT
is set AND either
--send
is passed or
DUB_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存在问题时,可记录反馈:
dub-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
dub-pp-cli feedback --stdin < notes.txt
dub-pp-cli feedback list --json --limit 10
反馈条目存储在本地
~/.dub-pp-cli/feedback.jsonl
文件中。仅当设置了
DUB_FEEDBACK_ENDPOINT
且传递了
--send
参数或设置了
DUB_FEEDBACK_AUTO_SEND=true
时,才会将反馈POST到指定端点。默认行为仅存储在本地。
请记录让您感到意外的内容,而非正式的错误报告。简短、具体、单行描述:这类反馈的价值会逐渐累积。

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>
参数。输出会发送到指定的接收端,同时(或替代)输出到标准输出,因此Agent无需手动管道即可路由命令结果。支持三种接收端:
接收端效果
stdout
默认值;仅输出到标准输出
file:<path>
原子性地将输出写入
<path>
(先写入临时文件再重命名)
webhook:<url>
将输出体POST到指定URL(
application/json
格式;若使用
--compact
则为
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.
dub-pp-cli profile save briefing --json
dub-pp-cli --profile briefing commissions list
dub-pp-cli profile list --json
dub-pp-cli profile show briefing
dub-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”模式。
dub-pp-cli profile save briefing --json
dub-pp-cli --profile briefing commissions list
dub-pp-cli profile list --json
dub-pp-cli profile show briefing
dub-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
    dub-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
    → 显示
    dub-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/dub/cmd/dub-pp-mcp@latest
  2. Register with Claude Code:
    bash
    claude mcp add dub-pp-mcp -- dub-pp-mcp
  3. Verify:
    claude mcp list
  1. 安装MCP服务器:
    bash
    go install github.com/mvanhorn/printing-press-library/library/other/dub/cmd/dub-pp-mcp@latest
  2. 在Claude Code中注册:
    bash
    claude mcp add dub-pp-mcp -- dub-pp-mcp
  3. 验证安装:
    claude mcp list

Direct Use

直接使用

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