pp-facebook-marketplace

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
<!-- GENERATED FILE — DO NOT EDIT. This file is a verbatim mirror of library/commerce/facebook-marketplace/SKILL.md, regenerated post-merge by tools/generate-skills/. Hand-edits here are silently overwritten on the next regen. Edit the library/ source instead. See AGENTS.md "Generated artifacts: registry.json, cli-skills/". -->
<!-- 生成文件 — 请勿编辑。此文件是library/commerce/facebook-marketplace/SKILL.md的完全镜像,由tools/generate-skills/在合并后重新生成。此处的手动编辑会在下次重新生成时被静默覆盖。请改为编辑library/源文件。请参阅AGENTS.md中的“生成产物:registry.json, cli-skills/”。 -->

Facebook Marketplace — Printing Press CLI

Facebook Marketplace — Printing Press CLI

Prerequisites: Install the CLI

前提条件:安装CLI

This skill drives the
facebook-marketplace-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-library install facebook-marketplace --cli-only
  2. Verify:
    facebook-marketplace-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.26.3 or newer):
bash
go install github.com/mvanhorn/printing-press-library/library/commerce/facebook-marketplace/cmd/facebook-marketplace-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.
此技能驱动
facebook-marketplace-pp-cli
二进制文件。在调用此技能的任何命令之前,您必须确认CLI已安装。如果未安装,请先进行安装:
  1. 通过Printing Press安装程序安装:
    bash
    npx -y @mvanhorn/printing-press-library install facebook-marketplace --cli-only
  2. 验证:
    facebook-marketplace-pp-cli --version
  3. 确保
    $GOPATH/bin
    (或
    $HOME/go/bin
    )已添加到
    $PATH
    中。
如果
npx
安装失败(无Node环境、离线等),请回退到直接通过Go安装(要求Go 1.26.3或更高版本):
bash
go install github.com/mvanhorn/printing-press-library/library/commerce/facebook-marketplace/cmd/facebook-marketplace-pp-cli@latest
如果安装后
--version
提示“command not found”,说明安装步骤未将二进制文件添加到
$PATH
中。在验证成功之前,请不要继续执行技能命令。

When to Use This CLI

何时使用此CLI

Use this CLI for local, human-paced Facebook Marketplace workflows: searching, watching, triaging matches, drafting listings, and replying to seller inbox threads after explicit approval. Avoid using it for bulk automation or cross-platform scraping.
将此CLI用于本地、人工节奏的Facebook Marketplace工作流:搜索、监控、筛选匹配结果、起草 listings 以及在获得明确批准后回复卖家收件箱对话。避免将其用于批量自动化或跨平台爬取。

Unique Capabilities

独特功能

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

Seller workflow

卖家工作流

  • draft
    — Draft a Marketplace title, description, and price suggestion from photos and notes.
    Use this when preparing a seller listing before opening a write-gated post flow.
    bash
    facebook-marketplace-pp-cli draft --photos chair-front.jpg,chair-tag.jpg --notes "walnut dining chair, small scratch on back" --json
  • reply
    — Prepare and send a seller inbox reply only when
    --write
    and doctor gating both pass.
    Use this only for human-approved sell-side messaging.
    bash
    facebook-marketplace-pp-cli reply --thread 1525836598898750 --message "Yes, it is still available." --write --json
  • draft
    — 根据照片和备注生成Marketplace标题、描述和价格建议。
    在开启受写入权限控制的发布流程前准备卖家listing时使用此命令。
    bash
    facebook-marketplace-pp-cli draft --photos chair-front.jpg,chair-tag.jpg --notes "walnut dining chair, small scratch on back" --json
  • reply
    — 仅当
    --write
    和权限验证都通过时,才准备并发送卖家收件箱回复。
    仅在人工批准的卖家端消息发送场景中使用此命令。
    bash
    facebook-marketplace-pp-cli reply --thread 1525836598898750 --message "Yes, it is still available." --write --json

Buy-side workflow

