
Mercury CLI
CLI面向创业公司的企业金融账户 Mercury 官方命令行,可查看账户余额与交易流水、下载对账单,管理收款人、客户、发票与卡片,也能发起付款;支持 JSON / YAML 输出,方便 agent 拉流水对账。需 Mercury 账户并登录或配置 API Token,付款操作请人工确认。
⠀⠀⠀⠀⠀⠀⠀⣀⡤⠶⠒⠛⠛⠉⠛⠛⢶⡶⠤⣄⡀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⣠⠔⠋⠁⠀⣀⡤⢤⡴⠶⠦⡄⠀⠹⡄⠀⠉⠳⣄⠀⠀⠀⠀
⠀⠀⢠⠞⠁⠀⣠⠖⢻⡁⠀⢾⠀⠀⠀⣹⠀⠀⡿⠓⢤⡀⠀⠱⣄⠀⠀
⠀⣰⠋⠀⢠⠞⠁⠀⠈⢧⡀⠈⠓⠲⠶⠧⢄⣰⠃⠀⠀⠙⢆⠀⠈⢧⠀
⢠⣇⡴⠒⠛⠛⠓⠲⡴⠋⠙⢦⣤⣤⣄⡀⠀⠈⢳⠴⠒⠛⠙⢧⠀⠈⣇
⣾⠋⠀⣠⠴⠶⢤⡼⠁⠀⡴⠋⠀⠀⠀⠉⢳⣴⠃⠀⣠⠴⠶⢼⡆⠀⢹
⣿⠀⠀⡇⠀⠀⢀⡇⠀⢸⡇⠀⠀⠀⠀⠀⠀⡇⠀⢰⡇⠀⠀⢈⡇⠀⢸
⢿⠀⠀⣟⠒⠒⠋⠀⢀⡼⠳⣄⠀⠀⠀⢀⡼⠁⠀⡼⠙⠒⠒⠋⠀⢀⣾
⠘⡆⠀⠸⣦⣤⡤⠴⠻⣄⠀⠈⠉⠛⠛⠻⢤⣀⠞⠳⢤⣤⣤⡤⠖⢋⡏
⠀⠹⣄⠀⠘⢦⡀⠀⢀⡞⠙⢒⡶⠶⢤⡀⠀⠹⡄⠀⠀⣠⠎⠀⢀⡞⠀
⠀⠀⠘⢦⡀⠀⠙⠦⣼⡁⠀⢼⠀⠀⠀⣹⠀⠀⣷⡤⠞⠁⠀⡰⠋⠀⠀
⠀⠀⠀⠀⠙⠢⣄⡀⠈⢧⠀⠈⠓⠶⠶⠛⠚⠋⠁⠀⣀⠴⠋⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠉⠓⠶⠷⣦⣤⣀⣠⣤⠤⠴⠒⠋⠁⠀⠀⠀⠀⠀⠀
Mercury CLI – Run your banking* from the terminal
The official command-line interface for Mercury.
Manage your Mercury account from the terminal — cards, transactions, accounts, and more.
Install
curl
curl -sSf https://cli.mercury.com/install.sh | sh
Nix
Run without installing:
nix run github:MercuryTechnologies/mercury-cli -- accounts list
Install into your profile:
nix profile install github:MercuryTechnologies/mercury-cli
Use as a Nixpkgs overlay:
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
mercury-cli.url = "github:MercuryTechnologies/mercury-cli";
};
outputs = { nixpkgs, mercury-cli, ... }: {
nixosConfigurations.example = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
({ pkgs, ... }: {
nixpkgs.overlays = [ mercury-cli.overlays.default ];
environment.systemPackages = [ pkgs.mercury-cli ];
})
];
};
};
}
Requires Nix (or Lix) with flakes enabled.
Install with Go
To test or install the CLI locally, you need Go version 1.22 or later installed.
go install 'github.com/MercuryTechnologies/mercury-cli/cmd/mercury@latest'
Once you have run go install, the binary is placed in your Go bin directory:
- Default location:
$HOME/go/bin(or$GOPATH/binif GOPATH is set) - Check your path: Run
go env GOPATHto see the base directory
If commands aren't found after installation, add the Go bin directory to your PATH:
# Add to your shell profile (.zshrc, .bashrc, etc.)
export PATH="$PATH:$(go env GOPATH)/bin"
Quick start
mercury login
mercury accounts list
mercury payments create \
--account-id acc_xxx \
--recipient-id rcp_xxx \
--amount 5000 \
--payment-method ach \
--idempotency-key $(uuidgen)
What you can do
- View accounts and balances (
mercury accounts) - Send payments and transfer funds between accounts (
mercury payments) - List, search, and update transactions (
mercury transactions) - Manage cards (
mercury cards) - Manage recipients, customers, and invoices (
mercury recipients,mercury customers,mercury invoices) - Download statements and SAFE documents (
mercury statements,mercury safes) - Manage treasury accounts (
mercury treasury) - Create and verify webhook endpoints (
mercury webhooks)
Upgrading
mercury upgrade # latest
mercury upgrade --version 0.3.1 # pin a version
mercury upgrade --force # reinstall current
Set MERCURY_INSTALL_DIR to override the install location.
When a newer release is available, mercury prints a one-line notice on stderr
after the command runs (at most once per day). To disable it:
export MERCURY_NO_UPDATE_CHECK=1
Running Locally
After cloning the git repository for this project, you can use the
scripts/run script to run the tool locally:
./scripts/run args...
Usage
The CLI follows a resource-based command structure:
mercury [resource] <command> [flags...]
mercury accounts get \
--api-key 'My API Key' \
--account-id REPLACE_ME
For details about specific commands, use the --help flag.
Environment variables
| Environment variable | Description |
|---|---|
MERCURY_API_KEY | Bearer token authentication for Mercury API. |
Create and manage API tokens here: https://app.mercury.com/settings/tokens
Your Mercury API token should include the secret-token: prefix. Use it in the
Authorization header:
Authorization: Bearer secret-token:mercury_<TOKEN>
If --api-key or MERCURY_API_KEY is set, the API token takes precedence over
any OAuth session from mercury login. Run mercury status to see
which credential is active.
Global flags
--api-key- Bearer token for Mercury API--help- Show command line usage--debug- Enable debug logging (includes HTTP request/response details)--version,-v- Show the CLI version--base-url- Use a custom API backend URL--format- Change the output format (auto,explore,json,jsonl,pretty,raw,yaml)--format-error- Change the output format for errors (auto,explore,json,jsonl,pretty,raw,yaml)--transform- Transform the data output using GJSON syntax--transform-error- Transform the error output using GJSON syntax
Filling out mercury apply
To start a Mercury application, write out a blank annotated template, fill it in, and submit it via stdin:
mercury apply --template > apply.yaml # write a blank template
# edit apply.yaml with your details
mercury apply < apply.yaml # submit
Explicit flags still override values from the piped file.
Passing files as arguments
To pass files to your API, you can use the @myfile.ext syntax:
mercury <command> --arg @abe.jpg
Files can also be passed inside JSON or YAML blobs:
mercury <command> --arg '{image: "@abe.jpg"}'
# Equivalent:
mercury <command> <<YAML
arg:
image: "@abe.jpg"
YAML
If you need to pass a string literal that begins with an @ sign, you can
escape the @ sign to avoid accidentally passing a file.
mercury <command> --username '\@abe'
Explicit encoding
For JSON endpoints, the CLI tool does filetype sniffing to determine whether the
file contents should be sent as a string literal (for plain text files) or as a
base64-encoded string literal (for binary files). If you need to explicitly send
the file as either plain text or base64-encoded data, you can use
@file://myfile.txt (for string encoding) or @data://myfile.dat (for
base64-encoding). Note that absolute paths will begin with @file:// or
@data://, followed by a third / (for example, @file:///tmp/file.txt).
mercury <command> --arg @data://file.txt
*Mercury is a fintech company, not an FDIC-insured bank. Banking services provided through Choice Financial Group and Column N.A., Members FDIC.
相关资源

