Plain Text Accounting is Pretty Cool
66 points by abnercoimbre
66 points by abnercoimbre
I get so much joy from reading posts like this, where people find PTA for the first time. It totally revolutionized how I deal with money when I discovered it ~5 years ago and I'm glad it's still doing the same to people even today.
hledger is genuinely my favorite tool, and it's the only accounting software that stuck with me
hledger lover here. I use it for fairly basic bookkeeping, so i havent used the fancier features. Love the reporting tools. I made a very simple syntax file for vim too, so i catch things like not having two spaces between an account and an amount.
Same with Beancount for me! It's evolved so far beyond where I started but I still get as much enjoyment playing with it now as I did when I started which is rare!
Even scripting it is a joy.
The biggest pain was fighting with ghc and cabal...
that is what nix is for ;)
This was in nix.
I'd love for someone to hand me the magic haskell build stack some day. They need/deserve a cargo.
Always found it ironic that Build System a La Carte had Haskell signatures for all the build functions.
Doubly-entry accounting feels like such a cheat-code once you understand how it works.
I recently switched from ledger to beancount, and I'm quite happy with the beangulp scripts I wrote to automate importing my bank statements. Also fava is very nice (and is the whole reason I made the switch). Totally crushes the visualizations any of my individual banks have and it's a global view across all my finances! I haven't tried tracking my investments with it yet, but I'm quite happy with how my checking/cc/mortgage statements are looking now.
It's kinda hard to find examples online so I might write up a post documenting my whole pipeline since it's a bit tricky to get started.
Also, LLMs are quite good at writing these types of scripts, but I really don't like the idea of them slurping up my financial info to feed The Machine, so I've not let them touch any of my files directly (I just poke at Claude with beancount questions in the web interface). Fortunately, they can give skeleton scripts that are easy enough to fill in, but it feels a bit backwards to be the one doing all the annoying mapping grunt work in this age of AI :P
There is a website dedicated to plain text accounting.
I am using Beancount to do my work budget. The commodities are a very powerful tool: I can buy X items priced at Y US$. I can maintain an inventory and also show how some piece of hardware moves from one project to other. On top of that, you can write plugins in Python. I use them to setup installments (when buying through a lease), to keep metadata between an order and a payment or to help writing forecasts.
I've been using Actual Budget for a while now and I'm generally quite happy with it, but 1. this seems quite cool and 2. it supports some features I've wished Actual has had in the past, mainly multiple currencies.
I think I might give this a try if I have some free time this weekend.
I'm also an Actual user. I'm in the same boat and I'd like to try hledger. Sumner, you should give a talk about this!
I've been using Actual Budget for a while now and I'm generally quite happy with it
Same feelings here, but I'm a little nervous about their contribution policy. I'm keeping an eye on alternative accounting strategies in case things go south.
I think I might give this a try if I have some free time this weekend.
If you do, please write up a quick blog post about it!
Do you really enter every transaction manually into hledger? So if you spend a day out and have a coffee, buy a book and dinner you keep the receipts and sit down in the evening to enter it?
Is it discouraged to use your bank's/credit card's API or something to ingest the transactions?
On Saturday afternoon, you pull the last ~8 days of activity from your bank as a csv. Then you use a script or macro to swizzle it into hledger format, then you correct it. Not that huge a burden, until you miss ~12 weeks and decide to just start from a new baseline lol
So this whole thing relies on having a bank that populates your statements with more detail than "Payment for Goods/Services" or "Purchase via eChannels" or <Debit card branded name>".... I don't think it's going to work for me then.
Up until this year, I used to handle my expenses tracking like that. I never heard of double-entry accounting, or used a proper expense tracking up, but my method was to log every week into a huge excel spreadsheet with columns of "Inflow", "Expense" (both split by some categories and maybe commented), "Owed", "Expected remaining", "Actual remaining", which now seems almost similar to what proper DEA should be :D
But, contrary to what the PTA FAQ page states, seeing "expected" vs "actual" different by more that one digit every week was very stressful. Instead of following on my new years resolution to do this more carefully, I stopped. No regrets so far... yet, the PTA approach sounds very attractive in its integration capabilities. I would love to give it a try and see how to remove that friction and just make money count itself.
I log in to every one of my accounts at least once a day to check on the transactions and I enter them at that time. If I wanted to, I could also just backfill via CSV export + hledger's CSV functionality, but I have found it's easier to just enter the few transactions by hand since it's never that many, and the CSV export + import takes almost as long.
I could probably script something to use an API, and maybe I'll do that in the future, but for now I'm sticking with the manual entry. It also forces me to be aware of all of the spending, which is one way I control my spending.
I automated it by having my bank send me an SMS for every transaction. It triggers a Tasker rule on my phone that sends an HTTP request with the details to my web service handling the rest. I still need to categorize and label most of them by hand but having a dozen of uncategorized transactions with vague descriptions and correct amounts is still much better than starting with nothing.
I'd be fine with hledger personally, but I manage my finances with someone less interested in learning to interact directly with plain text and would rather use a phone with a GUI. I'm considering hledger Android and Syncthing but I'm not sure how well those will hold up in practice.
One of the surprising things about llms is they seem to do best with very simple tools. So in a way it feels like we’re going backwards in the technical tree. Microsoft Word? No markdown is just as good. Powerpoint? Actually llms do much better at static HTML.
It makes sense then that plain text accounting would do better than something like Quicken. Sure eventually you might get some kind of mcp for quicken, but the added flexibility text gives the llm is so much better than what any mcp might be able to provide.
I think that the LLM revolution has vindicated the UNIX philosophy. In particular, that "programs should expect their output to be the input to another, as yet unknown, program" and that "programs should be written to handle text streams, because that is a universal interface".
I think that MCP is basically just a way of wrapping programs with a nondeterministic text-based interface instead of doing the work to actually turn the application into a CLI. I wrote something in this vein on my blog: https://sumnerevans.com/posts/software-engineering/forget-mcp-write-cli-apps/
I use gnucash, but also run a script that exports it to a ledger file, and commits that along with the gnucash db to git. That way I can easily see what changes I did in git log. So PTA can be useful even if you don't really use any PTA tools :-)
Any tips on how to best integrate my double-entry based system (like hledger, Beancount) with shared expense tracking (like spliit.app, Splitwise)? I guess it would be possible to convert transactions entered to the expense tracker into the plaintext format. But for expenses I paid, there already will be a transaction, so they have to be merged somehow. Do I use an intermediary account here? And I also got confused because one ends up tracking assets and liabilities of others. Any solutions out there?
I do all my accounting with hledger too. 3 years and counting now!
I have a cron job which periodically uses the hledger-output-to-beancount builtin command to write a beancount journal (plus some tweaking to make it right), and a fava server using that file. And a caddy server maps ledger.localhost to that fava server. All this using nix-darwin/NixOS, which makes it quite straightforward.
Long story short, if I visit ledger.localhost on my machine I see fava up to date with my hledger finances.
I’ve been meaning to write a short blog post about this set up. Maybe soon enough…
I also have written a few custom scripts using hledger-lib in Haskell :)