top | item 7707262

Ledger, a powerful CLI accounting tool

124 points| mercurial | 12 years ago |ledger-cli.org | reply

53 comments

order
[+] bkuhn|12 years ago|reply
I'm President of the Software Freedom Conservancy, a 501(c)(3) non-profit charity that provides a home for Open Source and Free Software projects.

We've used Ledger-CLI since around mid-2008. We currently have 137,677 lines of ASCII Ledger-CLI data. We're thus likely the largest Ledger data set in real-world operations on the planet.

We switched to Ledger-CLI simply because it was the only Free Software accounting tool that had the flexibility to handle the complex area of non-profit accounting called "fiscal sponsorship", which is the primary purpose of our organization.

However, the fact is, I keep the books myself because Ledger-CLI gives you an excellent set of books that only a hacker could love. That said, our accountants after a few annual audits that were painful, this year absolutely love our reporting and find our audit a breeze (see the contrib/ area of Ledger-CLI's repository for the scripts we use for reporting).

Our biggest challenge now is that we are growing and need a programmer who can use Emacs, the command line, and revision control systems to keep our books isn't scalable. We need a better UI for both data entry and reporting to make this work.

As such, Conservancy last year started raising funds to build a better accounting system for non-profit organizations on top of ledger: https://sfconservancy.org/campaign/

It's slow going, but I recently announced that I'll be spending 50% of my time on the project, and we hope we'll get more donations as time goes on. We're focused on what non-profit orgs need first, but long term, we'd like to build an accounting application that will "last". We did a survey of all the known Open Source and Free Software accounting applications, and frankly we found them all lacking for various reasons: either they try to do too much and fail to get the accounting done right, or they are just poorly designed: http://npoacct.sfconservancy.org/ExistingProjects/

[+] kinleyd|12 years ago|reply
I'll be keen to see the nature of UI and reporting tools that emerge from this exercise.

I currently use TurboCash, which is a Windows-based accounting solution that works well for me, but I am keen to move away from Windows entirely and on that front Ledger is currently top on my list.

[+] jimktrains2|12 years ago|reply
https://github.com/jimktrains/freebooks is something I started working on a while ago. It stores everything inside git commits and signs each transaction. My goal was/is to make it distributed such that my wife and I can enter transactions separately and then merge them at some later point.
[+] ac2u|12 years ago|reply
blockchain? :)
[+] kingnight|12 years ago|reply
The reasons why I tried and failed with ledger:

- I never quite understood how to 'start' the ledger balance. Should I start on the first of the year when my account was at $56 or today when it's at $76 ... where does this $ come from?

but probably more this:

- I found it super laborious to enter transactions. I guess I grew up post-checkbook but when I'm not near my computer for a few days and have a pocketful (or not) of transactions to enter, I would get behind and then just give up. Even with logging into my bank account to cheat.

- Investments man. How does one track dividends, buy/selling in a text file. I probably need to take a finance class... :)

[+] mercurial|12 years ago|reply
> - I never quite understood how to 'start' the ledger balance. Should I start on the first of the year when my account was at $56 or today when it's at $76 ... where does this $ come from?

That's not ledger-related, that's double-bookkeeping related. What you want to do is something like:

    2014-07-05 Opening balance
        Assets:Checking         $ 56.00
        Equity:OpeningBalance   $-56.00
Actually, there is, in the wonderful ledger manual, something about that. Of course, Equity:Opening balance will remain forever at -56.00, but that's not a problem.

Wrt to investments, I haven't really explored that part yet, but there is a description of how you're supposed to track your portfolio.

[+] dragonwriter|12 years ago|reply
> I never quite understood how to 'start' the ledger balance. Should I start on the first of the year when my account was at $56 or today when it's at $76 ... where does this $ come from?

Whenever, it doesn't matter. Its just an opening balance. [1]

> I found it super laborious to enter transactions. I guess I grew up post-checkbook but when I'm not near my computer for a few days and have a pocketful (or not) of transactions to enter, I would get behind and then just give up. Even with logging into my bank account to cheat.

Yeah, the hard part of tracking finances, regardless of system, is the discipline of actually keeping up with it.

> Investments man. How does one track dividends, buy/selling in a text file. I probably need to take a finance class... :)

The ledger manual actually covers tracking investments in some detail.

[1] http://ledger-cli.org/3.0/doc/ledger3.html#Starting-up

[+] tucosan|12 years ago|reply
> - I found it super laborious to enter transactions. I guess I grew up post-checkbook but when I'm not near my computer for a few days and have a pocketful (or not) of transactions to enter, I would get behind and then just give up. Even with logging into my bank account to cheat.

I had the exact same gripes with ledger. Although there are means to pull csv-data from most banks, one still would have to categorize the entries on each import into ledger.

There is https://github.com/cantino/reckon which claims to solve this by automatically sorting entries into the correct accounts by means of Bayesian learning. Sadly the machine learning worked unreliably with my data - I would still have to manually sort many of the recurring and previously "tagged" entries into the proper account each time they came up in the csv-file.

