Hacker News new | past | comments | ask | show | jobs | submit login
Program Your Finances: Command-Line Accounting (petekeen.net)
93 points by edward on April 22, 2015 | hide | past | favorite | 32 comments



I like command line access, but the critical weakness of nearly every accounting application (cli or gui) is manual data entry. The number crunching is the easy part. The hard part is automating data entry through transaction gathering.


Most of bank websites (in France at least) provide .QIF downloads, so I coded a tool to semi-automatically add categories to qif transactions by matching keywords from your past transactions history : https://github.com/Kraymer/qifqif

I use it with GnuCash but could work with ledger as long as ledger importer links categories with accounts.


I do the same thing with ledger: it takes only a few lines of script to convert the csv export to ledger's file format, then a few minutes matching up transactions that did't match.

Since ledger's input format is so flexible, it's pretty straightforward.


Manual data entry is the only thing that has kept me on track for eight years. I tried the automated stuff but I never connected with my money so I never took it seriously which led to letting it get completely out of control.

Tracking every penny by hand is drudge work at first but at this point is habitualized. I have a visceral understanding of my cash flow which let's me do things like quit my job with confidence instead of panic.


https://github.com/cantino/reckon imports CSV to Ledger, with Bayesian automatic categorization.


I use this for my creditcard statements, works pretty well.


For one off transactions, I have no problem using a text interface. However, a sort of companion app that converted receipts and bills into ledger parseable bills would really help with mass data entry. Does anyone know if something like this exists?


There's hledger (a ledger clone of sorts written in haskell)[0], which comes with some facilities for automatically assigning expenses to accounts via "rules files". I've made (and a couple of sed / awk scripts) one that handles upwards of 90% of my stuff from the files I download from my bank.

It also has a web UI, so you can use that to add transactions if you don't like using a text editor.

[0] http://hledger.org/


ReceiptBank is probably a good starting point. Non-free.


I pay most of my daily shopping with a debit card and my Finnish bank will give me a plaintext dump of all the transactions that's a few regexp operations away from becoming a CSV file that can be imported to hlegder.


Using a debit card api would be useful for that. Dont know if they exist.


