% Plain Text Accounting, a guide to Ledger and friends
accounting is tracking the flow of valuable commodities, such as money or time. It clarifies activity, priorities, obligations, opportunities. It can reduce stress and even be enjoyable.
double-entry bookkeeping is a process for doing this reliably. For every movement of value (a transaction), both the source and destination are recorded. Simple arithmetic invariants help prevent errors.
In traditional double-entry bookkeeping, value at any point in time is tracked in various accounts, classified as asset (owned), liability (owed) or equity (invested). Two more classifications track changes during some period: revenues (inflows) and expenses (outflows).
Transactions consist of debits (increases to asset or expense accounts, or decreases to liability or equity accounts) or credits (decreases to asset or expense accounts, or increases to liability or equity accounts).
In 2003, John Wiegley invented Ledger: a plain text data format and command-line reporting tool for efficient double-entry-style accounting. This idea went viral among software developers and technical folk, and we now have 5+ actively-developed Ledger-likes such as hledger and Beancount, with 40+ add-on tools and an active community. This site was created in 2016 to introduce our tools, documentation, and practices.
Accounting data is valuable; we want to know that it will be accessible for ever - even without software. We want to know when it changes, and revision-control it. We want to search and manipulate it efficiently. So, we store it as human-readable plain text.
We simplify debits and credits by using signed numbers - positive for inflows to an account, negative for outflows from an account.
We define arbitrary account hierarchy to suit our needs. This scales smoothly from simple to complex scenarios, and from high-level overview to fine detail.
Ledger-likes are, at least in part, command-line tools. This makes them efficient to use and very scriptable and flexible.
Ledger-likes also, at their core, tend towards functional operation: they read the input data without changing it, and output a report. This simple model makes them easy to understand and rely on.
FAQ
Ledger-likes
related tools
data import/conversion
editor support
time logging
UI, console
UI, curses
UI, GUI
UI, web
API
discussion
mail lists/IRC
stack exchange
hacker news
reddit
twitter
docs
accounting
comparisons
presentations
videos
articles & blog posts
common tasks
choosing accounts
entering data
importing
reconciling
reporting
budgeting
forecasting
invoicing
multiple currencies
shared expenses
taxes
time tracking
inventory tracking
Who is this for?
Those who are comfortable on the command line and who understand the value of storing information in plain text.
If you need a complete GUI providing lots of guidance, you may prefer to use something else.
Must I edit text and type cryptic commands?
Not entirely!
"Plain Text Accounting" is a broad description, referring mainly to the data format.
We welcome optional GUIs, and they are coming.
Who is using this, and how?
See Who's using Ledger? for some stories.
What are the alternatives?
FOSS tools like GNUCash, Grisbi, KMyMoney.
Proprietary tools like Quicken/Quickbooks, You Need A Budget.
Online tools like Xero, FreeAgent.
(There are many).
Spreadsheets.
Paper accounting.
A bookkeeper.
Why is this better than QuickBooks?
Your data remains accessible.
No yearly fees.
Free software you can fix and port.
Cross platform.
Scriptable.
Efficient.
How do I communicate with my accountant?
Clean up text reports by hand,
print them as PDF,
export CSV reports to a spreadsheet..
What if my accountant only uses QuickBooks?
You'll need a new accountant,
or a duplicate set of books in QuickBooks,
or to pioneer *ledger -> QuickBooks exporting.
Can I use this to do my taxes?
You can use this to track and report the data needed for tax reporting.
Fill out and submit tax forms with another tool, or by hand.
How do I do budgeting?
See budgeting below. I emulate YNAB-ish envelope budgetting (see third link).
Double entry accounting? Where are the debits and credits?
Most (not all) plain text accounting implementations use signed amounts instead of debits and credits. This makes them "double entry light" perhaps, but it has been a rather successful simplification, intuitive to most newcomers.
Isn't personal accounting a waste of time?
People have very different needs and practise personal accounting for many different reasons. There is of course a point of diminishing returns; tailor your accounting practices to your needs. Needs change over time. Some of us would benefit from doing more (or better) accounting, some less (I would guess this second group is smaller).
In The Millionaire Next Door (highly recommended), one research finding was that above-average wealth accumulators spend more time on financial planning, which for many of us requires accounting as a foundation. "Minimal time dedicated to financial planning is a leading indicator of a UAW [Under Accumulator of Wealth]".
Do you really enter every little transaction?
Yes! Many folks in our community do it. Mahatma Gandhi reconciled to the penny every night. J.D. Rockefeller was famous for his ledgers.
It's not required. I started doing it as a temporary learning exercise, and still like it. It makes troubleshooting and reconciling easier.
How is that possible?
Practice, and a process/toolset that suits you. Some folks import most of the data from their banks, so little manual data entry is required. A few prefer to manually enter everything, for the increased awareness and insight. "Manual" data entry is usually assisted in some way: interactive console tools (hledger add and similar), web-based tools (hledger-web and similar), GUI tools (ledgerhelpers), smart editors (eg emacs & ledger-mode), recurring transaction scripts. I currently use a mixture of bank CSV import and rapid copy/paste in emacs. I spend 15 minutes a day on average, and for me that's currently a good investment.
How do I use the transaction data in my bank's web or mobile app?
If you can export it as CSV, you can import it and run queries against it. There are also some tools for converting OFX, QIF etc.
So I've got a huge list of transactions recorded, duplicating my bank statements. How does that help?
Accounting is modelling flows of money (or other value). Such a model aggregates information from many sources, in one trusted place. With it you can efficiently generate reports, forecast things (cashflow!), answer questions, try experiments.
Some people need a very simple model, others benefit from a more detailed one, and we don't know up front what we might need in future. The most fundamental accounting data is a simple list of transactions (the journal). Once you have captured this, you can mine it for anything you may want later on.
Plain text accounting provides nice open data format(s), tools and practices for doing this, and could be a good foundation for more powerful tools.
Isn't a command-line tool too limited for real-world accounting needs?
"I am sure for a simple expense/budget ledger it will work OK, but when it comes to recurring journals, multiple reconciliation accounts, inter company transfers, control account tracing etc., give me a nice GUI any day..."
Understandable. The current plain text accounting tools provide a very generic double entry accounting system with which you can model such things, and script them.
There are a number of generic GUIs available (hledger has curses and web interfaces, and there are web/curses/GTK interfaces for Ledger and beancount). But there are not yet a lot of rich task-specific GUIs. There's no reason they can't be built, though.
Isn't a plain text format too limited for large organizations?
"it's pretty obvious that plain-text files don't scale to a multinational, with hundreds of accountants of various types all trying to work with the same files. Even with proper use of Git I bet that would get old fast. You would instead want a real database, with a schema, and some data validation and some programs/webpages to smooth out the data entry and querying and whatnot."
I'm not sure. Current plain text accounting tools can do some schema definition and data validation, and will do more in future. The plain text storage format is open, human-readable, future-proof (useful even without the software), scales smoothly from simple to complex needs, and taps a huge ecosystem of highly useful tooling, such as version control systems. And, despite the name, there's no reason these tools can't support other kinds of storage, such as a database.
Where can I see a comparison of hledger, Ledger, beancount, and the rest?
Glad you asked! See below, and also comparisons. hledger's FAQ discusses differences from Ledger, Beancount docs probably do too.
| |---------------------------------------------------|--------------|---------------------------------------------------------------------------------------------------------------:|-------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------: | Project, start date | Last release | Code, committers | Mail list, size | Chat, size | Ledger, 2003 | 2016/01 | C++ 142 | ledger-cli 650 | #ledger 100 | hledger, 2007 | 2017/12 | Haskell 75 | hledger 120 | #hledger 50 | Beancount, 2008 | | Python 17 | beancount 170 | #beancount 10 | Abandon, 2013 | 2017/05 | Scala 12 | | gitter | Ledger in Go, 2013 | 2017/12 | Go 5 | | | Tackler, 2017 | 2018/01 | Scala 1 | | gitter | .Net Ledger, 2017 | 2017/12 | C# 1 | | gitter
Inactive:
| |---------------------------------------------------|--------------|---------------------------------------------------------------------------------------------------------------:|-------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------: | Project, start date | Last release | Code | uledger, 2015 | | Python | pacioli, 2013 | | Python | ledger.pl, 2013 | | Perl | Penny, 2012 | 2014 | Haskell | UMM, 2009 | 2010 | Haskell | cl-ledger, 2007 | | Common Lisp | sm-Ledger, 2007 | | Squeak Smalltalk
- hledger-diff report differing transactions between two journals
- hledger-interest generate *ledger interest transactions
- hledger-irr calculate an account's internal rate of return over time
- ledger-tutorials convert Pete Keen's tutorials to ebook format
- Ledger and hledger have CSV conversion built in. Also:
- banks2ledger - CSV to *ledger converter
- bean-identify, bean-extract, bean-file - Beancount built-in tools
- beancount-import CSV to beancount converter (curses)
- beancount-ynab You Need A Budget to beancount converter
- csv2beancount CSV to beancount converter
- gnucash-to-beancount GnuCash to beancount converter
- gnucash2ledger.py GNUCash to *ledger converter
- grisbi2Ledger Grisbi to *ledger converter
- icsvledger CSV to *ledger converter
- into-ledger CSV to *ledger converter
- ledger-autosync OFX download, OFX to *ledger conversion, deduplication
- ledger-get-prices download market prices
- ledger-reconciler automatically download and reconcile your ledger financial entries
- ledger2beancount.py *ledger to beancount converter
- ledgerbil schedule recurring txns, interactive reconcile, date sorting
- outofit QuickBooks to *ledger converter
- plaid2qif Download transactions from plaid as QIF or CSV files
- plaid2text Plaid API to *ledger/beancount download/conversion
- qb2ledger QuickBooks General Journal CSV to *ledger converter
- QIFtoLedger (Bank of America's) QIF to *ledger converter
- reckon smart interactive/non-interactive CSV to *ledger converter
- total_recall CSV to *ledger converter
- ynab_to_ledger You Need A Budget to *ledger converter
- Ledger in Go has limport, a CSV to *ledger converter
Grouped by editor. Note these often work quite well for other ledger-likes, not just the one they are named for.
- Atom language-ledger
- Atom ledger
\ - Emacs beancount-mode
- Emacs hledger-mode
- Emacs ledger-mode (also works for hledger, beancount etc.)
\ - VIM hledger-vim
- VIM vim-beancount
- VIM vim-ledger
\ - Sublime sublime-ledger-syntax
\ - TextMate Ledger.tmbundle
\ - Visual Studio Code hledger-vscode
- Visual Studio Code ledger
- Visual Studio Code vscode-beancount
- org2tc org to timeclock converter
- on-modify.timetrack.py taskwarrior hook for timeclock output
- t ledger timeclock shellscript
- tim time logging and reporting tool using hledger
- bean-add interactive transaction entry
- hledger add interactive transaction entry (built-in command)
- ledger-add interactive transaction entry
- ledger-plot interactive helper for making charts with GNUplot
- ledger xact history-aware transaction generator (built-in command)
- recurring show/add recurring entries using Ledger
- hledger-iadd curses UI for transaction entry
- hledger-ui curses UI for browsing (demo)
- regdel curses UI for browsing (Ledger)
- ledgerhelpers GTK GUI tools + helper library (Python)
- fava web UI for browsing (Python, beancount, demo)
- hledger-web web UI for browsing, data entry (Haskell, demo)
- hledger-web on Sandstorm free web instances in a few clicks
- Ledger Web web-based, postgres-backed reporting system
- ledger-dashboard web UI for browsing, data entry (Python)
- ledger-web web UI for browsing (JavaScript)
- ledgible web UI for browsing, data entry (Python, demo)
- WealthPulse web UI for browsing, price fetching (F#, Ledger)
- Ledger in Go has lweb, a web UI for browsing transactions, reports, and porfolios
- hledger-api JSON API + static file server (Haskell)
- ledgerhelpers extends Ledger's python library (Python)
- node-hledger Node.js API (JavaScript)
- sassetti command-line wrapper (Common Lisp)
#plaintextaccounting, #ledgercli, #hledger, #beancount, @LedgerTips
- Ledger manuals
- Ledger wiki
- Ledger CLI cheatsheet
- Getting Started With Ledger
- hledger User Guide
- Beancount docs (sphinx version)
- Beancount Syntax Cheatsheet
- Don’t Sink Your First Attempts at Plaintext Accounting
- Syntax Quick Reference for the Ledger-Likes
- Command-line Accounting in Context
- The Double-Entry Counting Method
- Misc. accounting intros
- Accounting for Dragons
- Matthias Kauer: Command Line Accounting – A look at the various ledger ports 2015
- Another Ledger user's perspective 2015
- Martin Blais: A Comparison of Beancount and Ledger 2014
- ledger vs hledger vs beancount or how to choose the right cli client 2014
- Simon Michael: hledger & Ledger 2014
- Omari Norman: Why Penny 2013
- Fabrice Niessen: Why Ledger? 2010
- Ledger CLI Accounting for Geeks 2014
- Hacking Your Finances for Fun and Profit 2013
- Ledger and Text based Accounting 2009
- Colin Dean: Plaintext Accounting with the ledger ecosystem 2017
- Colin Dean: Plain Text Accounting 2017
- Austin Walker: Conquering Your Finances with Emacs and Ledger 2016
- FLOSS Weekly 375: hledger (youtube, 3m overview) 2016
- Evolution of ledger 2015
- Evolution of hledger 2015
- FLOSS Weekly 150: Ledger (youtube) 2011
- Accounting course by Prof. Krug 2011
- Khan Academy: Accounting and financial statements
- David Mitchell: Personal Debts
- Michael Walker: Visualise your finances with hledger, InfluxDB, and Grafana 2017
- Brady Trainor: Hledger web 2017
- Karan Ahuja: Hledger Improvements Wishlist. 2016
- Alex Johnstone: Managing my personal finances with beancount 2016
- Stefano Rodighiero: hledger-dupes 2015
- Matthew Turland: Ledger basics and habits 2014
- Simon Michael: What is hledger? 2013
- Simon Michael: More on ledger 2013
- Simon Michael: Introducing hledger! 2013
- Joey Hess: hledger 2012
- Gene Goykhman: An Alternative to QuickBooks 2012
- LWN.net: The accounting quest: Ledger 2012
- Pete Keen: A Robust Reporting System for Ledger 2012
- Pete Keen: Program your Finances: Automated Transactions 2011
- Sascha Welter: Doing my own accounting 2011
- Clint Adams: Accounting at SFLC 2011
- Pete Keen: Program your Finances: Vacation Tracking 2011
- Pete Keen: Program your Finances: Reporting for Fun and Profit 2011
- Christine Spang: [h]ledger rocks my world 2010
- Pete Keen: Program your Finances: Command-line Accounting (& intro) 2010
- Joe Barr: Ledger, the bran muffin of accounting tools 2006
- sample chart of accounts for a freelancer
- Beancount Cookbook: Account Naming Conventions
- Mint: Ways to Categorize Your Spending
- account structure
- Simplified version of double-entry bookkeeping for personal and business finance?
- hledger Step by Step: basic data entry
- ledger-mode:
C-c C-a
add a transaction,
C-c C-b
amount calculator,
C-c C-c
/C-c C-e
toggle cleared - Beancount: Command Line Accounting Cookbook
- hledger Cookbook: Use another account separator character
- Accounting bookkeeping entries
- ledger-envelope-generator.rb
- UI tools
- Ledger: The convert command
- hledger: CSV format
- hledger Cookbook: Convert CSV files
- Importing External Data in Beancount
- Fetching Prices in Beancount
- Payment matching done right
- import tools
- ledger-mode:
C-c C-r
- How to use ledger(1) to reconcile your chequebook with your bank statement
- How to use ledger(1) to reconcile your payments with your payment processor
- example queries for Beancount
- hledger Cookbook: Rewrite account names
- Report Scripts for Ledger CLI with Gnuplot
Budget reporting with Ledger's periodic transactions:
Budget reporting with hledger-budget:
Envelope budgeting with ordinary accounts:
Envelope budgeting with Ledger's automated transactions:
- bsilvereagle: Envelope Budgeting with ledger
- Pete Keen: Program Your Finances: Envelope Budgeting
- Marcin Borkowski: Ledger – virtual postings aka envelopes
Envelope budgeting with automated transactions, org & babel:
- Org tutorials: Weaving a budget with Org & ledger
- Alan Schmitt: Using Org for Ledger Reports and Budget
- Peter Selinger: Tutorial on multiple currency accounting
- ledger-currencies tutorial
- Understanding the valuation function and the market function
- Sharing Expenses in Beancount
- Keeping (financial) score with Ledger
- Program Your Finances: Automated Transactions
- How to keep control of shared expenses inside marriage?
- How to use ledger(1) to split shared expenses
- How to use ledger(1) to track US income taxes
- Another Ledger user's perspective
- hledger Cookbook: Rewrite account names
- Ledger: Time Keeping
- hledger: Timeclock files
- hledger: Timedot files
- Timetracking and billing with (h)ledger
- time tracking tools
-
Ledger Python 3 Support Python
-
ledgerhelpers Python
-
hledger-lib, hledger, an example Haskell
-
hledger-api, examples JSON
-
node-hledger JavaScript
\(c) 2016-2017 [Joyful Systems](http://joyful.com) & co. | Send updates via [github](https://github.com/plaintextaccounting/plaintextaccounting.github.io) ([latest changes](https://github.com/plaintextaccounting/plaintextaccounting.github.io/commits/master))