More notes

💵 Plain Text Accounting

Last updated 9 February 2021 (2 months ago)🏷️ #technology🏷️ #finance🏷️ #fun

Over the past couple of years I have been intrigued (and sort of excited) about the ideas behind plain text accounting. To be excited about accounting is probably unusual but I love its simplicity and logic - and the power it gives you.

Plain text accounting is essentially the practice of keeping track of your finances, but in simple plain-text files. This is in contrast to other accounting/bookkeeping systems - such as Xero, Sage, Quickbooks, GnuCash, etc. - which can have proprietary/closed-source/software-specific formats. Plain text accounting provides a number of additional benefits:

  • Anyone can do it.
  • It logically descibes double-entry transactions and credits/debits.
  • It's free (in multiple senses).
  • I't small and easily stored, edited, backed-up, and editable from any type of device.
  • It's flexible and can be used to model both simple complex financial records (including investments, stocks, currencies, etc.).
  • It is easily parsed and manipulated using common tools (see below). It can also be easily read by a human.

I have written a blog post that goes into more depth here. However I won't go into much more detail in this note since the documentation of various software tools can do it far better than I (see below).

I recommend reading Ledger's documentation as a starting point, as this helps introduce the concept better than I and has some examples of typical syntax.

How I use it

I currently use the Ledger software (see below) to report on a single ledger file (named ledger.dat - I only need one file) that I edit using Vim and which auto-syncs to my personal Nextcloud.


There is an established ecosystem of open-source software tools for both inputting/manipulating and reporting on plain text account files. In many cases the recommendation is that the accounts themselves are modified by hand, with the tools being used as read-only reporting - but of course it is entirely up to you. That's the point.

Command-line software in this space powers what is known as "command-line accounting".

Below is a collection of software tools for working with plain text account files:

  • Ledger ("fat-free accounting") - the "original" tool that inspired many others. This is what I use. Super-fast (even with long ledgers over many years), easy to use and get the hang of. Used for querying/reporting.
  • hledger - inspired by Ledger, written in Haskell. Slightly different focus. Can be used to report and add entries.
  • beancount - lots of features, reporting, web interfaces.

Given the files are just plain text, common tools in the Unix ecosystem (e.g. grep, awk, sed, etc.) can also be used on their own (or as part of more complex pipelines) to read/edit your files.


There are a number of other resources you might find useful:

🪴 I am keen to continue to grow this note over time. If you have suggestions for additional links/resources then please let me know.