[+] epo|12 years ago|reply
The problem isn't ledger is that you have been spoonfed by GUI applications which do all the work and thinking for you. If you bothered to read the documentation you see all this clearly laid out. Ledger requires you to do your own thinking and some people find that hard. The ledger itself is a set of text files, if you can't figure out how to automate data entry (say excel for bulk data entry, then processing a CSV file) then maybe you're right, ledger isn't for you.
[+] amboar|12 years ago|reply
Interesting; I might poke around at Ledger. Recently I just wanted to see what I was spending money on in a few simple graphs graphs, and so hacked together some python and matplotlib: https://github.com/amboar/fpos. fpos doesn't do anything complicated, but allowed me to see where my money was going without me doing too much tedious work.
[+] bananas|12 years ago|reply
Tried it but I can't shift the spreadsheet mentality. Perhaps I'm getting old and inflexible but literally everything has a brick wall somewhere apart from spreadsheets.

Edit: I did my accounts on an HP48GX until about 2003, bought sage line 100 and hated it, moved to excel 2000 and now libreoffice calc.

[+] roel_v|12 years ago|reply
While theoretically you can do double-entry bookkeeping in Excel, it's frustrating and error-prone.

Then again for somebody who doesn't see the value of double entry bookkeeping, it's unnecessary anyway, and Excel will do fine.

[+] rkowalick|12 years ago|reply
I'm a big fan of ledger. Very easy to use and very powerful.

One of my first ruby projects was creating a scraper for the Chase mobile website that outputed ledger-compatible text: https://github.com/rkowalick/autobank

[+] fiatjaf|12 years ago|reply
What is so hard in personal accounting that takes an enourmous quantity of apps, webapps, web services and CLI tools to solve? Is it really worth creating markdown files for each expense and passing them to a "powerful tool"?

I'm asking honestly, not trying to make fun of it somehow.

[+] superuser2|12 years ago|reply
There are lots of large, flashy programs, but in my cases UX is exceptionally poor and the tools are extremely inflexible.

Take Mint, for example. It is impossible to have an overall budget. You can only set budgets per category. There does not appear to be a modern tool that will show me a progress bar of where I am on spending per month. Every option I've ever seen requires budgets to be set per category.

There are lots of different ways people want to see data, and many of these flashy/polished tools (like Mint, Simple, whatever) give a giant "fuck you" to anyone who doesn't think in exactly the way the program was designed.

[+] pbnjay|12 years ago|reply
> markdown files for each expense

Not sure where you got that. It's a single file with many transactions laid out in a straightforward double-entry accounting format.

I'm a developer, so the draw for me is that that I can write a few scripts to translate my various online accounts' downloadable formats into the simple text format while automatically adding in expense categories based on regex. I can't do that with any other apps I've seen.

[+] dragonwriter|12 years ago|reply
Its not so much that it "so hard", its just a common need where one of the key issues is working with individuals preferred workflows, which are highly fsubjective -- so there are lots of tools that serve the needs of different people.
[+] maxerickson|12 years ago|reply
It isn't about it being hard, it's about a collection of well sorted data making it possible to answer more questions.
[+] thelsdj|12 years ago|reply
I spent 10-15 hours (mostly in Ledger) figuring out what my Bitcoin tax liability was. Not (mostly) Ledger's fault that it took so long. Now that I know what I'm doing, I should be able to do this year in just a few hours.
[+] Torgo|12 years ago|reply
Ledger appears to be the "prescribed" way to do accounting natively in Bitcoin/other cryptocurrencies as well. I investigated this earlier this year. Quicken is out, no support and no way to add it in. And I found that GNUCash can't handle bitcoin's level of divisibility, and is tied to ISO currency codes. Ledger doesn't care about any of that.
[+] dgreensp|12 years ago|reply
Thanks for posting this, it's new to me! I was just thinking about trying to find a new double-entry accounting system (no joke). The last time I did a proper budget it was with Apple Numbers, which was not very satisfying.
[+] FroshKiller|12 years ago|reply
This project is very interesting to me. I work for a company that develops a SaaS accounting solution, and I've wanted to work on a CLI suite for posting and auditing tools.
[+] kinleyd|12 years ago|reply
Ledger has been on my TBD list for a while. Been meaning to implement a project with it. Now may be a good time.
[+] cheez|12 years ago|reply
John Wiegly is an amazing, prolific and intelligent programmer. Very inspiring.
[+] mrbill|12 years ago|reply
Been using this for over a year, since the last time I saw it on HN...
[+] bennylope|12 years ago|reply
Would love to hear how you like it, as well as what you previously were using (or would be using instead).
[+] atmosx|12 years ago|reply
Can you please share your experience? How you use it, what works and what not?
[+] dragonwriter|12 years ago|reply
Ledger is awesome, but hardly new...What's the news here?
[+] ams6110|12 years ago|reply
Agree, but I think it's ok if cool stuff is posted again every so often. There are always people who didn't see it last time around.

It's funny, I found ledger to be WAY easier to learn and use than QuickBooks, which just completely baffled me. Yet QuickBooks is the leading system for small business.

[+] mercurial|12 years ago|reply
It's not new, but I wasn't aware of it until a few days ago, after rage-quitting gnucash in frustration, and I figured some HN folks would appreciate reading about it. It's the first accounting app which doesn't trigger homicidal tendencies when I use it.
[+] NAFV_P|12 years ago|reply
> Ledger is awesome, but hardly new...What's the news here?

It isn't SAGE.