pp-dub
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDub — Printing Press CLI
Dub — Printing Press CLI
Prerequisites: Install the CLI
前提条件:安装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:
dub-pp-cli- Install via the Printing Press installer:
bash
npx -y @mvanhorn/printing-press install dub --cli-only - Verify:
dub-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/marketing/dub/cmd/dub-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$PATH本技能驱动二进制文件。在调用本技能的任何命令之前,您必须确认CLI已安装。 如果未安装,请先执行以下步骤:
dub-pp-cli- 通过Printing Press安装器安装:
bash
npx -y @mvanhorn/printing-press install dub --cli-only - 验证安装:
dub-pp-cli --version - 确保(或
$GOPATH/bin)已添加到$HOME/go/bin环境变量中。$PATH
若安装失败(无Node环境、离线等情况),可改用Go直接安装(要求Go 1.23及以上版本):
npxbash
go install github.com/mvanhorn/printing-press-library/library/marketing/dub/cmd/dub-pp-cli@latest若安装后执行提示“command not found”,说明安装未将二进制文件加入,请在验证成功前不要执行技能命令。
--version$PATHWhen 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 when you need anything beyond link shortening or workspace config.
dub-cli当Agent或操作人员需要在工作区层面管理Dub时,可使用dub-pp-cli——包括批量链接操作、全活动范围的UTM重写、合作伙伴计划审计、赏金分类,或本地跨资源分析。CLI的本地SQLite存储可低成本地离线关联链接、分析数据、合作伙伴、佣金和赏金信息。当您需要链接缩短或工作区配置之外的功能时,优先选择dub-pp-cli而非官方。
dub-cliUnique Capabilities
独特功能
These capabilities aren't available in any other tool for this API.
这些功能是其他Dub API工具所不具备的。
Local state that compounds
可累积的本地状态
-
— Find archived, expired, or zero-traffic links across the workspace before they pile up.
links staleUse 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.bashdub-pp-cli links stale --days 90 --json --select id,key,clicks,archived -
— Detect links whose click rate dropped more than threshold percent week-over-week.
links driftCatches dying campaigns before reporting deadlines. Use this in a weekly automation to surface attribution links that quietly stopped converting.bashdub-pp-cli links drift --window 7d --threshold 30 --json -
— Find every link in the workspace pointing to the same destination URL.
links duplicatesSurfaces accidental duplicates from bulk-create overruns and consolidation candidates after a migration.bashdub-pp-cli links duplicates --json -
— Audit short-key slugs for lookalike collisions, reserved-word violations, and brand-conflict hazards.
links lintUse this before a brand campaign launch to catch lookalike slugs that confuse partners or get reserved-word treatment.bashdub-pp-cli links lint --json -
— Performance dashboard aggregated by tag or folder — clicks, leads, sales rolled up across every link wearing each label.
links rollupUse this to compare campaign performance across tag dimensions without reconciling 5 separate API calls.bashdub-pp-cli links rollup --by clicks --group-by tag --json -
— Click-to-lead-to-sale conversion rates per link or campaign.
funnelSurfaces where prospects drop off in your attribution funnel. Use before quarterly reporting to spot links with high clicks and low conversion.bashdub-pp-cli funnel --link mylink --min-clicks 50 --json -
— See every link a customer clicked, when they became a lead, and when they purchased — in one timeline.
customers journeyUse this for QBR-style account reviews or to debug attribution issues for a specific customer.bashdub-pp-cli customers journey cust_abc123 --json
-
— 查找工作区内已归档、过期或无流量的链接,避免此类链接堆积。
links stale可用于在组合审查或批量归档前清理闲置短链接。/analytics端点无法通过单次调用筛选“N天内无点击”的链接。bashdub-pp-cli links stale --days 90 --json --select id,key,clicks,archived -
— 检测点击量周环比下降超过阈值百分比的链接。
links drift可在报告截止日期前发现效果衰退的活动。可将此命令加入每周自动化流程,找出转化率悄然下滑的归因链接。bashdub-pp-cli links drift --window 7d --threshold 30 --json -
— 查找工作区内指向同一目标URL的所有链接。
links duplicates可发现批量创建时意外生成的重复链接,以及迁移后可合并的候选链接。bashdub-pp-cli links duplicates --json -
— 审核短链接Key的slug,检查相似碰撞、保留词违规和品牌冲突风险。
links lint可在品牌活动启动前发现易混淆合作伙伴的相似slug,或会被判定为保留词的slug。bashdub-pp-cli links lint --json -
— 按标签或文件夹聚合的性能仪表盘——汇总每个标签下所有链接的点击量、线索量和销售额。
links rollup无需协调5次独立API调用,即可跨标签维度比较活动性能。bashdub-pp-cli links rollup --by clicks --group-by tag --json -
— 每个链接或活动的点击-线索-销售转化率。
funnel可发现潜在客户在归因漏斗中的流失点。可在季度报告前找出高点击、低转化的链接。bashdub-pp-cli funnel --link mylink --min-clicks 50 --json -
— 查看客户点击过的所有链接、成为线索的时间以及购买时间——整合为一条时间线。
customers journey可用于QBR风格的客户账户审查,或排查特定客户的归因问题。bashdub-pp-cli customers journey cust_abc123 --json
Agent-native plumbing
原生Agent适配
-
— Show every link that would change and the exact patch BEFORE sending.
links rewriteUse this before any campaign-wide rewrite. Diff preview prevents the worst class of bulk-mutation mistakes.bashdub-pp-cli links rewrite --match 'utm_source=oldcampaign' --replace 'utm_source=newcampaign' --dry-run -
— Cross-resource Monday-morning report: rate-limit headroom, expired-but-active links, dead destination URLs, unverified domains, dormant tags, bounty submissions awaiting review.
healthUse this as the first thing every morning, or as a CI canary. Surfaces what needs attention without dashboard hopping.bashdub-pp-cli health --json -
— What happened in the last N hours? Created, updated, deleted links plus partner approvals, new bounty submissions, and top-clicked entities.
sinceUse this in agent loops to summarize workspace activity since the last check-in. Cheap and idempotent.bashdub-pp-cli since 24h --json
-
— 在发送请求前显示所有将被修改的链接及具体补丁内容。
links rewrite可在全活动范围重写前使用。差异预览可避免最严重的批量修改错误。bashdub-pp-cli links rewrite --match 'utm_source=oldcampaign' --replace 'utm_source=newcampaign' --dry-run -
— 跨资源的周一晨间报告:速率限制余量、已过期但仍活跃的链接、失效目标URL、未验证域名、闲置标签、待审核的赏金提交。
health可作为每日晨间第一项工作,或CI监控任务。无需切换仪表盘即可了解需关注的事项。bashdub-pp-cli health --json -
— 过去N小时内发生了什么?包括创建、更新、删除的链接,以及合作伙伴审批、新赏金提交和高点击实体。
since可在Agent循环中使用,总结自上次检查以来的工作区活动。成本低且具有幂等性。bashdub-pp-cli since 24h --json
Partner ops
合作伙伴运营
-
— Rank partners by commission earned, conversion rate, and clicks generated.
partners leaderboardUse this to identify top performers before a partner-tier review, or dormant partners worth deactivating.bashdub-pp-cli partners leaderboard --by commission --top 10 --json -
— Reconcile partners, commissions, bounties, and payouts to flag stale rates, missing payouts, and expired bounties still earning.
partners audit-commissionsRun this before a payout cycle to catch billing surprises. Use in CI before any commission-rate migration.bashdub-pp-cli partners audit-commissions --json -
— Group partner-submitted bounty proof by status, age, and bounty type. Surfaces backlog awaiting review.
bounties triageRun weekly to keep bounty submissions from rotting. Bounty programs lose partner trust when submissions sit unreviewed.bashdub-pp-cli bounties triage --status pending --older-than 7d --json -
— Project upcoming payouts from approved-but-unpaid submissions multiplied by current commission rates.
bounties payout-projectionUse this for finance/marketing planning. Surfaces upcoming payout liability before the next payout cycle.bashdub-pp-cli bounties payout-projection --window 30d --json
-
— 按赚取佣金、转化率和生成点击量对合作伙伴排名。
partners leaderboard可在合作伙伴层级审查前识别顶级执行者,或找出值得停用的闲置合作伙伴。bashdub-pp-cli partners leaderboard --by commission --top 10 --json -
— 核对合作伙伴、佣金、赏金和付款记录,标记过时费率、缺失付款和仍在赚取佣金的过期赏金。
partners audit-commissions可在付款周期前运行,避免账单意外。可在佣金费率迁移前加入CI流程。bashdub-pp-cli partners audit-commissions --json -
— 按状态、时长和赏金类型分组合作伙伴提交的赏金证明,显示待审核的积压任务。
bounties triage每周运行一次,避免赏金提交无人处理。当提交长期未审核时,赏金计划会失去合作伙伴信任。bashdub-pp-cli bounties triage --status pending --older-than 7d --json -
— 根据已批准但未付款的提交记录乘以当前佣金费率,预测未来付款金额。
bounties payout-projection可用于财务/营销规划。在下次付款周期前显示即将产生的付款负债。bashdub-pp-cli bounties payout-projection --window 30d --json
Command Reference
命令参考
bounties — Manage bounties
commissions — Manage commissions
- — Bulk update up to 100 commissions with the same status.
dub-pp-cli commissions bulk-update - — Retrieve a paginated list of commissions for your partner program.
dub-pp-cli commissions list - — Update an existing commission amount. This is useful for handling refunds (partial or full) or fraudulent sales.
dub-pp-cli commissions update
customers — Manage customers
- — Delete a customer from a workspace.
dub-pp-cli customers delete - — Retrieve a paginated list of customers for the authenticated workspace.
dub-pp-cli customers get - — Retrieve a customer by ID for the authenticated workspace. To retrieve a customer by external ID, prefix the ID with...
dub-pp-cli customers get-id - — Update a customer for the authenticated workspace.
dub-pp-cli customers update
domains — Manage domains
- — Check if a domain name is available for purchase. You can check multiple domains at once.
dub-pp-cli domains check-status - — Create a domain for the authenticated workspace.
dub-pp-cli domains create - — 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 delete - — Retrieve a paginated list of domains for the authenticated workspace.
dub-pp-cli domains list - — Register a domain for the authenticated workspace. Only available for Enterprise Plans.
dub-pp-cli domains register - — Update a domain for the authenticated workspace.
dub-pp-cli domains update
dub-analytics — Manage dub analytics
- — Retrieve analytics for a link, a domain, or the authenticated workspace. The response type depends on the
dub-pp-cli dub-analytics...event
events — Manage events
- — Retrieve a paginated list of events for the authenticated workspace.
dub-pp-cli events
folders — Manage folders
- — Create a folder for the authenticated workspace.
dub-pp-cli folders create - — Delete a folder from the workspace. All existing links will still work, but they will no longer be associated with...
dub-pp-cli folders delete - — Retrieve a paginated list of folders for the authenticated workspace.
dub-pp-cli folders list - — Update a folder in the workspace.
dub-pp-cli folders update
links — Manage links
- — Bulk create up to 100 links for the authenticated workspace.
dub-pp-cli links bulk-create - — Bulk delete up to 100 links for the authenticated workspace.
dub-pp-cli links bulk-delete - — Bulk update up to 100 links with the same data for the authenticated workspace.
dub-pp-cli links bulk-update - — Create a link for the authenticated workspace.
dub-pp-cli links create - — Delete a link for the authenticated workspace.
dub-pp-cli links delete - — Retrieve a paginated list of links for the authenticated workspace.
dub-pp-cli links get - — Retrieve the number of links for the authenticated workspace.
dub-pp-cli links get-count - — Retrieve the info for a link.
dub-pp-cli links get-info - — Update a link for the authenticated workspace. If there's no change, returns it as it is.
dub-pp-cli links update - — Upsert a link for the authenticated workspace by its URL. If a link with the same URL already exists, return it (or...
dub-pp-cli links upsert
partners — Manage partners
- — Approve a pending partner application to your program. The partner will be enrolled in the specified group and...
dub-pp-cli partners approve - — Ban a partner from your program. This will disable all links and mark all commissions as canceled.
dub-pp-cli partners ban - — Creates or updates a partner record (upsert behavior). If a partner with the same email already exists, their...
dub-pp-cli partners create - — Create a link for a partner that is enrolled in your program.
dub-pp-cli partners create-link - — This will deactivate the partner from your program and disable all their active links. Their commissions and payouts...
dub-pp-cli partners deactivate - — List all partners for a partner program.
dub-pp-cli partners list - — Retrieve a paginated list of pending applications for your partner program.
dub-pp-cli partners list-applications - — Reject a pending partner application to your program. The partner will be notified via email that their application...
dub-pp-cli partners reject - — Retrieve analytics for a partner within a program. The response type vary based on the
dub-pp-cli partners retrieve-analyticsquery parameter.groupBy - — Retrieve a partner's links by their partner ID or tenant ID.
dub-pp-cli partners retrieve-links - — Upsert a link for a partner that is enrolled in your program. If a link with the same URL already exists, return it...
dub-pp-cli partners upsert-link
payouts — Manage payouts
- — Retrieve a paginated list of payouts for your partner program.
dub-pp-cli payouts
qr — Manage qr
- — Retrieve a QR code for a link.
dub-pp-cli qr
tags — Manage tags
- — Create a tag for the authenticated workspace.
dub-pp-cli tags create - — 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 delete - — Retrieve a paginated list of tags for the authenticated workspace.
dub-pp-cli tags get - — Update a tag in the workspace.
dub-pp-cli tags update
tokens — Manage tokens
- — Create a referrals embed token for the given partner/tenant. The endpoint first attempts to locate an existing...
dub-pp-cli tokens
track — Manage track
- — Track a lead for a short link.
dub-pp-cli track lead - — 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 open - — Track a sale for a short link.
dub-pp-cli track sale
bounties — 管理赏金
commissions — 管理佣金
- — 批量更新最多100条佣金记录为同一状态。
dub-pp-cli commissions bulk-update - — 检索合作伙伴计划的分页佣金列表。
dub-pp-cli commissions list - — 更新现有佣金金额。适用于处理退款(部分或全额)或欺诈性销售。
dub-pp-cli commissions update
customers — 管理客户
- — 从工作区删除客户。
dub-pp-cli customers delete - — 检索已认证工作区的分页客户列表。
dub-pp-cli customers get - — 通过ID检索已认证工作区的客户。若要通过外部ID检索,请在ID前添加...
dub-pp-cli customers get-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 — 管理链接
- — 为已认证工作区批量创建最多100条链接。
dub-pp-cli links bulk-create - — 为已认证工作区批量删除最多100条链接。
dub-pp-cli links bulk-delete - — 为已认证工作区批量更新最多100条链接为同一数据。
dub-pp-cli links bulk-update - — 为已认证工作区创建链接。
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 - — 通过URL为已认证工作区插入或更新链接。若同一URL的链接已存在,则返回该链接(或...
dub-pp-cli links upsert
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 - — 通过合作伙伴ID或租户ID检索合作伙伴的链接。
dub-pp-cli partners retrieve-links - — 为已加入计划的合作伙伴插入或更新链接。若同一URL的链接已存在,则返回该链接...
dub-pp-cli partners upsert-link
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驱动的深度链接打开应用的行为(支持iOS和Android)。
dub-pp-cli track open - — 追踪短链接产生的销售。
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>"which02--help当您知道要执行的操作但不知道对应的命令时,可直接询问CLI:
bash
dub-pp-cli which "<用您自己的话描述功能>"which02--helpRecipes
使用示例
Find dormant links worth archiving
查找值得归档的闲置链接
bash
dub-pp-cli sync && dub-pp-cli links stale --days 60 --json --select key,url,clicks,createdAtSync first, then ask for links with zero clicks in the last 60 days. Pipe through to filter further or build an archive batch.
jqbash
dub-pp-cli sync && dub-pp-cli links stale --days 60 --json --select key,url,clicks,createdAt先同步数据,再查找过去60天内无点击的链接。可通过管道传递给进一步筛选或生成归档批次。
jqPreview a campaign-wide UTM swap before sending
在执行全活动范围UTM替换前预览变更
bash
dub-pp-cli links rewrite --match 'utm_source=launch' --replace 'utm_source=summer' --dry-run --jsonThe diff preview shows every link that would change. Drop only after reading the patch.
--dry-runbash
dub-pp-cli links rewrite --match 'utm_source=launch' --replace 'utm_source=summer' --dry-run --json差异预览会显示所有将被修改的链接。只有在仔细查看补丁内容后,才可移除参数。
--dry-runTriage bounty submissions waiting more than 7 days
分类等待超过7天的赏金提交
bash
dub-pp-cli bounties triage --status pending --older-than 7d --json --select id,partnerId,bountyType,submittedAtSurfaces the partner submissions rotting in the queue. Pipe through to group by for outreach lists.
jqpartnerIdbash
dub-pp-cli bounties triage --status pending --older-than 7d --json --select id,partnerId,bountyType,submittedAt显示队列中积压的合作伙伴提交记录。可通过管道传递给按分组,生成触达列表。
jqpartnerIdPer-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 with dotted paths to keep the response small for agents — leaderboards return wide rows by default.
--selectbash
dub-pp-cli partners leaderboard --by commission --top 10 --agent --select 'partnerId,partnerName,clicks,leads,sales,commission'整合/partners/analytics数据与本地佣金和付款记录。对于Agent,使用指定字段可缩小响应内容——默认情况下排行榜会返回大量数据。
--selectSync, then run the full Monday-morning health check
同步后运行完整的周一晨间健康检查
bash
dub-pp-cli sync && dub-pp-cli health --jsonCombined 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 to verify connectivity.
dub-pp-cli doctorRun to verify setup.
dub-pp-cli doctordub-pp-cli从环境变量中读取DUB_API_KEY(遵循Speakeasy约定;同时兼容DUB_TOKEN以适配早期社区CLI)。该密钥与工作区绑定——工作区信息隐含在密钥中。可从dub.co/settings/tokens获取密钥,并运行验证连接性。
dub-pp-cli doctor运行验证设置是否正确。
dub-pp-cli doctorAgent Mode
Agent模式
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:
--selectbashdub-pp-cli commissions list --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
在任何命令后添加参数。该参数等价于:。
--agent--json --compact --no-input --no-color --yes-
可管道传输 — 标准输出为JSON,错误信息输出到标准错误
-
可筛选 —参数保留指定字段子集。点路径可深入嵌套结构;数组可遍历元素。对于输出内容较多的API,这是缩小上下文范围的关键:
--selectbashdub-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 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)从本地存储或API读取数据的命令会将输出包装在来源信封中:
json
{
"meta": {"source": "live" | "local", "synced_at": "...", "reason": "..."},
"results": <data>
}解析字段获取数据,字段表示数据来自实时API还是本地存储。仅当标准输出为终端时,才会在标准错误输出打印人类可读的摘要——管道传输/Agent消费者仅会在标准输出获取纯JSON。
.results.meta.sourceN results (live)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 10Entries are stored locally at . They are never POSTed unless is set AND either is passed or . Default behavior is local-only.
~/.dub-pp-cli/feedback.jsonlDUB_FEEDBACK_ENDPOINT--sendDUB_FEEDBACK_AUTO_SEND=trueWrite 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反馈条目存储在本地文件中。仅当设置了且传递了参数或设置了时,才会将反馈POST到指定端点。默认行为仅存储在本地。
~/.dub-pp-cli/feedback.jsonlDUB_FEEDBACK_ENDPOINT--sendDUB_FEEDBACK_AUTO_SEND=true请记录让您感到意外的内容,而非正式的错误报告。简短、具体、单行描述:这类反馈的价值会逐渐累积。
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.
所有命令均支持参数。输出会发送到指定的接收端,同时(或替代)输出到标准输出,因此Agent无需手动管道即可路由命令结果。支持三种接收端:
--deliver <sink>| 接收端 | 效果 |
|---|---|
| 默认值;仅输出到标准输出 |
| 原子性地将输出写入 |
| 将输出体POST到指定URL( |
不支持的协议会返回结构化错误,并列出支持的协议类型。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 --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_profiles配置文件是一组保存的标志值,可在多次调用中复用。当定时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在运行时发现这些配置文件。
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 |
| 代码 | 含义 |
|---|---|
| 0 | 成功 |
| 2 | 使用错误(参数错误) |
| 3 | 资源未找到 |
| 4 | 需要认证 |
| 5 | API错误(上游问题) |
| 7 | 速率限制(请等待并重试) |
| 10 | 配置错误 |
Argument Parsing
参数解析
Parse :
$ARGUMENTS- Empty, , or
help→ show--helpoutputdub-pp-cli --help - Starts with → ends with
install→ MCP installation; otherwise → see Prerequisites abovemcp - Anything else → Direct Use (execute as CLI command with )
--agent
解析的规则:
$ARGUMENTS- 为空、或
help→ 显示--help输出dub-pp-cli --help - 以开头 → 若结尾为
install→ 安装MCP;否则 → 参考上方前提条件中的安装步骤mcp - 其他情况 → 直接使用(添加参数执行CLI命令)
--agent
MCP Server Installation
MCP服务器安装
- Install the MCP server:
bash
go install github.com/mvanhorn/printing-press-library/library/other/dub/cmd/dub-pp-mcp@latest - Register with Claude Code:
bash
claude mcp add dub-pp-mcp -- dub-pp-mcp - Verify:
claude mcp list
- 安装MCP服务器:
bash
go install github.com/mvanhorn/printing-press-library/library/other/dub/cmd/dub-pp-mcp@latest - 在Claude Code中注册:
bash
claude mcp add dub-pp-mcp -- dub-pp-mcp - 验证安装:
claude mcp list
Direct Use
直接使用
- Check if installed: If not found, offer to install (see Prerequisites at the top of this skill).
which dub-pp-cli - Match the user query to the best command from the Unique Capabilities and Command Reference above.
- Execute with the flag:
--agentbashdub-pp-cli <command> [subcommand] [args] --agent - If ambiguous, drill into subcommand help: .
dub-pp-cli <command> --help
- 检查是否已安装:若未找到,可提供安装选项(参见顶部前提条件中的安装步骤)。
which dub-pp-cli - 将用户查询匹配到上方独特功能和命令参考中最合适的命令。
- 添加参数执行命令:
--agentbashdub-pp-cli <command> [subcommand] [args] --agent - 若存在歧义,可查看子命令帮助:。
dub-pp-cli <command> --help