hledger

plain text accounting,
made easy
(Woah, too much to read ? Here's the quick start.)

hledger is cross-platform accounting software for both power users and folks new to accounting. It's good for tracking money, time, investments, cryptocurrencies, inventory and more. It is a reimplementation of Ledger CLI (I liked Ledger so much, I rebuilt it in Haskell) with a particular focus on ease of use and robustness.

Here are some things it provides out of the box:

hledger is a Plain Text Accounting system. Some strengths of the PTA approach:

  • Runs on your local computer, keeping your financial data private and under your control

  • Simple model of operation: put a log of transactions in, get reports out

  • Simple, expressive, human-readable, future-proof plain text format

  • Can be version controlled, eg with Git, to safeguard your data, track changes, or collaborate

  • Edit with your favourite text editor, or a data entry UI, or import from other formats

  • Easy to script, automate, and integrate into custom workflows

  • Lightweight, fast, non-distracting to use

  • Great for learning more of double-entry bookkeeping and accounting.

Here are some ways in which hledger strives to provide robustness:

  • Robust installation: multiple options are provided for binary and source installation. Building from source is reliable and consistent across platforms.

  • Robust execution: runtime crashes are minimised by Haskell's memory management and strong compile-time type checking. The software is also heavily tested by automated test suites and CI. Failures caused by user input are reported clearly and promptly.

  • Robust features: built-in commands and options combine well with one another, and are expected to do something sensible in all cases, with all kinds of input.

  • Robust calculation: results are expected to always perfectly match what you would calculate on paper, up to 255 decimal places.

  • Robust parsing: dated items, such as balance assertions and balance assignments, are processed in date order. Assertions/assignments with the same date are processed in parse order. Multiple assertions/assignments within a single transaction work as you would expect.

  • Robust reporting: reports are deterministic and not affected by the order of input files or data items except where that is part of their spec.

  • Robust documentation: all functionality is documented precisely, with a mnemonic permalink. Reference manuals for your hledger version are available online, and built in for offline viewing. General and command-specific command line help is provided. We favour documentation-driven development.

hledger is free software, with no purchase price or monthly fees. It is licensed under GNU GPLv3, providing the strongest guarantee that you will always have the right to run, inspect, modify, or share it. It is actively maintained, with regular releases, a large chat room and other support resources.

hledger is modelled after the pioneering Ledger CLI, and will read many Ledger files without change. Ledger users will find the data formats and commands familiar. Though not yet as fast as Ledger, it is quite fast, parsing and analysing (correctly) ~2000 txns/s on a 2013 macbook. Reports normally take a fraction of a second, and hledger-ui updates instantly as you edit.

Usage

You can start with hledger very simply, and get more sophisticated as you learn more about double-entry accounting. Here are some common ways of using it:

Web or terminal UI: Use hledger-web or use hledger-ui to enter transactions and see reports.

Command line: Use hledger add's interactive prompts to enter transactions, run hledger commands to see reports.

Text editor:

Record transactions in a plain text file, perhaps assisted by an editor mode:

; $HOME/.hledger.journal (or $LEDGER_FILE)

2020-01-01 opening balances
    assets:checking         $1234
    equity

2020-03-15 client payment
    assets:checking         $2000
    income:consulting

2020-03-20 Sprouts
    expenses:food:groceries  $100
    assets:cash               $40
    assets:checking

Run hledger commands to report balances, income and expenses, and more:

$ hledger bs
Balance Sheet 2020-03-20

             || 2020-03-20 
=============++============
 Assets      ||            
-------------++------------
 assets      ||      $3134 
   cash      ||        $40 
   checking  ||      $3094 
-------------++------------
             ||      $3134 
=============++============
 Liabilities ||            
-------------++------------
-------------++------------
             ||            
=============++============
 Net:        ||      $3134 

$ hledger is -M
Income Statement 2020-01-01-2020-03-20

                         || Jan  Feb    Mar 
=========================++=================
 Revenues                ||                 
-------------------------++-----------------
 income:consulting       ||   0    0  $2000 
-------------------------++-----------------
                         ||   0    0  $2000 
=========================++=================
 Expenses                ||                 
-------------------------++-----------------
 expenses:food:groceries ||   0    0   $100 
-------------------------++-----------------
                         ||   0    0   $100 
=========================++=================
 Net:                    ||   0    0  $1900 

Automated import: Download CSV files from financial institutions, perhaps using an API like Plaid or Tiller, use hledger's import command to convert and import the new transactions, and use any UI to see reports.

More details

Next, you could:

hledger is brought to you by Simon Michael and 120+ contributors. I've been building and relying on it continuously since 2007; I hope you too will find it helpful in mastering your time and money! When your wealth allows, perhaps you'll feel inspired to become a sponsor and help us do more.

hledger is a rewrite/reboot of the pioneering Ledger. (Why?) Read more about the differences.

hledger strives to be usable, practical and to provide real-world value. Intuitive features, dependable bug-free operation and complete, accurate documentation are top goals.

hledger is first a command-line tool. Your data lives in a plain text journal file which you can edit any way you wish; hledger reads that file and produces reports of various kinds, without changing your data. (It can help you add new transactions, but does not change existing ones.)

hledger also provides a terminal interface that lets you review account balances and transactions quickly and without fuss. (screencast)

And, a zero-setup web app for a more point-and-click experience (demo). Run it on your local machine, or on a server, or set it up with a few clicks on Sandstorm.

hledger is written in Haskell, a modern, highly-regarded programming language which contributes to hledger's robustness, performance and long-term maintainability. Most functionality is exposed as Haskell libraries, making it easy to write your own hledger-compatible scripts, addons and applications.    hledger CI on hackage https://repology.org/badge/version-for-repo/stackage_nighly/hledger.svg

What are some (current) limitations of PTA and hledger ?

  • The "GUIs" are minimalist; there is no rich GUI at the level of Quicken or GNUCash.

  • As a beginner you might feel there's too much freedom, too much to read, yet not enough clear guidance. Some common needs are not yet satisfactorily documented. (Tip: a request in chat often produces a quick result.)

  • hledger doesn't yet calculate capital gains automatically, as Ledger and Beancount can; you must do that semi-manually.

  • hledger is not yet as fast as Ledger.

What is planned for hledger ?

More support for investing, more support for correctness and accounting/business rules, more input/output formats, more speed, more GUI, charts, better getting started experience. See also ROADMAP.

Sponsorship

Building and supporting good software and documentation requires a lot of time and life energy. Maybe these thousands of person-hours have helped you or your organisation ?

Support us financially at any level, to be a part of this project and advance our core mission: helping more people achieve financial literacy and empowerment. Thank you!

  • Sponsor Simon (project leader / broom pusher):
    github liberapay paypal

  • Sponsor the hledger project with your organisation:

  • Sponsor the hledger project as an individual:
    https://opencollective.com/hledger/individual/0/avatar.svg https://opencollective.com/hledger/individual/1/avatar.svg https://opencollective.com/hledger/individual/2/avatar.svg https://opencollective.com/hledger/individual/3/avatar.svg https://opencollective.com/hledger/individual/4/avatar.svg https://opencollective.com/hledger/individual/5/avatar.svg https://opencollective.com/hledger/individual/6/avatar.svg https://opencollective.com/hledger/individual/7/avatar.svg https://opencollective.com/hledger/individual/8/avatar.svg https://opencollective.com/hledger/individual/9/avatar.svg https://opencollective.com/hledger/individual/10/avatar.svg https://opencollective.com/hledger/individual/11/avatar.svg https://opencollective.com/hledger/individual/12/avatar.svg https://opencollective.com/hledger/individual/13/avatar.svg https://opencollective.com/hledger/individual/14/avatar.svg https://opencollective.com/hledger/individual/15/avatar.svg https://opencollective.com/hledger/individual/16/avatar.svg https://opencollective.com/hledger/individual/17/avatar.svg https://opencollective.com/hledger/individual/18/avatar.svg https://opencollective.com/hledger/individual/19/avatar.svg https://opencollective.com/hledger/individual/20/avatar.svg

  • Sponsor specific tasks with bounties:
    all bounties bountysource bounties