The new era of AI assisted shopping has allowed the common man to empty his ‘electronics’ budget at an alarming rate, which calls for new and improved methods of budgeting to keep him off skid row!
To this end, may I introduce ‘Hledger’, which has been around since at least 2016 and is written in Haskell.
What’s hledger ?
One of the best tools for doing Plain Text Accounting. It’s free and you can read all about it at the https://hledger.org home page.
Recently I blew my electronics budget in a big way on equipment to support a local AI habit. At first I was horrified at the massive size and complexity of the available FLOSS home accounting packages and couldn’t find anything simple enough for my needs, then I stumbled onto Hledger …
What makes Hledger different to all the other ‘budgeting software’ out there ?
Hledger comes in three versions, but I’ll only be discussing the CLI version here. Hledger is like a compiler for budgeting, no massive application with hundreds of libraries (Like Gnucash), no database with binary files and only a small executable. All you need is a simple dual entry type text file and Hledger, and you’re done!
How does Hledger work ?
Basically you have one or more journal files - usually ~/.hledger.journal, or anything else.
The journal file is all you need, It’s just a text file that Hledger compiles to obtain the answers you want, such as Income Statement, Balance, etc.
The Journal File
2023-01-01 opening balances ; <- First transaction sets starting balances.
assets:bank:checking $1000 ; <- Account names can be anything.
assets:bank:savings $2000 ; <- Colons indicate subaccounts.
assets:cash $100 ; <- 2+ spaces are required before the amount.
liabilities:credit card $-50 ; <- A debt; these are negative.
equity:opening/closing $-3050 ; <- Starting balances come from equity.
; Equity is also usually negative.
; (Reports can show as positive when needed.)
2023-02-01 GOODWORKS CORP ; <- Date order is recommended but optional.
assets:bank:checking $1000
income:salary ; <- $-1000 is inferred here to balance the txn.
; Income amounts are negative.
2023-02-15 market
expenses:food $50
assets:cash ; <- $-50 is inferred here.
Example Output
$ hledger is -MTA
Income Statement 2023-01-01..2023-02-28
|| Jan Feb Total Average
===============++==============================
Revenues ||
---------------++------------------------------
income:salary || 0 $1000 $1000 $500
---------------++------------------------------
|| 0 $1000 $1000 $500
===============++==============================
Expenses ||
---------------++------------------------------
expenses:food || 0 $50 $50 $25
---------------++------------------------------
|| 0 $50 $50 $25
===============++==============================
Net: || 0 $950 $950 $475
With Hledger I’ve completed my 2025 budget until November, and all is good, I can even start using Starlink again in a month or so ![]()
All you need is Hledger and Home - hledger to get started. Hledger is a great accounting educator I find, and has filled in a lot of gaps in my knowledge of accounting.
Happy Budgeting!
Terry