pp-mercury
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMercury — Printing Press CLI
Mercury — 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:
mercury-pp-cli- Install via the Printing Press installer:
bash
npx -y @mvanhorn/printing-press install mercury --cli-only - Verify:
mercury-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/payments/mercury/cmd/mercury-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已安装。**如果未安装,请先进行安装:
mercury-pp-cli- 通过Printing Press安装程序安装:
bash
npx -y @mvanhorn/printing-press install mercury --cli-only - 验证:
mercury-pp-cli --version - 确保(或
$GOPATH/bin)已添加到$HOME/go/bin中。$PATH
如果安装失败(无Node环境、离线等),可以回退到直接通过Go安装(需要Go 1.23+版本):
npxbash
go install github.com/mvanhorn/printing-press-library/library/payments/mercury/cmd/mercury-pp-cli@latest如果安装后执行提示“command not found”,说明安装步骤未将二进制文件添加到中。在验证成功前,请不要执行技能命令。
--version$PATHUnique Capabilities
独特功能
These capabilities aren't available in any other tool for this API.
-
— Builds a read-only approval plan with body, idempotency key, dry-run command, and execute command before payment or transfer writes.
workflow payment-planAgents can prepare exact write commands without moving money.bashmercury-pp-cli workflow payment-plan --kind transfer --source-account-id acct_src --destination-account-id acct_dst --amount 25 --agent -
— Syncs supported Mercury resources into a local SQLite store for offline search and analytics.
workflow archiveReduces API calls and gives agents repeatable context.bashmercury-pp-cli workflow archive --agent -
— Emits machine-readable command metadata for agents and MCP hosts.
agent-contextImproves autonomous command selection and reduces context waste.bashmercury-pp-cli agent-context --agent
这些功能是其他同API工具所不具备的。
-
— 创建只读的审批计划,包含请求体、幂等键、试运行命令,以及在支付或转账写入前的执行命令。
workflow payment-planAgent无需转移资金即可准备精确的写入命令。bashmercury-pp-cli workflow payment-plan --kind transfer --source-account-id acct_src --destination-account-id acct_dst --amount 25 --agent -
— 将支持的Mercury资源同步到本地SQLite存储中,用于离线搜索和分析。
workflow archive减少API调用次数,为Agent提供可重复使用的上下文。bashmercury-pp-cli workflow archive --agent -
— 为Agent和MCP主机输出机器可读的命令元数据。
agent-context提升自主命令选择能力,减少上下文冗余。bashmercury-pp-cli agent-context --agent
Command Reference
命令参考
account — Manage bank accounts
- — Get account by ID
mercury-pp-cli account <accountId>
accounts — Manage bank accounts
- — Retrieve a paginated list of accounts. Supports cursor-based pagination with limit, order, start_after, and...
mercury-pp-cli accounts
ar — Manage ar
- — Cancel an invoice. This action cannot be undone.
mercury-pp-cli ar cancel-invoice - — Create a new customer for the organization
mercury-pp-cli ar create-customer - — Create a new invoice for the organization
mercury-pp-cli ar create-invoice - — Delete a customer. This action cannot be undone.
mercury-pp-cli ar delete-customer - — Retrieve attachment details including download URL
mercury-pp-cli ar get-attachment - — Retrieve details of a specific customer by their ID
mercury-pp-cli ar get-customer - — Retrieve details of an invoice by its ID
mercury-pp-cli ar get-invoice - — Downloads a PDF file for the specified invoice. The response includes a Content-Disposition header set to...
mercury-pp-cli ar get-invoice-pdf - — Retrieve a paginated list of customers. Supports cursor-based pagination with limit, order, start_after, and...
mercury-pp-cli ar list-customers - — Retrieve a list of all attachments for a specific invoice
mercury-pp-cli ar list-invoice-attachments - — Retrieve a paginated list of invoices. Supports cursor-based pagination with limit, order, start_after, and...
mercury-pp-cli ar list-invoices - — Update an existing customer
mercury-pp-cli ar update-customer - — Update an existing invoice
mercury-pp-cli ar update-invoice
books — Manage organization books
- — Delete a specific Chart of Accounts template.
mercury-pp-cli books delete-agent-coa-template - — Delete an existing ledger within an agent-owned Chart of Accounts template.
mercury-pp-cli books delete-agent-ledger-template - — Bulk delete journal entries
mercury-pp-cli books delete-journal-entries - — Retrieve details of a specific Chart of Accounts template.
mercury-pp-cli books get-agent-coa-template - — Retrieve a paginated list of all default and agent-owned Chart of Accounts templates. These templates can be used...
mercury-pp-cli books get-agent-coa-templates - — List all journal entries
mercury-pp-cli books get-journal-entries - — Retrieve a Journal Entry
mercury-pp-cli books get-journal-entry - — Create a new agent-owned Chart of Accounts template. These templates can be used when creating new Books instances...
mercury-pp-cli books post-agent-coa-templates - — Create a new ledger within an agent-owned Chart of Accounts template.
mercury-pp-cli books post-agent-ledger-templates - — Create multiple Journal Entries
mercury-pp-cli books post-journal-entries - — Update an existing ledger within an agent-owned Chart of Accounts template.
mercury-pp-cli books put-agent-ledger-template - — Bulk update journal entries
mercury-pp-cli books put-journal-entries
cards — Manage cards
- — Issue a new virtual card.
mercury-pp-cli cards create - — Retrieve details of a specific card by its ID.
mercury-pp-cli cards get - — Retrieve a paginated list of cards.
mercury-pp-cli cards list - — Update a card's nickname or spending limits.
mercury-pp-cli cards update
categories — Manage expense categories
- — Create a new custom expense category for the organization.
mercury-pp-cli categories create-category - — Retrieve a paginated list of all available custom expense categories for the organization. Supports cursor-based...
mercury-pp-cli categories list
credit — Manage credit accounts
- — Retrieve a list of all credit accounts for the organization.
mercury-pp-cli credit
events — Manage API events
- — Get all events
mercury-pp-cli events get - — Get event by ID
mercury-pp-cli events get-eventid
organization — Organization information
- — Retrieve information about your organization including EIN, legal business name, and DBAs.
mercury-pp-cli organization
recipient — Manage payment recipients
- — Retrieve details of a specific recipient by ID
mercury-pp-cli recipient get - — Edit information about a specific recipient
mercury-pp-cli recipient update
recipients — Manage payment recipients
- — Create a new recipient for making payments
mercury-pp-cli recipients create - — Retrieve a paginated list of all recipients. Use cursor parameters (start_after, end_before) for pagination.
mercury-pp-cli recipients get - — Retrieve a paginated list of all recipient tax form attachments across all recipients in the organization. Use...
mercury-pp-cli recipients list-attachments
request-send-money — Manage request send money
- — Get send money approval request by ID
mercury-pp-cli request-send-money get-send-money-approval-request - — Retrieve a paginated list of send money approval requests for the authenticated organization. Supports filtering by...
mercury-pp-cli request-send-money list-send-money-approval-requests
safes — Manage SAFE (Simple Agreement for Future Equity) requests
- — Retrieve a specific SAFE request by its ID.
mercury-pp-cli safes get-request - — Retrieve all SAFE (Simple Agreement for Future Equity) requests for your organization.
mercury-pp-cli safes get-requests
statements — Download account statements
transaction — Manage transactions
- — Retrieve a single transaction by its ID. Returns full transaction details including attachments, check images, and...
mercury-pp-cli transaction get-by-id - — Update the note and/or category of an existing transaction. Use null values to clear existing data.
mercury-pp-cli transaction update
transactions — Manage transactions
- — Retrieve a paginated list of all transactions across all accounts. Supports advanced filtering by date ranges,...
mercury-pp-cli transactions
transfer — Manage transfer
- — Transfer funds between two accounts within the same organization. Supports transfers between depository accounts...
mercury-pp-cli transfer
treasury — Manage treasury accounts and transactions
- — Retrieve a paginated list of all treasury accounts associated with the authenticated organization. Use cursor...
mercury-pp-cli treasury
users — Manage organization team members
- — Get all users
mercury-pp-cli users get - — Get user by ID
mercury-pp-cli users get-userid
webhooks — Manage webhooks
- — Register a new webhook endpoint to receive event notifications
mercury-pp-cli webhooks create - — Delete a webhook endpoint
mercury-pp-cli webhooks delete - — Retrieve a paginated list of all webhook endpoints for your organization. Supports filtering by status.
mercury-pp-cli webhooks get - — Retrieve details of a specific webhook endpoint by ID
mercury-pp-cli webhooks get-webhookendpointid - — Update the configuration of an existing webhook endpoint. A webhook that has been disabled due to consecutive...
mercury-pp-cli webhooks update
account — 管理银行账户
- — 通过ID获取账户信息
mercury-pp-cli account <accountId>
accounts — 管理银行账户
- — 获取账户的分页列表。支持基于游标分页,可设置limit、order、start_after等参数……
mercury-pp-cli accounts
ar — 管理应收账款(AR)
- — 取消发票。此操作不可撤销。
mercury-pp-cli ar cancel-invoice - — 为组织创建新客户
mercury-pp-cli ar create-customer - — 为组织创建新发票
mercury-pp-cli ar create-invoice - — 删除客户。此操作不可撤销。
mercury-pp-cli ar delete-customer - — 获取附件详情,包括下载URL
mercury-pp-cli ar get-attachment - — 通过ID获取特定客户的详细信息
mercury-pp-cli ar get-customer - — 通过ID获取发票的详细信息
mercury-pp-cli ar get-invoice - — 下载指定发票的PDF文件。响应包含Content-Disposition头……
mercury-pp-cli ar get-invoice-pdf - — 获取客户的分页列表。支持基于游标分页,可设置limit、order、start_after等参数……
mercury-pp-cli ar list-customers - — 获取特定发票的所有附件列表
mercury-pp-cli ar list-invoice-attachments - — 获取发票的分页列表。支持基于游标分页,可设置limit、order、start_after等参数……
mercury-pp-cli ar list-invoices - — 更新现有客户信息
mercury-pp-cli ar update-customer - — 更新现有发票信息
mercury-pp-cli ar update-invoice
books — 管理组织账簿
- — 删除特定的会计科目表(Chart of Accounts)模板。
mercury-pp-cli books delete-agent-coa-template - — 删除Agent所属会计科目表模板中的现有分类账。
mercury-pp-cli books delete-agent-ledger-template - — 批量删除日记账分录
mercury-pp-cli books delete-journal-entries - — 获取特定会计科目表模板的详情。
mercury-pp-cli books get-agent-coa-template - — 获取所有默认和Agent所属会计科目表模板的分页列表。这些模板可用于……
mercury-pp-cli books get-agent-coa-templates - — 列出所有日记账分录
mercury-pp-cli books get-journal-entries - — 获取单个日记账分录
mercury-pp-cli books get-journal-entry - — 创建Agent所属的新会计科目表模板。这些模板可用于创建新的Books实例……
mercury-pp-cli books post-agent-coa-templates - — 在Agent所属会计科目表模板中创建新分类账。
mercury-pp-cli books post-agent-ledger-templates - — 创建多个日记账分录
mercury-pp-cli books post-journal-entries - — 更新Agent所属会计科目表模板中的现有分类账。
mercury-pp-cli books put-agent-ledger-template - — 批量更新日记账分录
mercury-pp-cli books put-journal-entries
cards — 管理卡片
- — 发行新的虚拟卡片。
mercury-pp-cli cards create - — 通过ID获取特定卡片的详情。
mercury-pp-cli cards get - — 获取卡片的分页列表。
mercury-pp-cli cards list - — 更新卡片的昵称或消费限额。
mercury-pp-cli cards update
categories — 管理费用类别
- — 为组织创建新的自定义费用类别。
mercury-pp-cli categories create-category - — 获取组织所有可用自定义费用类别的分页列表。支持基于游标……
mercury-pp-cli categories list
credit — 管理信贷账户
- — 获取组织的所有信贷账户列表。
mercury-pp-cli credit
events — 管理API事件
- — 获取所有事件
mercury-pp-cli events get - — 通过ID获取事件
mercury-pp-cli events get-eventid
organization — 组织信息
- — 获取组织信息,包括EIN、法定业务名称和DBA名称。
mercury-pp-cli organization
recipient — 管理收款方
- — 通过ID获取特定收款方的详情
mercury-pp-cli recipient get - — 编辑特定收款方的信息
mercury-pp-cli recipient update
recipients — 管理收款方
- — 创建新的收款方用于付款
mercury-pp-cli recipients create - — 获取所有收款方的分页列表。使用游标参数(start_after、end_before)进行分页。
mercury-pp-cli recipients get - — 获取组织内所有收款方的税务表单附件分页列表。使用……
mercury-pp-cli recipients list-attachments
request-send-money — 管理付款请求
- — 通过ID获取付款审批请求
mercury-pp-cli request-send-money get-send-money-approval-request - — 获取已认证组织的付款审批请求分页列表。支持按……筛选
mercury-pp-cli request-send-money list-send-money-approval-requests
safes — 管理SAFE(Simple Agreement for Future Equity,未来股权简单协议)请求
- — 通过ID获取特定SAFE请求。
mercury-pp-cli safes get-request - — 获取组织的所有SAFE请求。
mercury-pp-cli safes get-requests
statements — 下载账户对账单
transaction — 管理交易
- — 通过ID获取单个交易。返回完整交易详情,包括附件、支票图像等……
mercury-pp-cli transaction get-by-id - — 更新现有交易的备注和/或类别。使用null值清除现有数据。
mercury-pp-cli transaction update
transactions — 管理交易
- — 获取所有账户的交易分页列表。支持按日期范围等高级筛选……
mercury-pp-cli transactions
transfer — 管理转账
- — 在同一组织的两个账户之间转账。支持存款账户之间的转账……
mercury-pp-cli transfer
treasury — 管理资金账户和交易
- — 获取与已认证组织关联的所有资金账户分页列表。使用游标……
mercury-pp-cli treasury
users — 管理组织团队成员
- — 获取所有用户
mercury-pp-cli users get - — 通过ID获取用户
mercury-pp-cli users get-userid
webhooks — 管理Webhook
- — 注册新的Webhook端点以接收事件通知
mercury-pp-cli webhooks create - — 删除Webhook端点
mercury-pp-cli webhooks delete - — 获取组织所有Webhook端点的分页列表。支持按状态筛选。
mercury-pp-cli webhooks get - — 通过ID获取特定Webhook端点的详情
mercury-pp-cli webhooks get-webhookendpointid - — 更新现有Webhook端点的配置。因连续……而被禁用的Webhook……
mercury-pp-cli webhooks update
Finding the right command
查找合适的命令
When you know what you want to do but not which command does it, ask the CLI directly:
bash
mercury-pp-cli which "<capability in your own words>"which02--help当您知道要执行的操作但不知道对应的命令时,可以直接询问CLI:
bash
mercury-pp-cli which "<用您自己的语言描述功能>"which02--helpAuth Setup
认证设置
Store your access token:
bash
mercury-pp-cli auth set-token YOUR_TOKEN_HEREOr set as an environment variable.
MERCURY_BEARER_AUTHRun to verify setup.
mercury-pp-cli doctor存储您的访问令牌:
bash
mercury-pp-cli auth set-token YOUR_TOKEN_HERE或者将设置为环境变量。
MERCURY_BEARER_AUTH执行验证设置是否正确。
mercury-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:
--selectbashmercury-pp-cli account mock-value --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
-
Explicit retries — useonly when an already-existing create should count as success, and
--idempotentonly when a missing delete target should count as success--ignore-missing
在任何命令后添加参数。等价于:。
--agent--json --compact --no-input --no-color --yes-
可管道传输 — 标准输出为JSON,错误信息输出到标准错误
-
可筛选 —参数保留字段子集。点路径可深入嵌套结构;数组可遍历元素。对于冗长的API,这是缩小上下文范围的关键:
--selectbashmercury-pp-cli account mock-value --agent --select id,name,status -
可预览 —参数显示请求内容但不发送
--dry-run -
离线友好 — 同步/搜索命令在可用时可使用本地SQLite存储
-
非交互式 — 从不提示,所有输入均通过标志参数提供
-
显式重试 — 仅当已存在的创建操作应被视为成功时使用,仅当缺失的删除目标应被视为成功时使用
--idempotent--ignore-missing
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>
}解析获取数据,通过判断数据是实时的还是本地的。仅当标准输出为终端时,才会向标准错误输出人类可读的摘要——管道/Agent消费者仅会在标准输出获取纯JSON。
.results.meta.sourceN results (live)Agent Feedback
Agent反馈
When you (or the agent) notice something off about this CLI, record it:
mercury-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
mercury-pp-cli feedback --stdin < notes.txt
mercury-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.
~/.mercury-pp-cli/feedback.jsonlMERCURY_FEEDBACK_ENDPOINT--sendMERCURY_FEEDBACK_AUTO_SEND=trueWrite what surprised you, not a bug report. Short, specific, one line: that is the part that compounds.
当您(或Agent)发现该CLI存在问题时,可以记录反馈:
mercury-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
mercury-pp-cli feedback --stdin < notes.txt
mercury-pp-cli feedback list --json --limit 10反馈条目存储在本地文件中。除非设置了且传递了参数或设置,否则反馈不会被POST发送。默认行为仅存储在本地。
~/.mercury-pp-cli/feedback.jsonlMERCURY_FEEDBACK_ENDPOINT--sendMERCURY_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.
mercury-pp-cli profile save briefing --json
mercury-pp-cli --profile briefing account mock-value
mercury-pp-cli profile list --json
mercury-pp-cli profile show briefing
mercury-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”模式),可以使用此功能。
mercury-pp-cli profile save briefing --json
mercury-pp-cli --profile briefing account mock-value
mercury-pp-cli profile list --json
mercury-pp-cli profile show briefing
mercury-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--helpoutputmercury-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的输出mercury-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/payments/mercury/cmd/mercury-pp-mcp@latest - Register with Claude Code:
bash
claude mcp add mercury-pp-mcp -- mercury-pp-mcp - Verify:
claude mcp list
- 安装MCP服务器:
bash
go install github.com/mvanhorn/printing-press-library/library/payments/mercury/cmd/mercury-pp-mcp@latest - 在Claude Code中注册:
bash
claude mcp add mercury-pp-mcp -- mercury-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 mercury-pp-cli - Match the user query to the best command from the Unique Capabilities and Command Reference above.
- Execute with the flag:
--agentbashmercury-pp-cli <command> [subcommand] [args] --agent - If ambiguous, drill into subcommand help: .
mercury-pp-cli <command> --help
- 检查是否已安装:如果未找到,提供安装选项(参见本技能顶部的前提条件)。
which mercury-pp-cli - 将用户查询与上方独特功能和命令参考中的最佳命令匹配。
- 添加参数执行:
--agentbashmercury-pp-cli <command> [subcommand] [args] --agent - 如果存在歧义,查看子命令帮助:。
mercury-pp-cli <command> --help