pp-ebay

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

eBay — Printing Press CLI

eBay — Printing Press CLI

Prerequisites: Install the CLI

前提条件:安装CLI

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

Unique Capabilities

独特功能

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

Discovery and intelligence

发现与智能分析

  • auctions
    — Search active auctions filtered by bid count and ending window (e.g. "Steph Curry cards with at least 3 bids ending in next hour"). The eBay site can no longer answer this query since the Finding API was retired in February 2025.
    Finds price-discoverable competition windows where last-second bidding actually moves the price.
    bash
    ebay-pp-cli auctions "Steph Curry rookie" --has-bids --ending-within 1h --json --select item_id,price,bids,time_left
  • comp
    — Average sale price for any item over the last 90 days with smart matching, condition normalization, outlier trim, and percentile distribution.
    When pricing a bid (or deciding whether to even bother), you need the realistic distribution of recent sales, not a single anchor. Trim handles outliers; dedupe handles title variants.
    bash
    ebay-pp-cli comp "Cooper Flagg /50 Topps Chrome" --trim --json --select mean,median,sample_size
  • comp
    outlier trim
    — 1.5x IQR outlier trim on sold-comp results. Surfaces the realistic price band buyers should anchor on, with stddev and quartiles.
    Tells you what a normal buyer actually paid versus a record sale or a fire-sale outlier.
    bash
    ebay-pp-cli comp "Rolex Submariner 116610LN" --trim --json --select p25,median,p75,std_dev
  • comp --dedupe-variants
    — Collapse near-duplicate sold listings to one exemplar per fingerprint (token-bag, order-insensitive).
    Without dedupe, the comp distribution is biased toward whichever seller listed the same card 5 times.
    bash
    ebay-pp-cli comp "Cooper Flagg /50" --dedupe-variants
  • listings
    — Active listing search filtered by auction/BIN, condition, and price band.
    bash
    ebay-pp-cli listings --nkw "PSA Mariners Griffey" --lh-bin 1 --udlo 10 --udhi 30
  • auctions
    — 按出价次数和结束时段筛选在售拍卖(例如:"Steph Curry cards with at least 3 bids ending in next hour")。自2025年2月Finding API停用后,eBay官网已无法响应此类查询。
    可找到价格波动明显的竞价窗口,此时段内的最后出价会真正影响成交价。
    bash
    ebay-pp-cli auctions "Steph Curry rookie" --has-bids --ending-within 1h --json --select item_id,price,bids,time_left
  • comp
    — 基于智能匹配、状态归一化、异常值剔除和百分位分布,计算任意商品过去90天的平均售价。
    在出价定价(或决定是否参与竞价)时,你需要的是近期真实的售价分布,而非单一参考价。异常值剔除功能可过滤极端数据;去重功能可处理标题变体带来的重复数据。
    bash
    ebay-pp-cli comp "Cooper Flagg /50 Topps Chrome" --trim --json --select mean,median,sample_size
  • comp
    异常值剔除
    — 对已售比价结果采用1.5倍四分位距(IQR)剔除异常值,呈现买家应参考的真实价格区间,并提供标准差和四分位数数据。
    可告诉你普通买家的实际成交价,区别于创纪录售价或甩卖价这类异常值。
    bash
    ebay-pp-cli comp "Rolex Submariner 116610LN" --trim --json --select p25,median,p75,std_dev
  • comp --dedupe-variants
    — 将近似重复的已售列表按指纹(词袋模型、顺序无关)合并为单个样本。
    若不进行去重,比价分布会偏向同一卖家多次上架的同款商品。
    bash
    ebay-pp-cli comp "Cooper Flagg /50" --dedupe-variants
  • listings
    — 按拍卖/一口价、商品状态和价格区间筛选在售商品。
    bash
    ebay-pp-cli listings --nkw "PSA Mariners Griffey" --lh-bin 1 --udlo 10 --udhi 30

When to use

