Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

hledger logo

hledger

Robust, friendly, fast,
plain text accounting.
The hledger command line interface. The hledger-ui text user interface. The hledger-web web user interface.



hledger is friendly, fast, and dependable accounting software for tracking money, investments, cryptocurrencies, time, or any countable commodity. It uses human-readable plain text data that you control.

You can import CSV data from banks, or enter data via web/terminal interfaces or your favorite text editor. hledger provides powerful reports and scales smoothly from simple to sophisticated needs. It works well with version control, scripts, and LLMs. Read more at Why hledger ? and FAQ.

A quick example

Transactions are recorded in a plain text file. This simple format, invented by the Ledger project, is the key to understanding Plain Text Accounting and Double Entry Bookkeeping:

; ~/.hledger.journal

2025-12-01 Starting balance
    equity            $-1000     ; <- $1000 moves from (-) the "equity" account
    assets:checking    $1000     ; <- to (+) the "assets:checking" account

2025-12-02 Grocery store
    assets:checking              ; <- a missing amount is inferred ($-64.50)
    expenses:groceries  $64.50

2025-12-03 Client payment
    income:consulting
    assets:checking    $1500

2025-12-04 Rent
    assets:checking
    expenses:rent     $800

This file is all you need. From it, hledger generates precise reports:

$ hledger aregister assets
Transactions in assets and subaccounts:
2025-12-01 Starting balance   equity                  $1000.00      $1000.00
2025-12-02 Grocery store      ex:groceries             $-64.50       $935.50
2025-12-03 Client payment     in:consulting           $1500.00      $2435.50
2025-12-04 Rent               ex:rent                 $-800.00      $1635.50
$ hledger balance
            $1635.50  assets:checking
           $-1000.00  equity
              $64.50  expenses:groceries
             $800.00  expenses:rent
           $-1500.00  income:consulting
--------------------
                   0
$ hledger is --pretty --tree --daily --row-total --average --begin 2025/12/2
Daily Income Statement 2025-12-02..2025-12-04

┌───────────────────╥────────────┬────────────┬────────────┬──────────┬─────────┐
│                   ║ 2025-12-02 │ 2025-12-03 │ 2025-12-04 │    Total │ Average │
╞═══════════════════╬════════════╪════════════╪════════════╪══════════╪═════════╡
│ Revenues          ║            │            │            │          │         │
├───────────────────╫────────────┼────────────┼────────────┼──────────┼─────────┤
│ income:consulting ║          0 │   $1500.00 │          0 │ $1500.00 │ $500.00 │
├───────────────────╫────────────┼────────────┼────────────┼──────────┼─────────┤
│                   ║          0 │   $1500.00 │          0 │ $1500.00 │ $500.00 │
╞═══════════════════╬════════════╪════════════╪════════════╪══════════╪═════════╡
│ Expenses          ║            │            │            │          │         │
├───────────────────╫────────────┼────────────┼────────────┼──────────┼─────────┤
│ expenses          ║     $64.50 │          0 │    $800.00 │  $864.50 │ $288.17 │
│   groceries       ║     $64.50 │          0 │          0 │   $64.50 │  $21.50 │
│   rent            ║          0 │          0 │    $800.00 │  $800.00 │ $266.67 │
├───────────────────╫────────────┼────────────┼────────────┼──────────┼─────────┤
│                   ║     $64.50 │          0 │    $800.00 │  $864.50 │ $288.17 │
╞═══════════════════╬════════════╪════════════╪════════════╪══════════╪═════════╡
│ Net:              ║    $-64.50 │   $1500.00 │   $-800.00 │  $635.50 │ $211.83 │
└───────────────────╨────────────┴────────────┴────────────┴──────────┴─────────┘
or runs other actions:
$ hledger check --strict
hledger: Error: /Users/simon/.hledger.journal:2:
  | 2025-12-01 Starting balance
2 |     equity                   $-1000
  |                              ^^^^^^
  |     assets:checking           $1000

Strict commodity checking is enabled, and
commodity "$" has not been declared.
Consider adding a commodity directive. Examples:

commodity $1000.00
commodity 1.000,00 $
$ hledger add
Adding transactions to journal file /Users/simon/.hledger.journal
...
Date [2025-12-13]:
Description: groc
Using this similar transaction for defaults:
2025-12-02 Grocery store
    assets:checking            $-64.50
    expenses:groceries          $64.50

Account 1 [assets:checking]:
Amount  1 [$-64.50]: _
$ hledger web
...
Serving web UI and json API at IP address 127.0.0.1 (local access), port 5000
with base url http://127.0.0.1:5000
This server will exit after 2m with no browser windows open (or press ctrl-c)
Opening web browser...

hledger web is a simple web UI you can use locally or over the internet. You can see a read-only instance with more complex data at demo.hledger.org.

Get started

Try it for yourself:

Get involved

Would you like to help ?

Site tips

Use the three-lines button at top left (or the s access key) to toggle the site navigation sidebar.

Access keys: 1 home, 2 changes, s sidebar, t theme, f find, p print, r repo, e edit
You can also press the left or right arrow keys to step through pages.

For quicker browsing, configure these bookmark keywords in your browser:

  • h PAGE -> https://hledger.org/PAGE.html
  • hm TOPIC -> https://hledger.org/hledger.html#TOPIC
  • hs TOPIC -> https://hledger.org/?search=TOPIC
  • hi NUM -> https://github.com/simonmichael/hledger/issues/NUM
  • hinew -> https://github.com/simonmichael/hledger/issues/new