allen hansrisuk

Plain-text Accounting with hledger

2026-02-11 Wed

If there’s one thing I love, it’s a system. I live and die by my to-do list. I have a system for my calendar, my journal, tracking my habits, meal planning, workouts, budgeting and so on. The beauty of these systems, although seemingly rigid, is that I can adapt and change them to my needs overtime. For budgeting, I’m currently using YNAB (You Need a Budget) but when I caught wind of hledger, a CLI accounting software, I wanted to give it a try.

hledger is a plain-text accounting and CLI tool which enforces double-entry accounting - each transaction always touches two accounts and the net difference will always be zero. In other words, every credit will have an associated and equal debit and vice-versa. YNAB, on the other hand, encourages envelope budgeting and is a single-entry system.

hledger uses \*.journal files to hold transactions. A transaction is a text entry that may look like this:

2023-03-20 Grocery store
    expenses:food:groceries $100
    assets:cash $-40
    assets:checking $-60

Which means I spent $100 at the grocery store, paid $40 in cash and $60 with debit card. The net difference is $0 as seen in double-entry accounting.

This post isn’t meant to be a full setup overview but I want to cover my initial thoughts as I get more and more familiar with the tool:

I still have my YNAB subscription for a few more months so I have time to decide whether I want to ditch it in favor of hledger. So far, I’m having fun setting this up and curious to see what benefits or valuable insights it can provide me over YNAB.