使用场景

  • User asks "what did this card / watch / item sell for" →
    ebay-pp-cli comp "<title>" --trim
  • User asks "find auctions ending soon with bids" →
    ebay-pp-cli auctions "<query>" --has-bids --ending-within 1h
  • User asks "find Buy It Now listings under $X for ..." →
    ebay-pp-cli listings --nkw "<query>" --lh-bin 1 --udhi <max>
  • User asks "watch this listing" / "show my watchlist" →
    ebay-pp-cli watch list
  • User asks to bid programmatically → explain the limitation (eBay step-ups auth on
    /bfl/placebid
    ); link them to bid in the browser. Do not run
    bid
    or
    snipe
    on their behalf.
  • 用户询问“这款卡片/手表/商品卖了多少钱” → 执行
    ebay-pp-cli comp "<标题>" --trim
  • 用户询问“查找即将结束且已有出价的拍卖” → 执行
    ebay-pp-cli auctions "<查询词>" --has-bids --ending-within 1h
  • 用户询问“查找价格低于$X的一口价商品” → 执行
    ebay-pp-cli listings --nkw "<查询词>" --lh-bin 1 --udhi <最高价>
  • 用户询问“关注该商品”/“查看我的关注列表” → 执行
    ebay-pp-cli watch list
  • 用户要求程序化出价 → 说明限制条件(eBay在
    /bfl/placebid
    接口启用进阶认证);引导用户在浏览器中出价。不要代为执行
    bid
    snipe
    命令。

Anti-triggers

不适用于以下场景

This CLI is NOT the right tool for:
  • Placing bids.
    bid
    /
    snipe
    /
    bid-group
    are experimental and fail end-to-end. Direct the user to bid in their browser.
  • Listing items as a seller (use the eBay Sell APIs / Seller Hub directly).
  • Order fulfillment or shipping label generation.
  • Bulk inventory management for sellers.
本CLI并非适用于:
  • 出价操作
    bid
    /
    snipe
    /
    bid-group
    功能处于实验阶段,无法完整执行。请引导用户在浏览器中出价。
  • 卖家发布商品(直接使用eBay Sell API或卖家中心)。
  • 订单履约或运单标签生成。
  • 卖家批量库存管理。

Known Limitations

已知限制

  • Bid placement (
    bid
    ,
    snipe
    ,
    bid-group
    ) cannot complete end-to-end because eBay step-ups auth on
    /bfl/placebid
    for cookie-only sessions. These commands are hidden from default
    --help
    and print a warning when invoked. Users should bid in the browser.
  • Rate limiting: Sustained scraping triggers eBay 403s. Recovery:
    ebay-pp-cli auth refresh
    and back off.
  • Stub commands: Watchlist write paths, saved-search CRUD, feed, offer-hunter ship as "not yet implemented" stubs.
  • 出价功能
    bid
    snipe
    bid-group
    )无法完整执行,因为eBay针对仅使用Cookie的会话在
    /bfl/placebid
    接口启用了进阶认证。这些命令默认不在
    --help
    中显示,调用时会打印警告信息。用户应在浏览器中出价。
  • 速率限制:持续抓取会触发eBay的403错误。恢复方法:执行
    ebay-pp-cli auth refresh
    并暂停操作一段时间。
  • 占位命令:关注列表写入路径、已保存搜索的增删改查、feed、offer-hunter等功能以“尚未实现”的占位形式提供。

HTTP Transport

HTTP传输

This CLI uses Chrome-compatible HTTP transport for browser-facing endpoints. It does not require a resident browser process for normal API calls.
本CLI使用兼容Chrome的HTTP传输协议访问浏览器端接口。正常API调用无需常驻浏览器进程。

Discovery Signals

发现信号

This CLI was generated with browser-observed traffic context.
  • Capture coverage: 15 API entries from 25 total network entries
  • Protocols: html_scraping (95% confidence), rest_json (90% confidence)
  • Auth signals: — cookies: cid, s, nonsession, dp1, ebaysid, ds1, ds2, shs, npii
  • Generation hints: requires_browser_auth, requires_protected_client, uses_chrome_cookie_import, has_per_request_csrf, has_per_request_fraud_token
  • Caveats: placebid_step_up: eBay redirects /bfl/placebid/<id> to sign-in for cookie-only sessions, so bid placement cannot complete from this CLI today; akamai_active: Akamai bot manager active — Surf must use Chrome TLS fingerprint or stdlib HTTP will be blocked; rate_limit: sustained scraping triggers 403s, recover with auth refresh and back off
