| name | sparebank1-accounts |
| description | Read accounts, balances, and transactions with the `sb1` CLI (SpareBank 1). List accounts and totals, look up balances, browse and filter transactions by date/account, inspect a single transaction, and export to CSV. Use when a user wants to see their Norwegian bank balances, spending, recent transactions, or wants account/transaction data for analysis. |
| compatibility | Requires the `sb1` binary, installed and authenticated (see sparebank1-shared). |
sparebank1-accounts
Read-only workflows for SpareBank 1 accounts and transactions via sb1. Read
sparebank1-shared first for auth and flags.
Accounts
sb1 accounts
sb1 accounts --all
sb1 --json accounts
Individual account (by name, key, or number):
sb1 account Brukskonto
sb1 account Brukskonto --details
sb1 account Brukskonto --roles
sb1 balance 1234.56.78903
Transactions
sb1 transactions -a Brukskonto --days 30
sb1 transactions -a Brukskonto -a Sparekonto --from 2026-01-01 --to 2026-03-31
Omitting -a/--account queries all accounts. Dates are YYYY-MM-DD.
Single transaction details (id comes from a transactions listing):
sb1 transaction <id>
sb1 transaction <id> --classified
CSV export (server-rendered)
sb1 export -a Brukskonto --from 2026-05-01 --to 2026-06-16 -o booked.csv
export returns the bank's native semicolon-delimited CSV (Norwegian headers:
Dato, Beskrivelse, Inn, Ut, …) for booked transactions. For programmatic
analysis prefer transactions --json or transactions --csv instead.
Financial overview (preferred for "how are my finances")
sb1 summary --months 6
sb1 --json summary --months 6
summary is generalizable across any account setup: net worth per currency,
income vs spending (internal transfers between the user's own accounts are
excluded), monthly breakdown, spending by bank-assigned category, top
counterparties, and bank-flagged subscriptions. Prefer this over hand-rolled
analysis.
Manual analysis pattern
For bespoke questions ("how much on X last month"):
sb1 --json transactions -a <account> --from <start> --to <end> --classified
(add --source ALL for older rows). --classified adds category,
recurring, and subscription per transaction.
- Parse
transactions[]: amount (negative = outgoing), date (ISO),
description, counterpartyName, category.
- Sum/group in your own logic. Never guess figures the API did not return.