I’ve used Ledger CLI to keep track of my finances since 2005, when I moved to Canada. I like the plain-text approach, and its support for virtual envelopes means that I can reconcile both my bank account balances and my virtual allocations to different categories. Here’s how we use those virtual envelopes to manage our finances separately.

Every month, I have an entry that moves things from my buffer of living expenses to various categories, including an allocation for household expenses. W- doesn’t ask for a lot, so I take care to be frugal with the difference between that and the cost of, say, living on my own. The way we handle it is that I cover a fixed amount, and this is credited by whatever I pay for groceries. Since our grocery total is usually less than the amount I budget for household expenses, any difference just stays on the tab. I used to write him cheques to even it out, but lately I just pay for the occasional additional large expense.

Then ledger bal Assets:Household will tell me if I owe him money (negative balance) or not. If I pay for something large (ex: plane tickets, plumbing), the regular household expense budget gradually reduces that balance.

I picked up the trick of adding a month label to my credit card transactions from W-, who also uses Ledger to track his transactions. It lets me doublecheck the balance of a statement and see if the previous statement has been properly cleared.

It’s a bit of a weird use of the assets category, but it works out for me mentally.

Using Ledger to track it in this way lets me keep track of our grocery expenses and the difference between what I’ve actually paid and what I’ve budgeted for. If I end up spending more than I expected, I can move virtual money from more discretionary envelopes, so my budget always stays balanced.

Ledger’s a powerful tool. Pretty geeky, but maybe more descriptions of workflow might help people who are figuring things out!

Updated 2014-05-26: Thanks to Greg for the updated link to https://github.com/ledger/ledger/wiki !

I use John Wiegley’s ledger program to keep track of my personal finances. It’s quick, it’s light, and it lets me slice-and-dice my data however I want. I enjoy opening my ledger file and adding transactions to it. (Particularly if it involves income!) Yes, I’m that kind of weird.

I wanted to make it even easier to add entries. Instead of using C-x C-f to find the file, using ESC > to go to the end of the buffer, and typing in the transactions, I decided to add some of my common transactions to org-capture-templates. Here’s the relevant snippet:

I’ve bound org-capture to C-c r using (global-set-key (kbd "C-c r") 'org-capture), so now I can use C-c r l m to create an entry for my MBNA Mastercard. This keyboard shortcut might not seem short to you, but if you think about it as C-c remember ledger Mastercard, it makes perfect sense. =) (Besides, org-capture prompts me just in case I forget.)

I have about 41 pages for my current chapter on taking notes in Emacs, and I still have to write the introduction and wrap-up sections. This means that I’ll need to do some more editing. It’s clearly time to apply another piece of advice from the wonderful book How to Write Fast (While Writing Well), by David Fryxell: don’t over-write, because the time you waste writing more than necessary and then editing down to the required length could be spent writing about something else!

I also rock because I’m getting the hang of writing macros for OpenOffice.org. Basic is not my favorite language and OpenOffice.org macro programming is sufficiently obscure that it’s hard to find examples of what I want to do. OOoMacros.org helped me learn enough to write a few more functions to make my writing life better. I wrote two new functions today: one to mark up wingdings in my code, and another to mark up the source code examples. Both save me lots of tedious work. The wingding function replaced all instances of (1), ;; (1), (2), ;; (2), until (9) and ;; (9) with the corresponding wingding. The example function marked up everything enclosed in <example>..</example> tags, formatting the first and last lines in a different style and using a single-line code style for short examples. Between that and the two functions I’d previously written to format about 80% of my command and keyboard shortcuts, editing is just so much better.

It seems that most people don’t tinker with their tools. I like doing so. I like getting to know what I can do with a tool and how far I can push it. This can be frustrating sometimes (I spent all afternoon trying to get Emacs to play nicely with other weblogs!), but most of the time, it’s both fun and useful. Not only am I saving myself time, I’m also exercising my brain and opening opportunities for other hacks down the line. This is good.

Oh! And W- is giving Ledger a try. The tool he’d been using to keep track of finances dropped some more of his data recently. Because it’s all magic inside, he couldn’t figure out what happened. I’d been going on about how awesome Ledger is, this command-line double-entry accounting tool that provides no bells or whistles but with which I can do all sorts of crazy things. He described how he wanted to budget, and I showed him how to do it. No screencast, but I do plan to review the audio and create some supporting materials for my upcoming article on Ledger and Gnuplot.

I’m back on the wagon of tracking every expense. There’s a certain
satisfaction in knowing that every cent is accounted for. This time,
I’m using John Wiegley‘s excellentLedger command-line accounting
tool. It works with plain text, of course.

I’ve just figured out how to do my fancy earmarked accounting thing.
I’ve partially sorted out my cashflow, but I’m not sure how much I’m
supposed to receive over the next few months or what’ll happen when I
start working. For peace of mind, I’ve earmarked enough money to cover
tuition, rent, and food.

I want the earmarked money to be tracked separately from my real
savings so that I know how much money I can actually touch, but I want
to leave it in my regular high-interest savings account so that I can
earn interest on the whole amount. So I need two reports: one showing
what I can consider free and clear, and another that reconciles with
the account summary from the bank (includes earmarked accounts).

11.02 * PCFinancial ; Transfer for rent payment
Assets:Savings:PCFinancial $-485
Assets:Checking:PCFinancial $485
[Assets:Savings:PCFinancial] $485
[Assets:Checking:PCFinancial] $-485
; Automatically transfer rent money from Savings to Checking ($485)
; This is still part of my earmarked savings until it goes out of Checking
; So ledger -s -c bal shouldn't show it as part of my real checking account
; or my savings account, but as part of Savings:Earmarked
; but ledger -R -s -c bal should show an increase in checking and a decrease in savings
11.05 ! University of Toronto
Assets:Checking:PCFinancial $-485
Expenses:Rent $485
[Savings:Earmarked:Rent] $-485
[Assets:Checking:PCFinancial] $485
; Now decrement my earmarked savings
; And make sure that Checking reflects actual balance
; And that savings is unchanged from before with virtual transactions

The ! signifies a pending transaction that has not yet been cleared,
while * signifies a cleared transaction. ledger can do
partially-cleared transactions too. This is pretty nifty.