Ramp CLI
CLI企业费控平台 Ramp 官方命令行:让 agent 查询交易与公司卡、提交和审批报销、审批账单、上传票据、预订差旅,输出 JSON,安装时会为本机已有的 agent 装好配套技能。需 Ramp 企业账户并用浏览器登录;默认连接沙箱环境,处理真实数据要切换到生产环境,审批操作请人工确认。
ramp-public/ramp-cli53
Airwallex CLI
CLI空中云汇(Airwallex)官方命令行,可让 agent 查询多币种余额、收款人、转账与换汇,管理账单客户、发票、订阅、公司卡与报销。需空中云汇企业账户并授权登录,支持 macOS 与 Linux;目前为闭源发布的测试版,涉及真实资金的操作请人工确认。
airwallex/airwallex-cli8
Invoice Chase
Skill帮小企业主催收逾期账款:从 QuickBooks、Xero 等账套和 PayPal、Stripe 找出逾期发票,按客户以往付款习惯拟写语气合适的催款邮件,发送前必须经你确认。没有连接账套时可上传应收账龄 CSV。Anthropic 官方出品。
anthropics/knowledge-work-plugins35.3k
Actual CLI
CLI本地优先预算软件 Actual Budget 的官方命令行(命令是 actual):连接 Actual 同步服务器后,可查询和修改账户、交易、分类、收款方、规则与月度预算,默认输出 JSON,也能导出 CSV,适合让 agent 批量归类账目、整理报表。需 Node.js 22+,并准备已部署的 Actual 服务器地址、密码和预算 Sync ID。
actualbudget/actual30.1k
Beancount
CLI用文本文件记录复式记账交易的记账语言与工具集:bean-check 校验账本、bean-format 统一格式,配合 Fava、beanquery 出报表与查询;账本是纯文本,便于 agent 生成和版本管理。
beancount/beancount6.2k
Ledger
CLI经典的纯文本复式记账命令行工具:账目写在文本文件里,直接生成余额、明细、预算等报表,没有数据库和隐藏状态,方便 agent 读写账本、对账和出报表。
ledger/ledger6.1k