买家工作流

  • watch add
    — Persist a Marketplace search watch with deterministic keyword, price, and distance filters.
    Use this when the agent needs to monitor Marketplace without deciding relevance on every raw result.
    bash
    facebook-marketplace-pp-cli watch add --name "eames" --query "eames lounge" --max-price 1500 --radius 60 --must-have-keywords "chair,lounge" --json
  • matches
    — Show new watch matches after deterministic filtering.
    Use this when an agent needs the shortlist worth showing a human buyer.
    bash
    facebook-marketplace-pp-cli matches --new --json
  • watch add
    — 保存带有确定关键词、价格和距离筛选条件的Marketplace搜索监控。
    当Agent需要监控Marketplace但无需对每条原始结果判断相关性时使用此命令。
    bash
    facebook-marketplace-pp-cli watch add --name "eames" --query "eames lounge" --max-price 1500 --radius 60 --must-have-keywords "chair,lounge" --json
  • matches
    — 显示经过确定性筛选后的新监控匹配结果。
    当Agent需要为买家展示值得关注的候选列表时使用此命令。
    bash
    facebook-marketplace-pp-cli matches --new --json

Local mirror

本地镜像

  • stale
    — Find local seller listings older than seven days with no engagement.
    Use this when deciding which seller listings need price changes or renewal.
    bash
    facebook-marketplace-pp-cli stale --days 7 --json
  • stale
    — 查找发布超过七天且无互动的本地卖家listings。
    在决定哪些卖家listings需要调整价格或重新发布时使用此命令。
    bash
    facebook-marketplace-pp-cli stale --days 7 --json

HTTP Transport

HTTP传输

This CLI uses Chrome-compatible HTTP transport over HTTP/3 for browser-facing endpoints. It does not require a resident browser process for normal API calls.
此CLI对面向浏览器的端点使用兼容Chrome的HTTP/3传输协议。正常API调用无需常驻浏览器进程。

Command Reference

命令参考

composer — Sell-side composer helper operations.
  • facebook-marketplace-pp-cli composer price_prediction
    — Fetch Marketplace composer price prediction.
  • facebook-marketplace-pp-cli composer root
    — Fetch Marketplace listing composer metadata.
  • facebook-marketplace-pp-cli composer shipping_options
    — Fetch calculated shipping options for a draft listing.
inbox — Marketplace inbox and messaging operations.
  • facebook-marketplace-pp-cli inbox list
    — Fetch Marketplace inbox overview.
  • facebook-marketplace-pp-cli inbox message_seller
    — Send a Marketplace seller message.
  • facebook-marketplace-pp-cli inbox seller_threads
    — Fetch Marketplace seller inbox threads.
  • facebook-marketplace-pp-cli inbox seller_threads_page
    — Fetch a page of Marketplace seller inbox threads.
listing — Listing detail and sell-side listing operations.
  • facebook-marketplace-pp-cli listing change_availability
    — Change a Marketplace listing availability state.
  • facebook-marketplace-pp-cli listing create
    — Create a Marketplace listing from a prepared composer payload; pass
    --photo
    to upload local photos first.
  • facebook-marketplace-pp-cli listing delete
    — Delete a Marketplace for-sale item.
  • facebook-marketplace-pp-cli listing get
    — Fetch a Marketplace listing detail page payload.
  • facebook-marketplace-pp-cli listing media
    — Fetch Marketplace listing media payload.
  • facebook-marketplace-pp-cli listing upload-photo
    — Upload a local photo and return the Marketplace composer
    photo_id
    .
marketplace — Marketplace browse and location operations.
  • facebook-marketplace-pp-cli marketplace browse_feed
    — Fetch Marketplace browse feed results.
  • facebook-marketplace-pp-cli marketplace set_browse_radius
    — Set Marketplace browse radius.
  • facebook-marketplace-pp-cli marketplace set_buy_location
    — Set Marketplace buying location.
marketplace_search — Marketplace search operations.
  • facebook-marketplace-pp-cli marketplace_search
    — Search Marketplace listings.
Hand-written commands
  • facebook-marketplace-pp-cli draft
    — AI listing drafter from photos and notes.
  • facebook-marketplace-pp-cli watch
    — Buy-side deterministic watcher commands.
  • facebook-marketplace-pp-cli matches
    — Show watcher matches after deterministic filtering.
  • facebook-marketplace-pp-cli stale
    — Show local listings older than seven days with no engagement.
  • facebook-marketplace-pp-cli reply
    — Write-gated sell-side message reply helper.
