nab-cli-basics
Basics for using the nab CLI (YNAB tool). Use when asked how to run nab commands, set up authentication tokens/PATs, configure or override the default budget id, or troubleshoot missing NAB_TOKENS/NAB_BUDGET_ID.
安装与使用
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
查看来源 ↗使用指南技能说明
Nab CLI Basics
Overview
Use this guide to explain the minimal setup (auth token + budget id) and common commands for the nab CLI.
Quick start
- Requires Bun (https://bun.sh).
- Run
bunx @jameskraus/nab --helpto list commands and global options. - Follow the pattern
bunx @jameskraus/nab <resource> <action> [options]. - Use
--format table|json|tsv|idsto change output format. - Run common read commands:
-
bunx @jameskraus/nab budget list -
bunx @jameskraus/nab account list -
bunx @jameskraus/nab category list -
bunx @jameskraus/nab payee list -
bunx @jameskraus/nab tx list -
bunx @jameskraus/nab tx get --id <TRANSACTION_ID>
-
Set auth token (required)
- Use YNAB Personal Access Tokens only (no OAuth).
- Get a PAT from https://app.ynab.com/settings/developer.
- Store tokens with
bunx @jameskraus/nab auth token add <PAT>.
Set budget id (required for most commands)
- Run
bunx @jameskraus/nab budget list --format jsonand copy theidfield. - Store a default budget id with
bunx @jameskraus/nab budget set-default --id <BUDGET_ID>. - Override per command with
--budget-id <BUDGET_ID>. - Show the effective budget id with
bunx @jameskraus/nab budget current.
Notes
- Use date-only strings (
YYYY-MM-DD). - Use
--dry-runto preview mutations and--yesto apply them.
使用示例
查看来源仓库中的使用示例与配置说明。
查看来源 ↗来源历史
- 收录时间
- 2026-01-20
- 索引更新时间
- 2026-01-26
- Branch
- main
收录与同步日期属于本站记录。源码修改历史请查看来源仓库。
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!