July 4, 2025

Plain Text Accounting

Discovering Plain Text Accounting

I’ve always found finance management and budgeting difficult. I don’t enjoy spreadsheets, I’ve never used Excel properly, and most budget tools felt either too simplistic or too complicated.

When I started building my house, this weakness became a real problem. I had to keep track of large expenses, plan ahead, and make sure I didn’t overspend. So I started looking for a tool that could help me do that.

I had a few requirements in mind:

  • I wanted something that used plain text, so I could version control it and keep everything in Git.
  • A command-line interface was ideal, but I was open to tools that had a web or TUI (terminal UI) as well.
  • It had to work offline.

I deliberately avoided spreadsheets. Not just because I don’t know how to use them well, but because when I looked at how others used Google Sheets for budgeting, it felt messy and unstructured. I wanted something with a clear model — a system I could learn and understand.


ledger-cli

That’s when I discovered ledger-cli, a plain text double-entry accounting system that works entirely from the command line.

I had never used double-entry bookkeeping before, but I found it surprisingly logical once I saw a few examples. Ledger has a section in the docs called Principles of Accounting with Ledger that helped me understand the basics.

Here’s what a simple transaction looks like:

2025/01/02 Grocery Store
  Expenses:Food:Groceries     $65.00
  Assets:Checking            $-65.00

This means: I spent $65 on groceries, and that money came out of my checking account. Two sides of the same transaction — that’s the core idea of double-entry bookkeeping.

To see your balances:

ledger -f journal.txt balance

To see all transactions in order with a running total:

ledger -f journal.txt register

It felt good to write down my transactions in a structured way and be able to query them. But I still had to read through the docs carefully and learn the syntax, which was sometimes terse.


hledger

Later I found hledger, which is a port of ledger written in Haskell. It follows the same journal file format and ideas, but I found it more beginner-friendly.

It has detailed documentation with quick start guides for 2, 5, and 10 minutes. Those helped me get going quickly. What I especially liked was that hledger includes both a TUI and a web interface, which made it easier to visualize the data — especially useful when I wanted to share or explain my finances to someone else.

The TUI (hledger-ui) lets me browse through transactions with the keyboard, and the web interface (hledger-web) displays reports with charts and filters.


Plain Text Accounting

Going further, I found that there’s an entire ecosystem around what’s called Plain Text Accounting (PTA). The website plaintextaccounting.org, maintained by Simon Michael (also the creator of hledger), is a great hub for all the tools, resources, and philosophy behind it.

It lists other ledger-like tools and has links to documentation, guides, blog posts, and even talks.

Along the way, I also found the YNAB’s guides useful — even though I don’t use their software. Some of their key principles gave me a new way to think about budgeting:

  • Give every dollar a job
  • Embrace your true expenses
  • Your budget is a plan, not a restriction
  • Focus on what’s important to you

Conclusion

Plain text accounting helped me go from “I have no idea where my money is going” to “I have a system.” I track transactions in a text file, version it with Git, and run reports whenever I need to. It’s not always perfect, but it gives me clarity.

If you’re looking for something flexible, offline-first, and easy to integrate into your workflow — and if you’re comfortable in the terminal — I recommend starting with hledger. The learning curve is there, but once you get the core ideas, it starts to make a lot of sense.


Powered by Hugo & Kiss.