命令参考
Motivation Money CLI 所有命令的完整参考。
mp runs list
mp runs list --status confirmed
mp runs list --type ad_hoc --include-archived
mp runs list --page 2 -f json
| 选项 | 描述 |
|---|
--status <status> | 筛选:draft、confirmed、paying_out、completed、failed、cancelled |
--type <type> | 筛选:payroll、ad_hoc、reimbursement |
--include-archived | 包含已归档批次 |
--page <n> | 页码 |
mp runs create --period-start 2026-04-01 --period-end 2026-04-30
mp runs create --period-start 2026-04-01 --period-end 2026-04-30 \
--pay-date 2026-05-05 --label "April 2026 Payroll" --type payroll
| 选项 | 必填 | 描述 |
|---|
--period-start <date> | 是 | 期间开始日期(ISO 格式) |
--period-end <date> | 是 | 期间结束日期(ISO 格式) |
--pay-date <date> | 否 | 目标付款日期 |
--label <label> | 否 | 人类可读的标签 |
--type <type> | 否 | payroll(默认)、ad_hoc、reimbursement |
mp runs confirm <run-id> # 草稿 → 已确认
mp runs execute <run-id> # 已确认 → 付款中
mp runs execute <run-id> --wait # 执行并轮询至完成
mp runs cancel <run-id> # 取消所有可取消的付款
mp runs archive <run-id> # 归档终态批次
execute 的 --wait 标志会轮询 CEX 的付款状态直至所有付款到达终态。适用于需要阻塞等待完成的脚本和智能体。
mp runs sync <run-id> # 向 CEX 轮询最新付款状态
mp runs balance-check <run-id> # 验证 CEX 是否有充足资金
mp runs retry-failed <run-id> # 重试批次中所有失败的付款
mp runs payouts <run-id>
mp runs payouts <run-id> -f csv
mp team list
mp team list -f json
mp team get <employee-id>
mp team add --name "Alice Johnson" --email alice@company.com
mp team add --name "Bob Smith" --email bob@company.com \
--salary 600000 --wallet 0x1234... --stablecoin USDC --network polygon
| 选项 | 必填 | 描述 |
|---|
--name <name> | 是 | 全名 |
--email <email> | 是 | 邮箱地址 |
--salary <cents> | 否 | 月薪(美分) |
--wallet <address> | 否 | 钱包地址 |
--stablecoin <coin> | 否 | USDC 或 USDT |
--network <network> | 否 | ethereum、polygon、arbitrum、base、trc20 |
--no-invite | 否 | 跳过发送邮件邀请 |
mp team update <employee-id> --salary 750000
mp team update <employee-id> --wallet 0x5678... --network ethereum
mp team update <employee-id> --status inactive
所有字段均为可选——仅包含需要更改的内容。
mp team deactivate <employee-id>
mp treasury balances
mp treasury balances -f json
mp audit list
mp audit list --action run_created
mp audit list --actor user_123 --start 2026-03-01 --end 2026-03-31
mp audit list --page 2 -f json
| 选项 | 描述 |
|---|
--action <action> | 按操作类型筛选(如 run_created、payout_completed) |
--actor <id> | 按执行者用户 ID 筛选 |
--start <date> | 开始日期(ISO 格式) |
--end <date> | 结束日期(ISO 格式) |
--page <n> | 页码 |
mp webhooks create --url https://your-domain.com/webhook \
--events run.completed,payout.failed
| 选项 | 必填 | 描述 |
|---|
--url <url> | 是 | Webhook 端点 URL |
--events <events> | 是 | 逗号分隔的事件类型 |
密钥在创建时返回,用于 HMAC 验证。请妥善保管。
mp webhooks delete <webhook-id>
mp auth login --key mpk_live_<your-key> # 存储 API 密钥
mp auth status # 检查认证状态
mp auth logout # 清除凭证
mp config # 显示当前配置
mp config --set-url <url> # 设置 API 基础 URL
mp config --set-format <fmt> # 设置默认输出格式