Plain text accounting

I manage my finances using plain text files and the ledger-cli program. This solution has proven to be simple yet powerful. It offers an interface I’m familiar with since I just have to open a text file inside Neovim and edit the entries.

Snippets

A list of some of the commands I usually run to generate reports with ledger-cli or heldger. If I have a particular question about my finances, there’s probably a command I can use to generate the report I need.

How much have I spent this month?

ledger bal --period "this month" ^Expenses:

I can also specify other time periods, but I usually stick to a specific month.

How much have I spent each month of this quarter?

hledger balance --period "this quarter" --monthly ^Expenses: | less

Sometimes the reports can be large. In this case I just pipe the output to less.

What is the history of transactions in a particular account?

ledger reg --period "this month" Assets:Bank

To display transactions in reverse order I can use --sort "-date"

ledger reg --period "this month" --sort "-date" Assets:Bank

What are my incomes in USD?

Income account are normally displayed with negative numbers, so I use --invert to get a nicer output.

hledger balance --monthly --invert cur:USD Income

Resources

Tools