本CLI基于浏览器捕获的流量上下文生成:
  • 捕获覆盖范围:25条网络请求中的15条API请求
  • 协议:html_scraping(95%置信度)、rest_json(90%置信度)
  • 认证信号:Cookie:cid、s、nonsession、dp1、ebaysid、ds1、ds2、shs、npii
  • 生成提示:requires_browser_auth、requires_protected_client、uses_chrome_cookie_import、has_per_request_csrf、has_per_request_fraud_token
  • 注意事项:placebid_step_up:eBay会将仅使用Cookie会话的
    /bfl/placebid/<id>
    请求重定向至登录页面,因此目前本CLI无法完成出价操作;akamai_active:Akamai反机器人系统已启用 — Surf必须使用Chrome TLS指纹,否则标准库HTTP请求会被拦截;rate_limit:持续抓取会触发403错误,可通过刷新认证并暂停操作恢复

Command Reference

命令参考

deal — eBay Deals feed
  • ebay-pp-cli deal
    — Browse the eBay Deals feed
item — Item details
  • ebay-pp-cli item <itemId>
    — Get item detail by listing id
listings — Active listing search (HTML scrape of /sch/i.html)
  • ebay-pp-cli listings
    — Search active eBay listings by keyword
sold — Sold/completed listings (last 90 days, HTML scrape)
  • ebay-pp-cli sold
    — Search sold completed listings by keyword (90 day window)
watch — Watchlist (authenticated, read-only)
  • ebay-pp-cli watch
    — List items in the user's watchlist
Hand-written commands
  • ebay-pp-cli comp <query>
    — Sold-comp intelligence: average sale price, distribution, trendline for items matching the query over the last 90 days.
  • ebay-pp-cli auctions <query>
    — Search active auctions filtered by bid count, ending window, condition. The 'has bids ending in next hour' query.
  • ebay-pp-cli feed <saved-search>
    — Stream new listings matching a saved search, with sold-comp context appended to each item.
  • ebay-pp-cli history
    — Buying history (won, lost, paid) over a configurable window.
  • ebay-pp-cli saved-search
    — Local saved-search CRUD.
Hidden experimental commands
These commands exist in the binary but are excluded from
--help
because they currently fail end-to-end. Reach them by name (e.g.
ebay-pp-cli snipe --help
) for details.
  • ebay-pp-cli bid
    — Place bids (experimental; eBay step-up auth blocks).
  • ebay-pp-cli snipe <itemId> --max <amount>
    — Sniper bid (experimental; depends on bid flow).
  • ebay-pp-cli bid-group
    — Coordinated multi-item snipe groups (experimental; depends on snipe).
deal — eBay Deals商品流
  • ebay-pp-cli deal
    — 浏览eBay Deals商品流
item — 商品详情
  • ebay-pp-cli item <itemId>
    — 按商品ID获取详情
listings — 在售商品搜索(基于/sch/i.html的HTML抓取)
  • ebay-pp-cli listings
    — 按关键词搜索eBay在售商品
sold — 已售/完成交易的商品(过去90天,基于HTML抓取)
  • ebay-pp-cli sold
    — 按关键词搜索已售/完成交易的商品(90天窗口)
watch — 关注列表(需认证,只读)
  • ebay-pp-cli watch
    — 列出用户关注列表中的商品
手写命令
  • ebay-pp-cli comp <query>
    — 已售商品比价分析:过去90天内匹配查询词的商品平均售价、价格分布和趋势线。
  • ebay-pp-cli auctions <query>
    — 按出价次数、结束时段、商品状态筛选在售拍卖。即“查找即将结束且已有出价的拍卖”查询。
  • ebay-pp-cli feed <saved-search>
    — 推送匹配已保存搜索的新商品,并附加已售商品比价上下文。
  • ebay-pp-cli history
    — 可配置时间窗口内的购买历史(已中标、未中标、已支付)。
  • ebay-pp-cli saved-search
    — 本地已保存搜索的增删改查。
