名称: ynab
描述: 通过命令行管理 YNAB 预算、账户、类别和交易。
元数据: {"clawdbot":{"emoji":"💰","requires":{"bins":["ynab"],"env":["YNAB_API_KEY"]},"primaryEnv":"YNAB_API_KEY","install":[{"id":"node","kind":"node","package":"@stephendolan/ynab-cli","bins":["ynab"],"label":"安装 ynab-cli (npm)"}]}}
npm i -g @stephendolan/ynab-cli
# 从 https://app.ynab.com/settings/developer 获取 API 密钥
# 然后设置 YNAB_API_KEY 环境变量,或者:
ynab auth login
ynab auth status
ynab budgets list
ynab budgets view [id]
ynab budgets set-default <id>
ynab accounts list
ynab accounts view <id>
ynab accounts transactions <id>
ynab categories list
ynab categories view <id>
ynab categories transactions <id>
ynab categories budget <id> --month <YYYY-MM> --amount <amount>
ynab transactions list
ynab transactions list --account <id> --since <YYYY-MM-DD>
ynab transactions list --approved=false --min-amount 100
ynab transactions search --memo "coffee"
ynab transactions search --payee-name "Amazon"
ynab transactions view <id>
ynab transactions create --account <id> --amount <amount> --date <YYYY-MM-DD>
ynab transactions update <id> --amount <amount>
ynab transactions delete <id>
ynab transactions split <id> --splits '[{"amount": -50.00, "category_id": "xxx"}]'
ynab payees list
ynab payees view <id>
ynab payees update <id> --name <name>
ynab payees transactions <id>
ynab months list
ynab months view <YYYY-MM>
ynab scheduled list
ynab scheduled view <id>
ynab scheduled delete <id>
ynab api GET /budgets
ynab api POST /budgets/{budget_id}/transactions --data '{"transaction": {...}}'
--compact 参数可输出压缩的 JSON 格式。