pp-amazon-seller
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAmazon Seller — Printing Press CLI
亚马逊卖家 — 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:
amazon-seller-pp-cli- Install via the Printing Press installer:
bash
npx -y @mvanhorn/printing-press install amazon-seller --cli-only - Verify:
amazon-seller-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/commerce/amazon-seller/cmd/amazon-seller-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本Skill驱动二进制文件。**在调用本Skill的任何命令之前,您必须确认CLI已安装。**如果未安装,请先执行以下步骤安装:
amazon-seller-pp-cli- 通过Printing Press安装程序安装:
bash
npx -y @mvanhorn/printing-press install amazon-seller --cli-only - 验证:
amazon-seller-pp-cli --version - 确保(或
$GOPATH/bin)已添加到$HOME/go/bin环境变量中。$PATH
如果安装失败(如无Node环境、离线等),可改用Go直接安装(要求Go 1.23及以上版本):
npxbash
go install github.com/mvanhorn/printing-press-library/library/commerce/amazon-seller/cmd/amazon-seller-pp-cli@latest如果安装后执行提示“command not found”,说明安装步骤未将二进制文件添加到中。请在验证成功前不要执行Skill命令。
--version$PATHCommand Reference
命令参考
catalog — Read Catalog Items API item data.
- — Get one catalog item by ASIN.
amazon-seller-pp-cli catalog get - — Search catalog items. Provide marketplaceIds plus one valid search mode such as keywords or identifiers with...
amazon-seller-pp-cli catalog search
fba-inventory — Inspect Fulfillment by Amazon inventory summaries.
- — List FBA inventory summaries. For North America marketplace-level inventory, pass granularityType=Marketplace,...
amazon-seller-pp-cli fba-inventory
listings — Read Listings Items API data for seller SKUs.
- — Get one listing item by seller ID and SKU.
amazon-seller-pp-cli listings get - — Search listing items for a seller.
amazon-seller-pp-cli listings search
orders — Search and inspect Orders API v2026-01-01 order records.
- — Get one Orders API v2026-01-01 order.
amazon-seller-pp-cli orders get - — Search orders. Provide exactly one of createdAfter or lastUpdatedAfter; Amazon returns 400 for invalid combinations.
amazon-seller-pp-cli orders search
reports — Create reports, poll report status, and inspect report document metadata.
- — Create a report request. Prefer --stdin for JSON bodies so marketplaceIds remains a JSON array and reportOptions...
amazon-seller-pp-cli reports create - — Get report document metadata and the presigned download URL. This command does not download or open the document.
amazon-seller-pp-cli reports document - — Get one report by report ID. This is the manual polling endpoint for report processing status.
amazon-seller-pp-cli reports get - — List reports. If nextToken is set, Amazon requires it to be the only query parameter; pass no other filters with...
amazon-seller-pp-cli reports list
sellers — Verify seller authorization and list marketplace participations.
- — List marketplace participations for the authorized seller account.
amazon-seller-pp-cli sellers
catalog — 读取商品目录Items API的商品数据。
- — 通过ASIN获取单个商品目录项。
amazon-seller-pp-cli catalog get - — 搜索商品目录项。需提供marketplaceIds以及一种有效的搜索模式,如关键词或标识符...
amazon-seller-pp-cli catalog search
fba-inventory — 查看亚马逊物流(FBA)库存汇总。
- — 列出FBA库存汇总。如需查看北美地区市场级库存,请传入granularityType=Marketplace...
amazon-seller-pp-cli fba-inventory
listings — 读取卖家SKU的Listings Items API数据。
- — 通过卖家ID和SKU获取单个商品listing项。
amazon-seller-pp-cli listings get - — 搜索卖家的商品listing项。
amazon-seller-pp-cli listings search
orders — 搜索并查看Orders API v2026-01-01的订单记录。
- — 获取单个Orders API v2026-01-01订单。
amazon-seller-pp-cli orders get - — 搜索订单。必须提供createdAfter或lastUpdatedAfter中的一个;若组合无效,亚马逊会返回400错误。
amazon-seller-pp-cli orders search
reports — 创建报告、轮询报告状态并查看报告文档元数据。
- — 创建报告请求。建议通过--stdin传入JSON请求体,确保marketplaceIds保持为JSON数组且reportOptions...
amazon-seller-pp-cli reports create - — 获取报告文档元数据和预签名下载链接。此命令不会下载或打开文档。
amazon-seller-pp-cli reports document - — 通过报告ID获取单个报告。这是手动轮询报告处理状态的端点。
amazon-seller-pp-cli reports get - — 列出报告。如果设置了nextToken,亚马逊要求它是唯一的查询参数;请勿同时传入其他筛选条件...
amazon-seller-pp-cli reports list
sellers — 验证卖家授权并列出参与的市场。
- — 列出已授权卖家账户参与的市场。
amazon-seller-pp-cli sellers
Finding the right command
查找合适的命令
When you know what you want to do but not which command does it, ask the CLI directly:
bash
amazon-seller-pp-cli which "<capability in your own words>"which02--help当您知道要执行的操作但不确定对应命令时,可直接询问CLI:
bash
amazon-seller-pp-cli which "<用您自己的话描述功能>"which02--helpAuth Setup
授权设置
Self-authorize your private application in the provider console, export the OAuth client ID, OAuth client secret, and refresh token, then run doctor:
bash
export SP_API_LWA_CLIENT_ID="<client-id>"
export SP_API_LWA_CLIENT_SECRET="<client-secret>"
export SP_API_REFRESH_TOKEN="<refresh-token>"
amazon-seller-pp-cli doctorThe CLI exchanges the refresh token for an access token on first live use and caches the access token locally.
Run to verify setup.
amazon-seller-pp-cli doctor在服务商控制台中为您的私有应用完成自授权,导出OAuth客户端ID、OAuth客户端密钥和刷新令牌,然后运行doctor命令:
bash
export SP_API_LWA_CLIENT_ID="<client-id>"
export SP_API_LWA_CLIENT_SECRET="<client-secret>"
export SP_API_REFRESH_TOKEN="<refresh-token>"
amazon-seller-pp-cli doctorCLI会在首次实际使用时将刷新令牌兑换为访问令牌,并在本地缓存该访问令牌。
运行验证设置是否正确。
amazon-seller-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:
--selectbashamazon-seller-pp-cli catalog get <asin> --marketplace-ids ATVPDKIKX0DER --agent --select asin,attributes,summaries -
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
-
Explicit retries — useonly when an already-existing create should count as success
--idempotent
在任何命令后添加参数,等效于:。
--agent--json --compact --no-input --no-color --yes-
可管道传输 — 标准输出为JSON格式,错误信息输出到标准错误流
-
可筛选 —参数保留字段子集。点路径可深入嵌套结构;数组会遍历每个元素。对于输出冗长的API,此功能对缩小上下文范围至关重要:
--selectbashamazon-seller-pp-cli catalog get <asin> --marketplace-ids ATVPDKIKX0DER --agent --select asin,attributes,summaries -
可预览 —参数会显示请求内容但不发送
--dry-run -
离线友好 — 同步/搜索命令在本地SQLite存储可用时可使用该存储
-
非交互式 — 从不弹出提示,所有输入均通过参数传递
-
显式重试 — 仅当已存在的创建操作应视为成功时,才使用参数
--idempotent
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:
amazon-seller-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
amazon-seller-pp-cli feedback --stdin < notes.txt
amazon-seller-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.
~/.amazon-seller-pp-cli/feedback.jsonlAMAZON_SELLER_FEEDBACK_ENDPOINT--sendAMAZON_SELLER_FEEDBACK_AUTO_SEND=trueWrite what surprised you, not a bug report. Short, specific, one line: that is the part that compounds.
当您(或Agent)发现此CLI存在问题时,可记录反馈:
amazon-seller-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
amazon-seller-pp-cli feedback --stdin < notes.txt
amazon-seller-pp-cli feedback list --json --limit 10反馈条目会存储在本地文件中。除非设置了且传递了参数或设置了,否则反馈不会被POST发送。默认行为仅存储在本地。
~/.amazon-seller-pp-cli/feedback.jsonlAMAZON_SELLER_FEEDBACK_ENDPOINT--sendAMAZON_SELLER_FEEDBACK_AUTO_SEND=true请写下让您感到意外的点,而非正式的Bug报告。简短、具体、单条描述:这样的反馈才更有价值。
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.
amazon-seller-pp-cli profile save briefing --json
amazon-seller-pp-cli --profile briefing sellers marketplaces
amazon-seller-pp-cli profile list --json
amazon-seller-pp-cli profile show briefing
amazon-seller-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」模式。
amazon-seller-pp-cli profile save briefing --json
amazon-seller-pp-cli --profile briefing sellers marketplaces
amazon-seller-pp-cli profile list --json
amazon-seller-pp-cli profile show briefing
amazon-seller-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--helpoutputamazon-seller-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的输出内容amazon-seller-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/commerce/amazon-seller/cmd/amazon-seller-pp-mcp@latest - Register with Claude Code:
bash
claude mcp add amazon-seller-pp-mcp -- amazon-seller-pp-mcp - Verify:
claude mcp list
- 安装MCP服务器:
bash
go install github.com/mvanhorn/printing-press-library/library/commerce/amazon-seller/cmd/amazon-seller-pp-mcp@latest - 在Claude Code中注册:
bash
claude mcp add amazon-seller-pp-mcp -- amazon-seller-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 amazon-seller-pp-cli - Match the user query to the best command from the Unique Capabilities and Command Reference above.
- Execute with the flag:
--agentbashamazon-seller-pp-cli <command> [subcommand] [args] --agent - If ambiguous, drill into subcommand help: .
amazon-seller-pp-cli <command> --help
- 检查是否已安装:如果未找到,可提供安装选项(参见顶部前提条件部分)。
which amazon-seller-pp-cli - 将用户查询与上方“独特功能”和“命令参考”中的最佳匹配命令对应起来。
- 使用参数执行命令:
--agentbashamazon-seller-pp-cli <command> [subcommand] [args] --agent - 如果存在歧义,可查看子命令帮助:。
amazon-seller-pp-cli <command> --help