Correct, fast, intuitive
plain text accounting.

What is this?

hledger is free, high quality Plain Text Accounting software: a fast and light multicurrency double-entry accounting system that uses human-readable, version-controllable plain text files, and runs well on unix, mac and windows.

With it you can track your money, investments, cryptocurrencies, time, inventory, or any other commodity, with a complete history of changes, a documented future-proof data format, and without needing any cloud service or vendor.

I'm Simon Michael, hledger project founder and PTA fan. Welcome!


Why use hledger?

The General FAQ or the plaintextaccounting.org site introduce Plain Text Accounting.

Compared to other PTA apps, hledger has a strong focus on ease of use and practicality for day-to-day accounting. It prioritises "just works" and accessible documentation, and is actively maintained, with a lively chat. It supports most Ledger and Beancount features but omits some of the more complex ones (value expression language, implicit lot matching).

Non-programmers will enjoy hledger's built-in financial statements, multi-period reports, choice of user interfaces, easy CSV import system and general robustness.

Programmers may appreciate its speed (25k txn/s on a macbook air m1), accuracy (up to 255 decimal places), reliability (1100+ tests, $100 bounty for regressions), powerful scriptability/embeddability and clean statically-typed Haskell implementation.

Read more: Why hledger ?

(And why might you not use hledger ?

  • If you need a rich GUI above all, you might prefer GnuCash, KMyMoney, or Quickbooks.
  • If you like spreadsheets and don't have a ton of data, you might find those quicker.
  • If you do a lot of advanced trading, or want to hack a lot with Python, also look at Beancount.
  • If you want to mix more code in your financial data, or hack on C++, evaluate Ledger.
  • If you like minimalist unix tools and think all the above are bloat, see pta.
  • If you are mobile-only and don't need version control or flexibility, maybe a phone app will do.
  • If you don't need version control or privacy, but do need friction-free collaboration with financial professionals and institutions, you might prefer a commercial web-based system.)

How to get started?

But in case you click no further, here is a series of (CLI-focussed) examples. If you follow these you have all the essentials, and you can consult the docs for more details and features when needed.

$ brew install hledger    # or apt, choco, but check Install for freshness
$ cat >main.journal    # record a transaction manually from command line
2022-01-01 opening balances as of this date
    assets:bank:checking                $1000
    assets:bank:savings                 $2000
    assets:cash                          $100
    liabilities:creditcard               $-50
    equity:opening/closing balances
$ export LEDGER_FILE=main.journal    # use this file by default
$ echo 'export LEDGER_FILE=main.journal' >>~/.bashrc    # and in future sessions
$ hledger add    # record a transaction interactively
Adding transactions to journal file main.journal
Any command line arguments will be used as defaults.
Use tab key to complete, readline keys to edit, enter to accept defaults.
An optional (CODE) may follow transaction dates.
An optional ; COMMENT may follow descriptions or amounts.
If you make a mistake, enter < at any prompt to go one step backward.
To end a transaction, enter . when prompted.
To quit, enter . at a date prompt or press control-d or control-c.
Date [2022-02-08]: 2/15
Description: market
Account 1: expenses:food
Amount  1: $50
Account 2: assets:cash
Amount  2 [$-50]: 
Account 3 (or . or enter to finish this transaction): 
2022-02-15 market
    expenses:food             $50
    assets:cash              $-50

Save this transaction to the journal ? [y]: 
Starting the next transaction (. or ctrl-D/ctrl-C to quit)
Date [2022-02-15]: 
$ hledger stats    # show journal statistics
Main file                : main.journal
Included files           : 
Transactions span        : 2022-01-01 to 2022-02-16 (46 days)
Last transaction         : 2022-02-15 (7 days from now)
Transactions             : 2 (0.0 per day)
Transactions last 30 days: 0 (0.0 per day)
Transactions last 7 days : 0 (0.0 per day)
Payees/descriptions      : 1
Accounts                 : 6 (depth 3)
Commodities              : 1 ($)
Market prices            : 0 ()

Run time (throughput)    : 0.04s (47 txns/s)
$ hledger bal --monthly    # show account balance changes each month
Balance changes in 2022-01-01..2022-02-28:

                                 ||    Jan   Feb 
 assets:bank:checking            ||  $1000     0 
 assets:bank:savings             ||  $2000     0 
 assets:cash                     ||   $100  $-50 
 equity:opening/closing balances || $-3050     0 
 expenses:food                   ||      0   $50 
 liabilities:creditcard          ||   $-50     0 
                                 ||      0     0 
$ cat >checking.csv    # make some CSV data, as if downloaded from a bank
"2022/2/01","GOODWORKS CORP","-1000.00"
"2022/2/22","PROPERTY MGMT CO","500.00"
"2022/2/23","ATM WITHDRAWAL","-100.00"
$ cat >checking.csv.rules    # and a rules file to help hledger read it
skip 1
fields date, description, amount
account1 assets:bank:checking
currency $
amount   -%amount

 account2 income:salary

 account2 expenses:rent

 account2 assets:cash
$ hledger import checking.csv    # import CSV records as new journal entries
imported 2 new transactions from checking.csv
$ hledger import checking.csv    # records already seen are ignored; cf --dry-run
no new transactions found in checking.csv
$ hledger print date:202202   # show transactions in february
    assets:bank:checking           $1000
    income:salary                 $-1000

2022-02-15 market
    expenses:food             $50
    assets:cash              $-50

    assets:bank:checking           $-500
    expenses:rent                   $500

    assets:bank:checking           $-100
    assets:cash                     $100

$ hledger is -M    # show a monthly income statement (profit & loss report)
Income Statement 2022-01-01..2022-02-28

               || Jan    Feb 
 Revenues      ||            
 income:salary ||   0  $1000 
               ||   0  $1000 
 Expenses      ||            
 expenses:food ||   0    $50 
 expenses:rent ||   0   $500 
               ||   0   $550 
 Net:          ||   0   $450 
$ hledger bs -M --tree    # show monthly asset and liability balances
Balance Sheet 2022-01-31..2022-02-28

                        || 2022-01-31  2022-02-28 
 Assets                 ||                        
 assets                 ||      $3100       $3550 
   bank                 ||      $3000       $3400 
     checking           ||      $1000       $1400 
     savings            ||      $2000       $2000 
   cash                 ||       $100        $150 
                        ||      $3100       $3550 
 Liabilities            ||                        
 liabilities:creditcard ||        $50         $50 
                        ||        $50         $50 
 Net:                   ||      $3050       $3500 
$ hledger areg checking    # show checking's transactions and running balance
Transactions in assets:bank:checking and subaccounts:
2022-01-01 opening balances    as:ba:savings, as..         $1000         $1000
2022-02-01 GOODWORKS CORP      in:salary                   $1000         $2000
2022-02-22 PROPERTY MGMT CO    ex:rent                     $-500         $1500
2022-02-23 ATM WITHDRAWAL      as:cash                     $-100         $1400
$ hledger-ui --forecast   # start the terminal UI (except on Windows)

$ hledger-ui --tree -f examples/bcexample.hledger   # a multicurrency journal

$ hledger-web    # start the web UI

$ hledger-web -f examples/bcexample.hledger    # from data by Martin Blais

Who made this?

hledger is brought to you by Simon Michael, who has been building and relying on this project since 2007, and by 140+ contributors.

We hope you too will find hledger/PTA useful in transforming your relationship with money and time. After enjoying some personal or organisational success with it, you might want to become one of the generous sponsors to help sustain this work.

Where to go next?

Next, you could:

  • Scan through the docs listed in the sidebar to your left. (If it's not visible, click/tap the horizontal-lines icon at top left, or press the s access key.)
  • You can also search this site quickly by using the magnifying-glass icon at top left, or the / access key. (Other access keys on this site: t change theme, 1 home page, 2 recent changes, < previous page, > next page.)
  • Check the FAQ.
  • Do a tutorial: Quick Start, Accounting concepts, or Easy workflow #1, #2, or #3.
  • Become an expert: read or skim the hledger user manual.
  • Or just the COMMON TASKS.
  • Check out the hledger-ui and hledger-web manuals.
  • Browse the blog posts on plaintextaccounting.org.
  • Watch videos, such as hledger fan's beginner lessons.
  • Look at lots of example files.
  • Ask questions/introduce yourself in #hledger chat via matrix or IRC.
  • Browse the mail list.
  • Explore the other Support/Discussion fora.