I think we're getting close. I'm really hopeful that someone like Simple (https://www.simple.com) will eventually release an API for their service.


Could use a [2010] tag. The github repo has moved - https://github.com/ledger/ledger - and the referred to version 3 is out.


Fixed both issues. Thanks.


I love ledger, but it's only useful in some situations. I made the mistake of using it to manage the account of a non-profit I was helping with a few years ago. It worked great, but when it came time to hand over to a new bookkeeper it was sort of a pain because almost nobody who's not a programmer is going to want to use a text editor and command-line utility software.


It might have been feasible to migrate the data to another account management software using a script to export ledger data to a widely supported format like QIF (https://en.wikipedia.org/wiki/Quicken_Interchange_Format)


The other book keeper just needed the data to keep. Why did the tool you used matter?


Dumping a CSV out of ledger is trivial (I do it every day). Surely the new bookkeeper could work with a spreadsheet.


Would anyone like to adopt the old Wesabe (Yodlee/Mint competitor) open-source code?

http://readwrite.com/2011/02/25/crawl-your-bank-account-with...

https://github.com/wesabe


If using Quicken is like living in a loft condo in the middle of a city with a gym and a swimming pool in the building, it sounds like using ledger is like living in a house made of twigs and mud with no electricity or running water in the middle of a field. It's a cool and interesting house in its own way, but you would never want to take a date home to spend the night.


Ledger is just a fancy calculator. You can shape it into whatever you want. For example, I don't show my wife the raw ledger files or command line reports, but she does get quite a lot of milage out of the web-based reporting system I built for us, which does indeed have fancy graphs and charts.


Is your reporting system available? I'm totally blind so find Ledger to be a nice way for me to do accounting instead of a program with a GUI that will be less efficient. My Fiance is how ever not a computer person and something like this could be useful when we get married.


Pieces of it are. It's based on Ledger Web[1] which I run using a normal puma-behind-nginx stack on our home server. On top of that I built a whole budget system and a suite of reports that are specific to our needs.

[1]: https://github.com/peterkeen/ledger-web


Thanks, I'll take a look at Ledger Web.


If you want to do personal accounting, you should also try KMyMoney: https://kmymoney.org/screenshots.php

I have been using it since 2008 (for family accounting) and you can input all your data and do everything with the keyboard only. No dataloss (backup is easy, just a single file), pretty fast and the software is well maintained.

This is just my 2cts from a long term user of a personal accounting software (before I used MS Money and Quicken, but for the long term, open source is in that case way better).


    > Ledger is almost the most boring, austere accounting
    > program you could think of. 
This does not strike me as a good way to get yourself doing accounting properly. I am anal about keeping dual-entry accounting, but part of the fun is the graphs, and part of what keeps me sane is auto-import from all sorts of sources.

I use MoneyDance, which is like GnuCash only much less ugly.


Auto-import with Ledger is trivial and programmable. You should have a look at the ledger convert command.

Another major benefit is that Ledger data is stored in plain text files and can be put in a git repo.

Currently I have more than 7 accounts across various regions (Ledger has great currency support) and I am able to process a full month of transactions in under 10 mins. Ledger so far has been the most painless system I have ever used.

There is also a great Emacs mode (ledger-mode).


    > Auto-import with Ledger is trivial and programmable. You 
    > should have a look at the ledger convert command.
That's good to hear

    > Another major benefit is that Ledger data is stored in
    > plain text files and can be put in a git repo.
I don't think I've encountered a situation where that would be useful.

    > Currently I have more than 7 accounts across various
    > regions
I am running 37 accounts in 4 currencies. Some of these represent checking accounts, some are CC accounts, some are stocks and shares, one or two are assets that I'm depreciating over time, there's an informal loan owed to me, a loan I have been given from a bank, and I use a couple of virtual ones as a budgeting mechanism. On top of that, I have about 60 various categories (which are - I guess - another type of virtual account) for various sources of income and expenses. Many of the above are hierarchal in nature. About 1/8th of my transactions are actually one-to-many transactions rather than one-to-one. This represents my personal accounts, and not my business accounts, which I let FreeAgent + an accountant handle the gnarly details of.

While this may sound complicated, it is in fact incredibly convenient, and it's exceptionally easy to pull out (or put in) almost any kind of data I want.

The GUI autocompletes my transactions as I create them, remembers how I like to categorize stuff, comes with a lot of built-in graphs, syncs to my iPhone (although the iPhone app is a bit naff), will automatically create transactions for me on a monthly basis if I want, and presents me with a dashboard.

I am just about old enough to remember people dismissing colours in their xterm's as being too hipster and distracting, and also about old enough to remember some people proudly saying `lynx` was all they needed from a text editor.

I cannot imagine why I - and I spend almost all day in a `screen` session already - would want to hand-edit my transactions in a text-editor and use a CLI tool.


> I don't think I've encountered a situation where [a git repo of financial data] would be useful.

The repeated SHA1 commits would form a kind of semi-proof, and of course having history information would help catch and resolve data entry errors.

> I cannot imagine why I - and I spend almost all day in a `screen` session already - would want to hand-edit my transactions in a text-editor and use a CLI tool.

Ease of use. Adding a transaction is a simple 'echo … >> FILE'. Scheduled transactions are just cron jobs. You can easily write your own code to handle interesting transaction types (e.g. sum-of-years'-digits depreciation). You can easily import & export data.

If you actually live on a CLI, odds are that you actually enjoy working in your text editor.


Unfortunately, MoneyDance does not provide for split transactions. I use that quite a lot in GNUcash. My monthly salary is split up in 7 different components (income, taxes, insurance, reimbursement for work-expenses, bonuses, pensions and payment on checking-account).

It would really make the accounting messier, would I have to split this in separate transactions.

I would be willing to pay (or help develop) a good, versatile accounting program for personal finances and small businesses.






Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: