Looks like there are several tools available for the command line that provide plain text accounting. I am starting out with hledger to see how I like it. Unfortunately, I really know very little about accounting practices. So, this will really be a learning experience.
So, to help with my accounting learning, my plan is to simultaneously set up the GUI application GnuCash and work with it in parallel.
Listed below are the three CLI tools, hledger, ledger, and beancount. This is such a huge topic with so much to learn, I’ve decided to start with hledger as it seems at first glance to be the robustest of the three.
NOTE: See the parent document: Using the Terminal as a Daily Driver for more about terminal productivity applications.
For these tools, you have to start at Plaintext Accounting. It is a major reference for all things regarding this topic. This is another area where I’m going to have to read the docs and do a deep dive in order to make this usable.
Why?
Why do this as opposed to using other software?
The plaintext accounting lends itself to automation. Once I get the basics under my belt, that should be fun to explore.
It’s plain text. So, I own the data. If I’m using an online package, how do I know they aren’t scanning my data to build a profile of me? Are they selling my data? What if they get hacked? Do I really want to run the risk of my financial information getting out into the wild where it could be exploited?
So, there are other local, open source software like GnuCash and kMyMoney. Those would be useful to look into as well.
Questions:
Since these are all plain text accounting tools, is the format the same between them? In other words, can I use the three tools interchangeably on the data files? :I think the answer is maybe. At first glance, there may be different front matter that is required by the different applications, but the actual transaction data may be the same. Have to delve deeper.
Common categories of accounts
- assets: bank accounts, what’s in your wallet, investment accounts, loans credited
- income: paychecks, gifts received, dividend, interest earned
- expenses: groceries, taxes, gifts given, donations
- liabilities: mortgage, credit cards, student loans, loans owed
- equity: everything else, opening balances, things not money, cashback
Because data is stored as plain text files, this lends itself to automation and version control.
Hledger
Hledger is a plaintext accounting tool written in Haskell.
Start out by looking at the documentation which is extensive. There are manuals, examples, tutorials, and videos that help getting started. In fact, the homepage is set up like an online book with tons of information. Very nice.
Example Hledger Transaction
I bought coffee for $5.75 and paid cash for it.
2025-08-10 Wake Up Coffee Shoppe
expenses:restaurants:coffee 5.75 USD
assets:cash:wallet -5.75 USD
Date as “YYYY-MM-DD” followed by Comment string.
Ledger
Beancount
Beancount is a plaintext accounting tool written in python.
Installation since I’m a uv user.
uv tool install beancount