Trying out hledger

Posted on July 15, 2023

As an academic, I need to track research funds: what is the remaining balance of each grant, how much I have committed for student stipends, what are anticipated expenditures for conference travel, etc. Like everyone else, I used to do this via a spreadsheet, but my spreadsheet was becoming a bit too complicated. So, I decided to try plain text accounting, and use hledger to keep tracks of research funds.

hledger may be considered as a Haskell port of ledger, though there are a few subtle differences between the two.

For my purposes, I created a grants.journal file which looks something like this:

That’s it. I also have similar entries for expenses:supplies and expenses:memberships. For the sake of brevity, I’ll not go into the detail for those.

To view the journal file, I use hledger-ui. I have the following in my .zshrc file:

alias hl="hledger-ui --tree --depth=2 --cost --empty --period='2023' --change --forecast -f blog.journal --all not:equity"

This launches hledger-ui to view the file blog.journal (which we created above) for the period of 2023. The other flags change the defaults of hledger-ui to my preference.

Here is a screencast of hledger-ui in action:


This entry was posted in CLI and tagged plain text accounting, hledger.