ledgerforge
ledgerforge
Overview
A bank gives you statements — a folder of OFX, QIF or CSV files, full of lines like
CARD PAYMENT TO TESCO STORES 3456, £23.71. Turning that into an account book you can actually
trust means answering, for every one of those lines, a single question: what is the other
account? ledgerforge automates it, reading bank exports and writing a proper double-entry
GnuCash book — multi-currency, with a coded chart of accounts and
FX prices.
Why and how it was built
The whole point of double-entry bookkeeping is that it’s self-checking: every transaction moves value between two accounts and the amounts always sum to zero, so if the signed total across an entire book isn’t exactly nought, something concrete broke — a missing statement, a duplicated import, a miscoded transfer — and the residual tells you what to hunt for. Matthew built the engine that turns raw exports into that self-checking book in close collaboration with Claude: he supplied the accounting model, the rule that no account data ever enters the repo, and judgement on the thousand small categorisation calls; Claude supplied the parsers, the piecash plumbing, and the patience for the boring bits. The pipeline — parse, categorise, detect transfers, apply overrides, build — is deliberately unglamorous, because boring and auditable is the entire point of a ledger you’re going to trust. More on the design: the blog post.
Key Features
- One small parser per bank export format (OFX, QIF, CSV)
- Rules engine:
categorise(description) → account, first match wins - Transfer detection, so moves between your own accounts never count as income or expense
- Date- or currency-scoped overrides that beat the rules for exceptions
- Multi-currency, with FX prices, writing a coded chart of accounts
- The output is self-checking: Assets − Liabilities = Equity holds, and the signed total across every account is exactly nought when the book is right
- try the toolkit live
Status
The engine is a working Python program (piecash-based), not a hosted service: for real use it
reads your local exports and writes a local GnuCash book you open in the desktop application, and
no account data ever leaves your machine or enters the repo. What is live is a
demo of the review toolkit — the same pages
reimplemented as a client-side web app on entirely fictional data, including an in-browser viewer
of the resulting GnuCash book (balances, P&L, the accounting equation and its double-entry check).
It is a demonstration, not the working tool: the parsers, categoriser and book-writer still run
locally in Python against your own statements.
Links
- GUIDE.md — getting started
- MANUAL.md — feature reference
- DEVELOPMENT.md — architecture and contributing
- GitHub repository
- Blog post: bank statements into a self-checking account book