Minitally CLI 适合能执行 shell 命令的 Agent。小龙虾可以通过 CLI 创建记账记录、搜索消费记忆、读取分类和标签,也可以获取汇总数据。
当前内测命令以源码运行:
pnpm --filter @minitally/cli dev --help后续如果使用已发布的二进制,命令可以替换为:
minitally --help配置 API Key
Agent 工作流优先使用环境变量:
export MINITALLY_API_KEY="mnt_xxx"
export MINITALLY_API_BASE="https://mn.hekmon.com"也可以保存本机配置:
pnpm --filter @minitally/cli dev login --api-key "mnt_xxx"如果是在共享机器或自动化环境里运行,环境变量更容易轮换,也不容易误用旧配置。
创建一笔支出
小龙虾可以在用户确认后执行一条命令:
pnpm --filter @minitally/cli dev expense add "Lunch 38 with team" \
--merchant "Noodle House" \
--request-id "xiaolongxia-lunch-20260507-001"如果这笔支出不应计入预算进度:
pnpm --filter @minitally/cli dev expense add --amount 120 \
--note "Reimbursable client taxi" \
--merchant "Taxi" \
--exclude-from-budget \
--request-id "xiaolongxia-reimburse-20260507-001"CLI 创建的记录会带上 cli 来源,以及 agent、cli 系统标签。
搜索和汇总
创建前可以先搜索,减少重复记录:
pnpm --filter @minitally/cli dev expense search "Lunch" --limit 10读取辅助信息:
pnpm --filter @minitally/cli dev categories list --type expense
pnpm --filter @minitally/cli dev tags list
pnpm --filter @minitally/cli dev summary推荐给小龙虾的规则
可以把这段加入小龙虾的指令:
Before calling Minitally CLI, extract amount, type, counterparty, time, note, and whether it should be excluded from budget. If amount is uncertain, ask the user. Always set a request-id that includes the agent name and a timestamp.这样 CLI 入口足够快,同时不会让 Agent 在关键金额字段上乱猜。

