Motivation MoneyMotivation Money

命令参考

Motivation Money CLI 所有命令的完整参考。

runs — 薪资发放批次管理

列出批次

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>筛选:draftconfirmedpaying_outcompletedfailedcancelled
--type <type>筛选:payrollad_hocreimbursement
--include-archived包含已归档批次
--page <n>页码

获取批次详情

mp runs get <run-id>

创建批次

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_hocreimbursement

状态转换

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

team — 员工管理

列出员工

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>USDCUSDT
--network <network>ethereumpolygonarbitrumbasetrc20
--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>

treasury — 余额与转账

查看余额

mp treasury balances
mp treasury balances -f json

列出资金转账

mp treasury transfers

audit — 审计日志

列出审计条目

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_createdpayout_completed
--actor <id>按执行者用户 ID 筛选
--start <date>开始日期(ISO 格式)
--end <date>结束日期(ISO 格式)
--page <n>页码

webhooks — Webhook 管理

列出 Webhooks

mp webhooks list

注册 Webhook

mp webhooks create --url https://your-domain.com/webhook \
  --events run.completed,payout.failed
选项必填描述
--url <url>Webhook 端点 URL
--events <events>逗号分隔的事件类型

密钥在创建时返回,用于 HMAC 验证。请妥善保管。

删除 Webhook

mp webhooks delete <webhook-id>

auth — 认证

mp auth login --key mpk_live_<your-key>   # 存储 API 密钥
mp auth status                             # 检查认证状态
mp auth logout                             # 清除凭证

config — 配置

mp config                          # 显示当前配置
mp config --set-url <url>          # 设置 API 基础 URL
mp config --set-format <fmt>       # 设置默认输出格式

On this page