hledger
plain text accounting tool
TLDR
SYNOPSIS
hledger [options] command [args]
DESCRIPTION
hledger is a plain text accounting tool that reads journal files and produces financial reports. It implements double-entry accounting, where every transaction must balance (debits equal credits).
The default journal file is ~/.hledger.journal or the file specified by the LEDGER_FILE environment variable. Journal entries consist of a date, description, and two or more postings (account name and amount). The tool supports multiple currencies, commodity prices, periodic transactions, and CSV import rules.
Reports can be filtered by date range, account name patterns, and description queries. Multi-period reports (--monthly, --quarterly) show changes over time for trend analysis.
PARAMETERS
balance, bal
Show account balances.register, reg
Show transaction register with running total.print
Print journal entries in standard format.add
Add a transaction interactively.incomestatement, is
Show income statement (revenues and expenses).balancesheet, bs
Show balance sheet (assets, liabilities, equity).cashflow, cf
Show cash flow statement.accounts
List account names.stats
Show journal statistics.import
Import new transactions from CSV or other files.-f FILE
Read this journal file instead of the default ($LEDGER_FILE or ~/.hledger.journal).-b DATE
Begin date (include transactions on or after this date).-e DATE
End date (include transactions before this date).-p PERIOD
Period expression (e.g., "monthly", "quarterly", "2024").--monthly, --quarterly, --yearly
Show amounts per time period.--depth N
Limit account display depth.--cost, -B
Convert to cost using transaction prices.--market, -V
Convert to market value using market prices.--output-format FMT
Output format: txt, csv, json, html.--help
Display help information.
CAVEATS
Double-entry accounting requires every transaction to balance, which can be confusing for beginners. Journal file syntax is whitespace-sensitive: account names and amounts must be separated by at least two spaces. The default journal file must exist or be specified with -f or LEDGER_FILE.
HISTORY
hledger was created by Simon Michael in 2007 as a Haskell reimplementation inspired by John Wiegley's Ledger. It aims to be a reliable, portable plain text accounting tool with a focus on usability and documentation.
SEE ALSO
ledger(1), hledger-ui(1), hledger-web(1)