composer — 卖家端内容创作辅助操作。
  • facebook-marketplace-pp-cli composer price_prediction
    — 获取Marketplace创作工具的价格预测。
  • facebook-marketplace-pp-cli composer root
    — 获取Marketplace listing创作工具的元数据。
  • facebook-marketplace-pp-cli composer shipping_options
    — 获取草稿listing的计算运费选项。
inbox — Marketplace收件箱和消息操作。
  • facebook-marketplace-pp-cli inbox list
    — 获取Marketplace收件箱概览。
  • facebook-marketplace-pp-cli inbox message_seller
    — 发送Marketplace卖家消息。
  • facebook-marketplace-pp-cli inbox seller_threads
    — 获取Marketplace卖家收件箱对话线程。
  • facebook-marketplace-pp-cli inbox seller_threads_page
    — 获取Marketplace卖家收件箱对话线程的一页内容。
listing — Listing详情和卖家端listing操作。
  • facebook-marketplace-pp-cli listing change_availability
    — 修改Marketplace listing的可用状态。
  • facebook-marketplace-pp-cli listing create
    — 从准备好的创作工具负载创建Marketplace listing;传递
    --photo
    参数可先上传本地照片。
  • facebook-marketplace-pp-cli listing delete
    — 删除Marketplace在售商品。
  • facebook-marketplace-pp-cli listing get
    — 获取Marketplace listing详情页负载。
  • facebook-marketplace-pp-cli listing media
    — 获取Marketplace listing媒体负载。
  • facebook-marketplace-pp-cli listing upload-photo
    — 上传本地照片并返回Marketplace创作工具的
    photo_id
marketplace — Marketplace浏览和位置操作。
  • facebook-marketplace-pp-cli marketplace browse_feed
    — 获取Marketplace浏览流结果。
  • facebook-marketplace-pp-cli marketplace set_browse_radius
    — 设置Marketplace浏览半径。
  • facebook-marketplace-pp-cli marketplace set_buy_location
    — 设置Marketplace购买地点。
marketplace_search — Marketplace搜索操作。
  • facebook-marketplace-pp-cli marketplace_search
    — 搜索Marketplace listings。
手动编写的命令
  • facebook-marketplace-pp-cli draft
    — 根据照片和notes生成AI版listing文案。
  • facebook-marketplace-pp-cli watch
    — 买家端确定性监控命令。
  • facebook-marketplace-pp-cli matches
    — 显示经过确定性筛选后的监控匹配结果。
  • facebook-marketplace-pp-cli stale
    — 显示发布超过七天且无互动的本地listings。
  • facebook-marketplace-pp-cli reply
    — 受写入权限控制的卖家端消息回复辅助工具。

Finding the right command

查找合适的命令

When you know what you want to do but not which command does it, ask the CLI directly:
bash
facebook-marketplace-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
facebook-marketplace-pp-cli which "<用您自己的话描述功能>"
which
会将自然语言的功能查询解析为此CLI精选功能索引中最匹配的命令。退出码
0
表示至少有一个匹配项;退出码
2
表示没有确定的匹配项 — 请回退到
--help
或使用更具体的查询。

Recipes

使用示例

Create a buy-side watch

创建买家端监控

bash
facebook-marketplace-pp-cli watch add --name "eames" --query "eames lounge" --max-price 1500 --radius 60 --json
Stores deterministic filter criteria locally so future runs can compare new listings.
bash
facebook-marketplace-pp-cli watch add --name "eames" --query "eames lounge" --max-price 1500 --radius 60 --json
在本地存储确定性筛选条件,以便后续运行时可以比较新的listings。

Draft a seller listing

起草卖家listing

bash
facebook-marketplace-pp-cli draft --photos chair-front.jpg,chair-tag.jpg --notes "walnut dining chair, small scratch" --json
Produces listing copy before any write-gated Marketplace mutation.
To create with local photos, run
facebook-marketplace-pp-cli doctor
first, then pass
--write
and one or more
--photo
flags to
listing create
. The CLI uploads each local file, appends the returned
photo_id
values to
variables.input.data.common.photo_ids
, and then submits the create mutation.
bash
facebook-marketplace-pp-cli draft --photos chair-front.jpg,chair-tag.jpg --notes "walnut dining chair, small scratch" --json
在对Marketplace进行受写入权限控制的修改之前生成listing文案。
要使用本地照片创建listing,请先运行
facebook-marketplace-pp-cli doctor
,然后在
listing create
命令中传递
--write
和一个或多个
--photo
参数。CLI会上传每个本地文件,将返回的
photo_id
值附加到
variables.input.data.common.photo_ids
中,然后提交创建请求。

