Ingestion methods
Ledger supports two ingestion paths. They both funnel into the same normalise / dedup / categorise / tag pipeline, so you can mix and match per bank.
| Method | Setup cost | Reliability | Best for |
|---|---|---|---|
| Playwright MCP | Author a skill once per bank | High once written | Banks you ingest from often |
| Manual download | None | Always works | One-off catch-ups, banks without a skill |
1. Playwright MCP
Browser automation via the Playwright MCP server. You log in (so 2FA / random keypads / captcha all work normally), and Claude Code automates everything after that — navigating to the statements page, iterating accounts, intercepting downloads, and saving files into staging/<source>/ with the correct filename prefix.
Setup
claude mcp add playwright -- npx -y @playwright/mcp@latestThen invoke from Claude Code:
/ingest-bank-statementsThis runs the umbrella skill at .claude/skills/ingest-bank-statements.md, which routes to a bank-specific skill if one exists.
Existing bank skills
- ING Australia —
.claude/skills/ing-statements.md. Handles login pause for the randomised keypad, iterates each account in the dropdown, downloads up to 7 years of statements per account.
Adding a new bank
Copy ing-statements.md and adapt:
- Login — Navigate to the bank’s login URL. Fill the username field. Stop and ask the user to handle the password, 2FA, or keypad. Never store or type credentials.
- Navigate — Find selectors for the e-statements / exports page. Many bank sites use Web Components, where
page.evaluate()can’t see the DOM butgetByRole({ name })accessibility selectors still work. - Download loop — Use
browser_run_codewithPromise.all([page.waitForEvent('download'), <click>])to intercept download events. Save withdownload.saveAs(stagingDir + filename)because most banks serve generic filenames likeStatement.pdf. - Filename —
{file_prefix}_{YYYY-MM-DD}_to_{YYYY-MM-DD}.pdf(or.csv). Thefile_prefixmust match an entry inconfig/accounts.yamlso the parser binds to the right account.
Partial flow (no skill yet)
If there is no skill for your bank, you can still get help once you’re logged in:
- Open the bank’s site via Playwright MCP.
- Log in manually and navigate to the e-statements page.
- Ask Claude to take a snapshot, find the statement list, and run a download loop to save them all into
staging/<source>/.
If it goes well, capture what worked into a new skill file under .claude/skills/.
2. Manual download
Always works, no setup. The fallback when nothing else does.
- Log into the bank in a normal browser.
- Download statements (PDF or CSV — whichever the parser supports for that source).
- Drop files into the matching
staging/folder:
| Source | Folder | Format |
|---|---|---|
| ING | staging/ing/ | *.pdf |
| ING (CSV export) | staging/ing-csv/ | *.csv |
| PayPal | staging/paypal/ | *.csv |
| Bankwest | staging/bankwest/ | *.pdf |
| Bankwest (CSV) | staging/bankwest-csv/ | *.csv |
| Bankwest home loan | staging/bankwest-loan/ | *.pdf |
| Bankwest offset | staging/bankwest-offset/ | *.pdf |
| CBA transaction account | staging/cba/ | *.pdf |
| CBA credit card | staging/cba-cc/ | *.pdf |
| HSBC | staging/hsbc/ | *.pdf |
| HSBC (CSV export) | staging/hsbc-csv/ | *.csv |
| Coles Mastercard | staging/coles/ | *.pdf |
| Coles Mastercard (CSV) | staging/coles-csv/ | *.csv |
| Amex | staging/amex/ | *.csv |
| Airbnb | staging/airbnb/ | *.csv |
| CommSec contract notes | staging/commsec/ | *.pdf |
Some sources are told apart by directory rather than filename: CBA names every
download Statement<date>.pdf, and the Bankwest home loan and offset share a
layout but are different accounts.
-
Prefix filenames with the
file_prefixfromconfig/accounts.yamlso the parser binds to the right account. Example:business_2025-07-01_to_2025-09-30.pdf. -
Run:
ledger ingest# or scope to one sourceledger ingest --source ing# or preview onlyledger ingest --dry-runProcessed files are moved to data/archive/ so re-running is safe. A statement
whose rows do not account for its own printed balances is refused outright rather
than partially ingested — that is almost always a parser bug, so fix the parser
rather than reaching for --force.
A bank’s PDF and CSV exports describe the same transaction with different text, and often a different date basis, so the two cannot dedup against each other. Ingest one format per period and clip at the boundary:
ledger ingest --source bankwest # statements through 04 Augledger ingest --source bankwest-csv --from 2026-08-05 # CSV covers only the tailA windowed import is left in staging/ rather than archived, since the file still
holds transactions outside the window.
After ingestion
Both methods feed the same pipeline:
- Dedup — SHA-256 transaction hash.
- Source-of-truth — credit-card payments from your bank are auto-marked as transfers (see Source of Truth).
- Categorise — source rules, then the merchant’s own label, then the nearest labelled merchants (see Categories).
- Tag — multi-tag rules.
Then:
ledger split --backfill --fy 2025 # business splits for taxledger shared --backfill # household costs split with a partnerledger dedup # cross-account duplicate resolutionledger reconcile # prove the ledger against printed balancespython -m api # dashboard