Basics for using the nab CLI (YNAB tool)...
Use this guide to explain the minimal setup (auth token + budget id) and common commands for the nab CLI.
memory/ynab-cron-shared.md when present; it supplies the local binary path and review rules.bunx @jameskraus/nab runs the published package.nab means the chosen executable or launcher. Use that same path for
every command, including help, reads, and mutations.nab --help to list commands and global options.nab <resource> <action> [options].--format table|json|tsv|ids to change output format.nab budget listnab account listnab category listnab payee listnab tx listnab tx get --id <TRANSACTION_ID>nab review transactions --since-date YYYY-MM-DD --limit 5 --format jsonnab budget status --month current --format jsonnab auth token add <PAT>.nab auth oauth --help for OAuth setup.nab tx apply --file changes.json --yes --format json when applying authorized category,
memo, or approval edits together. Use the maintained checkout's dist/nab when available;
tx apply --help confirms command availability.{ "transactions": [{ "id": "<TRANSACTION_UUID>", "category_name": "Groceries", "memo": "Weekly shop", "approved": true }] }. Include only the authorized fields for each row;
different rows may have different edits. Use exact UUIDs, not short refs or filter selections.memo: null or memo: "" clears the memo; otherwise preserve useful existing notes when replacing
it. Memos are limited to 500 characters. approved: false explicitly unapproves.--dry-run. Categorization does not implicitly approve in the
CLI; include approved: true when the user's instructions authorize both.transaction to summarize the saved state; do not immediately fetch those
same IDs again after successful results. Amounts in these objects are raw milliunits.unverified, inspect the per-ID output and history before retrying. The CLI has
already attempted readback and never replays an uncertain write automatically. Only confirmed
rows get automatic inverse patches; unverified rows are recorded separately for inspection.nab budget list --format json and copy the id field.nab budget set-default --id <BUDGET_ID>.--budget-id <BUDGET_ID>.nab budget current.YYYY-MM-DD).--dry-run to preview mutations and --yes to apply them.--since-date, unions unapproved and uncategorized
results, and keeps transfers/splits marked for safe handling.budget status reports overspending and native target shortfalls. Zero assigned is not an issue
unless YNAB also reports a target shortfall.nab category set-assigned --id <CATEGORY_ID> --month YYYY-MM-01 --amount <TOTAL> --dry-run.--expected-current, and
--yes in non-interactive sessions.ready_to_assign_guard_month; nab protects the future-most YNAB month, not
only the month being edited.