Auth Setup

认证设置

Run
facebook-marketplace-pp-cli auth login --chrome
while logged in to Facebook in Chrome. The captured browser session is the credential; do not store session material in the Dropbox project workspace.
Run
facebook-marketplace-pp-cli doctor
to verify setup.
在Chrome中登录Facebook后,运行
facebook-marketplace-pp-cli auth login --chrome
。捕获的浏览器会话即为凭证;请勿将会话材料存储在Dropbox项目工作区中。
运行
facebook-marketplace-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
    facebook-marketplace-pp-cli inbox list --fb-api-req-friendly-name example-resource --agent --select id,name,status
  • Previewable
    --dry-run
    shows the request without sending
  • Non-interactive — never prompts, every input is a flag
  • Explicit retries — use
    --idempotent
    only when an already-existing create should count as success
在任何命令后添加
--agent
参数。这会等效于:
--json --compact --no-input --no-color --yes
  • 可管道传输 — 标准输出为JSON,错误信息输出到标准错误
  • 可筛选
    --select
    参数保留字段子集。点路径可深入嵌套结构;数组会遍历每个元素。对于冗长的API,这是保持上下文精简的关键:
    bash
    facebook-marketplace-pp-cli inbox list --fb-api-req-friendly-name example-resource --agent --select id,name,status
  • 可预览
    --dry-run
    参数显示请求内容但不发送
  • 非交互式 — 从不提示,所有输入均通过参数传递
  • 显式重试 — 仅当已存在的创建操作应被视为成功时,才使用
    --idempotent
    参数

Agent Feedback

Agent反馈

When you (or the agent) notice something off about this CLI, record it:
facebook-marketplace-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
facebook-marketplace-pp-cli feedback --stdin < notes.txt
facebook-marketplace-pp-cli feedback list --json --limit 10
Entries are stored locally at
~/.facebook-marketplace-pp-cli/feedback.jsonl
. They are never POSTed unless
FACEBOOK_MARKET_FEEDBACK_ENDPOINT
is set AND either
--send
is passed or
FACEBOOK_MARKET_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存在问题时,请记录反馈:
facebook-marketplace-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
facebook-marketplace-pp-cli feedback --stdin < notes.txt
facebook-marketplace-pp-cli feedback list --json --limit 10
反馈条目存储在本地
~/.facebook-marketplace-pp-cli/feedback.jsonl
文件中。除非设置了
FACEBOOK_MARKET_FEEDBACK_ENDPOINT
且传递了
--send
参数或设置了
FACEBOOK_MARKET_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(当使用
--compact
时为
application/json
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.
facebook-marketplace-pp-cli profile save briefing --json
facebook-marketplace-pp-cli --profile briefing inbox list --fb-api-req-friendly-name example-resource
facebook-marketplace-pp-cli profile list --json
facebook-marketplace-pp-cli profile show briefing
facebook-marketplace-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”模式。
facebook-marketplace-pp-cli profile save briefing --json
facebook-marketplace-pp-cli --profile briefing inbox list --fb-api-req-friendly-name example-resource
facebook-marketplace-pp-cli profile list --json
facebook-marketplace-pp-cli profile show briefing
facebook-marketplace-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
    facebook-marketplace-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
    → 显示
    facebook-marketplace-pp-cli --help
    输出
  2. install
    开头
    → 以
    mcp
    结尾 → MCP安装;否则 → 参见上方前提条件
  3. 其他内容 → 直接使用(添加
    --agent
    参数执行CLI命令)

MCP Server Installation

MCP服务器安装

Install the MCP binary from this CLI's published public-library entry or pre-built release, then register it:
bash
claude mcp add facebook-marketplace-pp-mcp -- facebook-marketplace-pp-mcp
Verify:
claude mcp list
从此CLI已发布的公共库条目或预构建版本安装MCP二进制文件,然后注册:
bash
claude mcp add facebook-marketplace-pp-mcp -- facebook-marketplace-pp-mcp
验证:
claude mcp list

Direct Use

直接使用

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