305 points · by nodivbyzero · 11y ago · 166 comments
I ask after reading your vacation write-up. Seems like the input side could have been a lot easier if you had a speech or text NLP interface to ledger. "$10 entertainment expense paid from MasterCard today," for example. That could be the holy grail for people who are not inclined to keep a detailed ledger, or for situations where input is difficult. (Theoretically you could email/iMessage/SMS/slack that string and have it picked up by your ledger file.)
$ ledger xact 11/5 mcd dinner 10.55
and ledger spits out 2015/11/05 McDonald's
Expenses:Food:Dinner $10.55
Liabilities:Credit Card
This falls down when you're traveling to new places, because in the command `mcd` is just a regex that matches on the payee.Separately, I saw you have also worked on a similar system for food logging. That got me thinking...what else could you track with a plain text file in this format? Fitness/workout info came to mind, as well as rewards points, sleep tracking, any others? Would be cool to have a single system to track all these things, which could be linked up to APIs like Fitbit, myfitnesspal, etc.
http://blog.andrewcantino.com/blog/2013/02/16/command-line-a...
You could definitly write: 2015/10/12 Exxon Expenses:Auto:Gas $10.00 Liabilities:MasterCard $-5.00 Liabilities:Visa $-5.00
It's still valid. However it would fail if you put a 5 and 4 here if your expense is 10.
I'm still not sure how it decides between active and passive (since Expenses and Liabilities could also be other words like the german ones: "Ausgaben", "Verpflichtungen" and the program works with them, too but It can't know if its active or passive. so I don't know what would happen if I make a transaction on two aktivas, like Bank to Cash or Bank to Fund)
https://github.com/danpat/uledger
I wanted to be able to group all my assertions together. This means the assertion needs to be able to retroactively calculate the balance on a given date. ledger-cli's assert doesn't support this. hledger does, but, well, I'm not a Haskell guy and the whole Haskell ecosystem seemed...cumbersome...to install.
uledger supports a useful-to-me subset of ledger-cli, primarily nested accounts, multiple currencies and out-of-order assertions and transaction entry. It has a bunch of tests and a very simple web balance interface. My favourite feature is the accounting-equation balance feature:
2015-01-01 Opening Balance
Equity:Owners Contributions $-100
Assets:Bank $100
2015-01-01 Buying widgets
Liabilities:Credit Card $-50
Expenses:Parts
2015-01-03 Some Income
Income:Consulting $-200
Assets:Bank $200
assert balance 2015-01-02 Expenses $50
assert equation 2015-01-04 Assets - Liabilities = Equity + Income - Expenses
Feedback/patches welcome.[0] http://www.ledger-cli.org/3.0/doc/ledger3.html#Time-Keeping
Now for a script to generate invoices from the timelog...
Edit: Found that: https://lists.gnu.org/archive/html/emacs-devel/2015-11/msg00...
I found his first answer in the thread interesting (he talks about his interaction with RMS.)
Unaffiliated with, but an extremely pleased user of http://www.youneedabudget.com.
accounting is more a business thing. all accounts needs to be balanced ie you always needs to have zero.
homepage: http://furius.ca/beancount/ source: https://bitbucket.org/blais/beancount/overview
(Seriously!) Why would you use something like this over say a spreadsheet? Is it really much easier than opening a browser and running Google Docs???
Because doing double entry accounting with the kind of reporting, balance checking, automatic addition of balancing entries, etc., that ledger-cli provides is difficult.
And because its plain text, it works quite well with the same kind of version control, diffing, etc., tools used for code.
> Is it really much easier than opening a browser and running Google Docs???
Yes.
* It is plain text, so you can keep your data in version control.
* It has awesome reporting capabilities. These are builtin, so you don't have to create them from scratch.
Spreadsheets are nice and simple, but once you do anything moderately complex you are asking for bugs under all of your hidden formulas.
In a way, it's exactly what you are thinking would be superior: why not use some general purpose tool for data entry and then write some macros for generating reports? It's just using a text editor rather than a spreadsheet.
The text editor is actually quite a bit better suited to this kind of entry than a spreadsheet. Have a look at the examples at the website. Since the journal is also just a text file, you can easily use a version control systems on the data -- this has saved me more times than I care to mention.
So, yes, it really is easier than just about everything else you could imagine. If you are interested in double entry accounting, I highly recommend it.
Over the many good GUI dual-entry accounting programs, I'm not so sure.
The simplicity of simple text files means you don't have to worry about your files not being readable by a future you. Which is not the case of every 'gui' dual-entry accounting system to date. Seriously, pick any system you could have used in 2000 and figure out if you can read its files now.
I won't touch anything from Intuit.
> Seriously, pick any system you could have used in
> 2000 and figure out if you can read its files now
Back then I used Gnucash. It's simple XML, and I wrote some Perl to pull a report on it recently. MoneyDance, which I use now, seems to have some kind of binary format, but will export XML, CSV, etc etc...As for the GUI, still needs to be built on top of something, why not this.
This actually looks really cool and I'm interested in checking it out. I've often thought about how cool it would be to have double entry accounting for every day life.
> you might want a computer to do all of the work
What is "all the work" here? MoneyDance (which I've used for a few years now) imports directly from Amex, my checking account, and three different credit card accounts... It generally classifies correctly, but then I want to manually review each transaction classification manually as some snacks or electronics are business expenditures, some are not... My accounts are generally pretty complicated, but I'm yet to find a use-case that MoneyDance (or GnuCash, back in the day) can't support...I'm a programmer, and I love programming, but not everything needs my time and attention to program. I also (no longer) run my own mail server, just because I can.
To those who don't "get" the CLI madness, I can see why you're drawn to the Windows ecosystem.
Bash, to Vim, to Python. It was glorious.
This has always been a thing (reduction to absurdity); these days you just see it more often as javascript libraries for anything you could possibly want.
That said, if that works for you, then that's exactly what you should do.
Experts prefer plain-text formats and command-line tools because with a little bit of elbow grease you can always do things the program creator never thought of or chose not to support.
> Experts prefer plain-text formats and command-line tools
Sure. Expert computer users prefer Lynx for web-browsing, expert Windows and Apple developers prefer vim and gcc, expert fiction writers prefer using emacs, and professional accountants use command-line accountancy tools...I use Prompt by Panic http://www.panic.com/prompt/ on my iPhone to do SSH sessions. Since it was hard for me to type in entries to my Ledger data file I put together a script with Python that could have stored merchants and just sort of make the process easier.
I can type in `ql -m sd -t 50` and it will add a full entry for the grocery store that I frequent. The project on Github is here: https://github.com/robotmachine/QuickLedger
To clarify, it is just a command line tool that I made with mobile SSH in mind-- not a mobile app. Hope that helps.
Edit: I know that Ledger uses plain text for each entry. Though I kind of wonder how do you guys keep those receipts.
Example:
2015/02/05 Clipper Card
Expenses:Transport:Public Transportation $20
Liabilities:Reimbursement:Zach Latta
; Receipt: 52fae6a40afaf2a79bfdef92f5e1b6d3.pdf
Each receipt filename is <md5 hash>.<extension> and they're all tracked in a private GitHub repository.Here's a link to our repo with more examples: https://github.com/hackedu/finances/blob/master/main.ledger
For my IT consulting business, I also wrote a wrapper that rejects entries that don't have a receipt tag which allows me to catch any entries that I haven't complied 100% with my practices (and tax office won't get upset in an audit).
I also autogenerate the ledger entries from the receipt name (and prompt for description/expense account/$$ with logic for handling common items like fuel etc).
I've played with PDF metadata so my entire receipt scanning => ledger is automated from just the PDF document but haven't reached a satisfactory setup there.
2015/11/04 * (12345) Walgreens
; receipt: /receipts/12345.pdf
Expenses:Medical:RX $10.00
Liabilities:Credit Card
It isn't an attachment, strictly speaking, but you can get at it with scripts and such.If you want to keep PDF, JPG, etc. receipts with it, just put them in the same directory and note them in a comment. Additionally, use a VCS that does binaries well. Git does not.
http://blog.deveo.com/storing-large-binary-files-in-git-repo...
Did you really mean to say "unforgiving"? I.e., "unforgiving" is generally a bad thing. Or did you actually mean that it's quite forgiving?
If you use Ledger the right way, it'll tend to catch stupid typos because the accounts won't balance.
Any tips on that?
https://github.com/bankscrap/bankscrap
The project is still under heavy development but we already have support for 3 main banks in Spain. We also have managed to integrate it with Slack and other apps.
I am sure we can learn a lot from the Ledger CLI.
When do you commit? After every entry?
And do you have branches?
But I use git & remote bare repos as a backup & multi-device sync method for nearly everything I do on my systems, so I'm pushing very frequently.
Warning: This may be wrong. I just grabbed it randomly out of a test file I was using to try this out and I don't have time to verify it. However, I think it will put you on the right track even if it is wrong (also not sure how to get it formatted correctly here). Anyway this is the kind of thing you have to do:
2014/09/04 Exchange Currency
; Note that the next line generates 20 GBP, not 10 GBP as you might expect
; This is so that the excess is captured by the capital gains account at the bottom
; Also note that the @ 0.50 GBP is not actually used by ledger in this case
; You could put @ 5000 GBP and it would do the same thing. The rate is
; determined by the lot price.
Assets:CDN -20.00 CDN {1.00 GBP} @ 0.50 GBP
; It is unfortunate that you can't get ledger to calculate or assert the next value
Assets:GBP 10.00 GBP ; Proceeds without commission
Expenses:Commissions 0.20 GBP
Assets:GBP -0.20 GBP ; Balance the commission
Income:Capital Gains
The main things you have to understand are that you need to specify the lot price in the transaction. Second, you must specify the price of the transaction. The P line is only used for calculating current value -- it will not set the price of the transaction correctly (if you don't specify it, I think it sets it to whatever the P line is set to when you run the report, which is clearly wrong). Also, you have to calculate either the total proceeds for the balancing account or the capital gains. Also, very unfortunately, with this scheme you can not use the @@ method of specifying the price. I do the math and calculate the result and let ledger calculate capital gains, because that seems the most reasonable thing to do. Some people feel very strongly that a human should calculate the capital gains by hand and enter that value. Either way should work.Hopefully the above should unstick you. If you are using average method for capital gains, it is dramatically simpler, but I don't have an example handy.
Printing reports with the lot prices is incredibly useful as the lots should balance out to zero. If they do not, then you have an error somewhere (and boy does that suck). It's also very frustrating when doing FIFO or LIFO that you constantly need to run the report to show you how much you have left in each lot, and then go and figure out which lots are the next ones to use. I think this can be automated, but I haven't gotten around to doing it.
To whomever is using it, do you also capture VAT in ledger? VAT reporting is something I would also need.
A "web UI" that consisted largely of a browser-hosted text editor with, perhaps, some ledger-specific affordances, some facilities for pre-defined reports plus a way to create new reports with customer ledger commands, and a decent history interface (possibly backed by a traditional VCS) would be nice, though.
Here in New Zealand essentially every start-up uses Xero - a SaaS accounting system that works extremely well and now has over 600k paying customers. It means one set of data, permanently in the cloud, and a host of integrations to other players.
Founders open up access at different levels - we can give read-only to directors and some investors, advisor-level access to accountants and bookkeepers and so forth.
Frankly it's part of the NZ advantage right now (120000 or so of those customers are here) - we seem to be spawning a large series of smart, low cost B2SMB SaaS businesses, who are not just following Xero's own path, but also using the tool to improve the way they do business.
Not everyone thinks it's a good thing. For instance, with Ledger, you don't have to be a customer. It's available for free. Anything that works good without SaaS is better done without SaaS.
There are a bunch of legit accounting packages out there. No need to re-invent the wheel or (in this case) clean the parade ground with a toothbrush. Off the shelf SME accounting package or if you really need it a proper ERP. Anything else is likely to end in tears.
Unless its for your one man show...in which case go wild with the CLI / Excel custom rolled solutions & sundry DIYs.
Source: Accountant
It definitely does not have the feature set of a proper ERP, but it can effectively be used in place of an SME accounting package.
Out of curiosity, what makes an accounting package "legit" in your eyes?
[edit] I see that 3 other comments asked a variation on the "legit" question. At least in my case this is not intended as an attack, but rather actual curiosity about what a professional SME accounting package can do that ledger can't; as far as open-source accounting packages go, ledger has a reputation for being able to produce reports that others can't.
Don't worry. I knew I'd catch grief. I know HN is strong on CLI love and thin on actual accounting experience. ;)
>This is a true double-entry accounting system that happens to have a CLI.
Double entry has existed in paper format since before the dawn of time. Its not particularly revolutionary (CLI or not) in fact its bare minimum for sanity. Hence my comment that this is barely a step above Excel.
>actual curiosity about what a professional SME accounting package
Copy paste from other questions:
Is it widely used? Can you get staff with a couple years experience using ledger? Will accounting staff be productive using the interface? Does it cope well with multiple simultaneous users? Is it compatible with other software? Can you get local support? Can you export/import to other packages? Are the fringe case glitches known?
All these things matter with finance software, even for fairly small operations.
>as far as open-source accounting packages go
To be honest I wouldn't go for an open source one (as much as I like FOSS etc). Accounting software is really an area where you want to follow the herd (unlike usual HN mindset). Straying from the herd has terrible risk/reward. e.g. Yes you might save $100 on the software by using FOSS, but when the auditors show they take twice as long to deal with the unfamiliar stuff and charge you an extra $2000. Or worse they find a glitch that is new. In the IT world you file a ticket for that. In the accounting world you end up with a massive bill to get outside help to salvage the accounting records. Followed by another massive bill from the auditors attempting to audit said salvaged records. But yeah...you totally saved that $100 on the initial purchase. (Exaggeration obviously, but you get my point).
>it can effectively be used in place of an SME accounting package.
I'd not attempt it, as per above. Seen way to many horror shows.
I doubt CLI snobbery is a factor; that would be infantile. I suspect others downvoted you for taking the default position that the status quo is the best prospect - hardly a hacker's point of view and certainly not in keeping with the startup community.
Had Rod Drury agreed with you, he might never have started Xero.
My finding is that once one is trained in the basics of double-entry book-keeping, accounting standards, finance and taxation, then any package that keeps appropriate records and generates the right reports will do. To which end, Ledger seems a perfectly reasonable choice for a micro business or self-bootstrapped lean startup. Comparing it to an ERP platform is a non sequitur. A better discussion might be around the transition triggers.
Moreover, Ledger could serve as the accounting module of a larger system that benefits from double-entry book-keeping, such as a trading platform or two-sided network business. I say that with confidence because I'm building one.
By the way, a little historical research: double-entry was invented in the fifteenth century; hardly the dawn of time.
Until that point, I'll keep doing my books myself with ledger :)
I know that Accountants are conservative, but there will never be any new accounting software if all accounting software used needs to meet these requirements.
Lastly, I think a lot of people thought "one man show" meant a business with only one employee, while it is clear after your response that you meant one book-keeper. Ledger will not be used at any company with "Accounting staff" (plural). The largest organization I'm aware of that uses it is a free software non-profit that has moral reasons for avoiding proprietary software.
How are they more "legit" than ledger?
> No need to re-invent the wheel or (in this case) clean the parade ground with a toothbrush.
Ledger's been around for a while. Using it is no more "reinventing the wheel" than using any other accounting package.
Is it widely used? Can you get staff with a couple years experience using ledger? Will accounting staff be productive using the interface? Does it cope well with multiple simultaneous users? Is it compatible with other software? Can you get local support? Can you export/import to other packages? Are the fringe case glitches known?
All these things matter with finance software, even for fairly small operations.
Seems to be fairly popular.
> Can you get staff with a couple years experience using ledger?
It mostly (from the anecdotes I've seen) seems to be used by people who don't have dedicated accounting staff.
> Will accounting staff be productive using the interface?
See previous answer; the "accounting staff" using it are usually programmers, either independent business persons keeping their own books or using it for personal accounts.
They're probably more productive using text-editor + source control + CLI than they would be with a traditional GUI.
> Does it cope well with multiple simultaneous users?
That's an issue mostly offloaded to the VCS, where needed.
> Are the fringe case glitches known?
In quality software, known glitches are fixed.
> Can you export/import to other packages?
Ledger only reads data you stored in text files. You can't really get much more flexible than that. Give me another package's installation and a weekend, and I'll throw you a compatibility layer. Can you say the same about those other packages?
Nobody's twisting your arm to switch. If it provides utility greater than what you perceive to be its disadvantages, use it. If not, don't.
Isn't that what this is? For those of us who haven't used this, what makes it less "legit" than competing options?
Is it widely used? Can you get staff with a couple years experience using ledger? Will accounting staff be productive using the interface? Does it cope well with multiple simultaneous users? Is it compatible with other software? Can you get local support? Can you export/import to other packages? Are the fringe case glitches known?
All these things matter with finance software, even for fairly small operations.
> Does it cope well with multiple simultaneous users?
If you know of any other software that copes better with simultaneous users than git/modern dvcs+text files I'd be very surprised?
What makes ledger not 'legit'?
Is it widely used? Can you get staff with a couple years experience using ledger? Will accounting staff be productive using the interface? Does it cope well with multiple simultaneous users? Is it compatible with other software? Can you get local support? Can you export/import to other packages? Are the fringe case glitches known?
All these things matter with finance software, even for fairly small operations.