1. 8

hledger is an open-source, cross platform, plain text accounting tool that I find really helpful for keeping track of my finances.

It’s a full double accounting system, so can handle most anything. More about plain text accounting available @ plaintextaccounting.org

What tools do you use/recommend for keeping track of everything?

  1.  

  2. 2

    I use hledger, but I only really find it useful for tracking my cash and credit card day-to-day expenses. I find it awkward for tracking long-term investments like equities in 401k or other investment accounts. I basically have transactions that move cash from my salary to my 401k, and from my checking account to other investment accounts when I buy equities, and otherwise don’t keep track of how that money-as-equities is growing inside those accounts. Which means that the numbers it provides are constantly inaccurate for everything except my bank account and expenses.

    1. 1

      I recommend that you check beancount and its web UI called fava. I prefer beancount over hledger and ledger because of fava.

      1. 1

        What features of fava make it important for you?

        1. 1

          I used beancount briefly and went back to Abandon and later ledger-cli within a short period of time. I don’t fully remember why – it was a few years ago now – but I did end up finding a script and writing a build system task that built a beancount file based on my ledger file and launched fava. Fava is the reason to use the beancount ecosystem but there are other ways to get the data necessary to use it!

        2. 1

          I’m also on Beancount, mostly because of Python.

        3. 1

          Even though I prefer plaintext tools in general, for my accounting use GNUCash. It’s been around for a long time and it’s in relatively widespread use, and best of all, it’s scriptable in Scheme :). For instance, I use a custom eguile template for my freelancing invoices.

          Its manual is also a great resource if you’re new to bookkeeping, it contains a tutorial of the most common bookkeeping issues you’re likely to run into if you use it for personal and even small business accounting.

          I’ve tried the original “ledger” before but I feel really anxious about trusting myself with such a tool to keep all the entries correctly balanced in one single plain text file. What if I make a typo somewhere in the file, like removing one line ending or so, or if my editor crashes while writing a file? As a bit of a database geek, I know the benefits of ACID in databases, so I really prefer to trust this kind of data to a database-backed tool (GNUCash uses sqlite, BTW).

          1. 1

            one single plain text file

            I’ve found a decent way around this that I only have to work around every now and then when I have one single day that has dependent transactions in different accounts. I keep accounts in different files per month, e.g.

            2018
              - 01
                - 201801-bank.ledger
                - 201801-creditcard.ledger
                - 201801-storecard.ledger
                - 201801-transfers.ledger
              - 02
                - 201802-bank.ledger
                - 201802-creditcard.ledger
                - 201802-storecard.ledger
                - 201802-transfers.ledger
              - 03
                - 201803-bank.ledger
                - 201803-creditcard.ledger
                - 201803-storecard.ledger
                - 201803-transfers.ledger
            

            Transfers is where I keep transactions that touch multiple accounts or accounts that aren’t worth having a separate file for: e.g. cash in my wallet and I rarely ever use it, etc.

            Here’s a snippet from my Makefile:

            REPORTS_DIR = reports
            YEAR = 2018
            LEDGER = ledger
            LEDGER_INDEX_FILE = $(REPORTS_DIR)/$(YEAR)_includes.ledger
            LEDGER_FILE = $(REPORTS_DIR)/$(YEAR).ledger
            LEDGER_CMD = $(LEDGER) -f $(LEDGER_FILE) $(X)
            
            $(REPORTS_DIR):
            	mkdir -p reports
            
            $(LEDGER_INDEX_FILE): $(REPORTS_DIR)
            	echo "include ../opening.ledger" > [email protected]
                    # This relies on `fd` to do the right sort order for dates, which it does!
                    # replace with find if you don't have fd, which you should because it's better 
                    # https://github.com/sharkdp/fd
            	fd '.ledger' transactions | xargs -I % echo "include ../%" >> [email protected]
            
            $(LEDGER_FILE): $(LEDGER_INDEX_FILE)
            	$(LEDGER) -f $< --permissive -S d print > [email protected]
            
            bal: $(LEDGER_FILE) ## show all balances
            	$(LEDGER_CMD) balance --cleared
            
            raw: $(LEDGER_FILE) ## run a query with make raw Q="bal" or drops into console mode
            	$(LEDGER_CMD) $(Q)
            

            I’ve learned a lot about make since I originally wrote this. One of the big things I need to do is make all of the ledger files in the transactions directory be inputs to the LEDGER_INDEX_FILE task so that it gets run automatically. Right now, I have to run make clean whenever I’ve made changes to any transaction files :-/

          2. 1

            hledger is great and I used it for a year or two before I moved on to create my own software.

            Simon has since added a feature that I missed a lot: forecasting What I still miss with forecasting is Goal Seek.

            The thing I did like but wasn’t good enough is the web ui, I actually tried to get some code into hledger myself but boy, haskell is quite something different…

            Before hledger I used Gnucash. But without an Undo and a wonky date-input made it a miserable experience for me.