隐藏的实验性命令
这些命令存在于二进制文件中,但因目前无法完整执行,未包含在
--help
中。可直接通过命令名称调用(例如
ebay-pp-cli snipe --help
)查看详情。
  • ebay-pp-cli bid
    — 出价(实验性;eBay进阶认证拦截)。
  • ebay-pp-cli snipe <itemId> --max <amount>
    — 狙击出价(实验性;依赖出价流程)。
  • ebay-pp-cli bid-group
    — 多商品协同狙击出价组(实验性;依赖狙击功能)。

Finding the right command

查找合适的命令

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

Auth Setup

认证设置

This CLI uses a browser session. Log in to .ebay.com in Chrome, then:
bash
ebay-pp-cli auth login --chrome
Requires a cookie extraction tool (
pycookiecheat
via pip, or
cookies
via Homebrew).
Run
ebay-pp-cli doctor
to verify setup.
本CLI使用浏览器会话。先在Chrome中登录.ebay.com,然后执行:
bash
ebay-pp-cli auth login --chrome
需依赖Cookie提取工具(通过pip安装的
pycookiecheat
,或通过Homebrew安装的
cookies
)。
执行
ebay-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
    ebay-pp-cli deal --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
    ebay-pp-cli deal --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": <数据>
}
解析
.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:
ebay-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
ebay-pp-cli feedback --stdin < notes.txt
ebay-pp-cli feedback list --json --limit 10
Entries are stored locally at
~/.ebay-pp-cli/feedback.jsonl
. They are never POSTed unless
EBAY_FEEDBACK_ENDPOINT
is set AND either
--send
is passed or
EBAY_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存在问题时,可记录反馈:
ebay-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
ebay-pp-cli feedback --stdin < notes.txt
ebay-pp-cli feedback list --json --limit 10
反馈条目存储在本地
~/.ebay-pp-cli/feedback.jsonl
文件中。仅当设置了
EBAY_FEEDBACK_ENDPOINT
且传递了
--send
参数或设置
EBAY_FEEDBACK_AUTO_SEND=true
时,才会将反馈发送至远程端点。默认仅存储在本地。
请记录让你感到意外的内容,而非正式的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>
参数。输出会除标准输出外(或替代标准输出)发送至指定的接收端,以便Agent无需手动管道即可路由命令结果。支持三种接收端:
接收端效果
stdout
默认;仅输出至标准输出
file:<path>
原子性写入输出至
<path>
(先写入临时文件再重命名)
webhook:<url>
将输出内容POST至指定URL(当使用
--compact
时为
application/x-ndjson
格式,否则为
application/json
格式)
不支持的协议会返回结构化错误,并列出支持的类型。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.
ebay-pp-cli profile save briefing --json
ebay-pp-cli --profile briefing deal
ebay-pp-cli profile list --json
ebay-pp-cli profile show briefing
ebay-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”模式。
ebay-pp-cli profile save briefing --json
ebay-pp-cli --profile briefing deal
ebay-pp-cli profile list --json
ebay-pp-cli profile show briefing
ebay-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
    ebay-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
    → 显示
    ebay-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/commerce/ebay/cmd/ebay-pp-mcp@latest
  2. Register with Claude Code:
    bash
    claude mcp add ebay-pp-mcp -- ebay-pp-mcp
  3. Verify:
    claude mcp list
  1. 安装MCP服务器:
    bash
    go install github.com/mvanhorn/printing-press-library/library/commerce/ebay/cmd/ebay-pp-mcp@latest
  2. 在Claude Code中注册:
    bash
    claude mcp add ebay-pp-mcp -- ebay-pp-mcp
  3. 验证:
    claude mcp list

Direct Use

直接使用

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