Feb 12 2019

Ledger-CLI Gets the Job Done

If you are a business owner or avid budgeter, you surely know the importance of accounting. Since I love text files and data organization, I rely on ledger-cli for my money tracking needs. The most evident benefits of the CLI software stem from ideas mentioned in my other posts. Instead of doing the usual rant, I am going to share how I use ledger.

An overview of my workflow:

The Makefile

Some of the common reports I run are:

files = `ls *.ledger | sed s/^/'-f '/g | xargs`
html_register_format = --register-format "<tr><td>%D</td><td>%P</td><td>%t</td><td>%T</td></tr>\n"

balance:
	ledger $(files) balance --current --basis

2017:
	ledger $(files) --begin="2017-01-01" --end="2018-01-01" balance --basis

2018:
	ledger $(files) --begin="2018-01-01" --end="2019-01-01" balance --basis

invoice:
	ledger -f client_account.ledger register revenue:client_account --invert $(html_register_format)

rents:
	ledger $(files) register 'asset:accounts receivable' --current --sort date

The docs are in-depth and give a good feel for the capabilities. One neat feature is that time tracking is built in. This way I can generate invoices with detailed information: description of each work item, amount of time, running total, etc. Since the output is text, it is very simple to add your own branding and other customizations.

Running balances are fat-free and to the point. An example of my balance sheet:

   $xxxxxxxx  asset
   $xxxxxxxx    cash
    $xxxxxxx      reserved
   $xxxxxxxx    land
  $xxxxxxxxx    real estate
     $xxxxxx    tax escrow
  $-xxxxxxxx  equity
   $xxxxxxxx  expense
     $xxxxxx    bad debt
    $xxxxxxx    closing
   $xxxxxxxx    loan interest
   $xxxxxxxx    operating
    $xxxxxxx      depreciation
     $xxxxxx      eviction
    $xxxxxxx      insurance
      $xxxxx      legal
     $xxxxxx      office
    $xxxxxxx      property tax
    $xxxxxxx      repair
       $xxxx      restaurant
    $xxxxxxx      water
 $-xxxxxxxxx  liability
    $-xxxxxx    credit card
   $-xxxxxxx    depreciation
 $-xxxxxxxxx    note payable
 $-xxxxxxxxx      financer #1
 $-xxxxxxxxx      financer #2
  $-xxxxxxxx    investor #1
   $-xxxxxxx    security deposit
  $-xxxxxxxx  revenue
     $-xxxxx    bounce fee
   $-xxxxxxx    consulting
     $-xxxxx    late fee
   $-xxxxxxx    loan interest
     $-xxxxx    pet rent
  $-xxxxxxxx    rent
    $xxxxxxx  writedown

I’ve been using ledger in my business for about 2 years now and plan to continue using it for the foreseeable future. I also began using ledger for personal budgeting, but I am going to wait and let it mature out a little more before making a separate post on this.

Hopefully this was informative. Feel free to email me if you have any questions!