pp-docker-hub

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Docker Hub — Printing Press CLI

Docker Hub — Printing Press CLI

Prerequisites: Install the CLI

前置条件:安装CLI

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

When Not to Use This CLI

本CLI的禁用场景

Do not activate this CLI for requests that require creating, updating, deleting, publishing, commenting, upvoting, inviting, ordering, sending messages, booking, purchasing, or changing remote state. This printed CLI exposes read-only commands for inspection, export, sync, and analysis.
请勿在需要创建、更新、删除、发布、评论、点赞、邀请、下单、发送消息、预订、购买或修改远程状态的请求中使用本CLI。本CLI仅提供用于检查、导出、同步和分析的只读命令。

Command Reference

命令参考

docker-hub-search — Manage docker hub search
  • docker-hub-pp-cli docker-hub-search
    — Full-text search across all Docker Hub repositories. Returns name, description, stars, and pull counts.
repositories — Repository metadata and details
  • docker-hub-pp-cli repositories <namespace> <repository>
    — Full metadata for a Docker Hub repository including pull count, stars, description, and last update time.
docker-hub-search — 管理Docker Hub搜索
  • docker-hub-pp-cli docker-hub-search
    — 在所有Docker Hub仓库中进行全文搜索,返回名称、描述、星标数和拉取次数。
repositories — 仓库元数据与详情
  • docker-hub-pp-cli repositories <namespace> <repository>
    — 获取Docker Hub仓库的完整元数据,包括拉取次数、星标数、描述和最后更新时间。

Finding the right command

查找合适的命令

When you know what you want to do but not which command does it, ask the CLI directly:
bash
docker-hub-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
docker-hub-pp-cli which "<capability in your own words>"
which
命令会将自然语言描述的操作需求匹配到CLI功能索引中最合适的命令。退出码
0
表示至少找到一个匹配项;退出码
2
表示未找到可信匹配项,请改用
--help
或更精确的查询语句。

Auth Setup

认证设置

No authentication required.
Run
docker-hub-pp-cli doctor
to verify setup.
无需认证。
执行
docker-hub-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
    docker-hub-pp-cli docker-hub-search --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
  • Read-only — do not use this CLI for create, update, delete, publish, comment, upvote, invite, order, send, or other mutating requests
在任何命令后添加
--agent
参数,等效于同时使用:
--json --compact --no-input --no-color --yes
  • 可管道传输 — 标准输出为JSON格式,错误信息输出到标准错误流
  • 可过滤
    --select
    参数可保留指定字段子集。点路径可深入嵌套结构;数组会逐个元素遍历。在处理冗余API时,这对于精简上下文至关重要:
    bash
    docker-hub-pp-cli docker-hub-search --agent --select id,name,status
  • 可预览
    --dry-run
    参数会显示请求内容但不实际发送
  • 离线友好 — 当存在本地SQLite存储时,同步/搜索命令可使用该存储
  • 非交互式 — 从不弹出提示,所有输入均通过参数传递
  • 只读 — 请勿使用本CLI执行创建、更新、删除、发布、评论、点赞、邀请、下单、发送或其他修改状态的请求

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:
docker-hub-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
docker-hub-pp-cli feedback --stdin < notes.txt
docker-hub-pp-cli feedback list --json --limit 10
Entries are stored locally at
~/.docker-hub-pp-cli/feedback.jsonl
. They are never POSTed unless
DOCKER_HUB_FEEDBACK_ENDPOINT
is set AND either
--send
is passed or
DOCKER_HUB_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存在问题时,可记录反馈:
docker-hub-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
docker-hub-pp-cli feedback --stdin < notes.txt
docker-hub-pp-cli feedback list --json --limit 10
反馈条目会本地存储在
~/.docker-hub-pp-cli/feedback.jsonl
中。仅当设置了
DOCKER_HUB_FEEDBACK_ENDPOINT
,且同时传递了
--send
参数或设置
DOCKER_HUB_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
格式)
若指定未知的sink协议,会返回结构化错误并列出支持的类型。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.
docker-hub-pp-cli profile save briefing --json
docker-hub-pp-cli --profile briefing docker-hub-search
docker-hub-pp-cli profile list --json
docker-hub-pp-cli profile show briefing
docker-hub-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”模式。
docker-hub-pp-cli profile save briefing --json
docker-hub-pp-cli --profile briefing docker-hub-search
docker-hub-pp-cli profile list --json
docker-hub-pp-cli profile show briefing
docker-hub-pp-cli profile delete briefing --yes
显式指定的参数优先级高于配置文件中的值;配置文件中的值优先级高于默认值。
agent-context
命令会在
available_profiles
字段下列出所有可用配置文件,以便自省Agent在运行时发现它们。

Exit Codes

退出码

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

Argument Parsing

参数解析

Parse
$ARGUMENTS
:
  1. Empty,
    help
    , or
    --help
    → show
    docker-hub-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
    → 显示
    docker-hub-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/docker-hub-pp-cli/cmd/docker-hub-pp-mcp@latest
  2. Register with Claude Code:
    bash
    claude mcp add docker-hub-pp-mcp -- docker-hub-pp-mcp
  3. Verify:
    claude mcp list
  1. 安装MCP服务器:
    bash
    go install github.com/mvanhorn/printing-press-library/library/other/docker-hub-pp-cli/cmd/docker-hub-pp-mcp@latest
  2. 在Claude Code中注册:
    bash
    claude mcp add docker-hub-pp-mcp -- docker-hub-pp-mcp
  3. 验证:
    claude mcp list

Direct Use

直接使用

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