LinuxCommandLibrary

hledger-aregister

Show register-style report of account transactions

TLDR

Show transactions and running balance in the assets:bank:checking account

$ hledger [[areg|aregister]] assets:bank:checking
copy

Show transactions and running balance in the first account named *savings*
$ hledger [[areg|aregister]] savings
copy

Show the checking account's cleared transactions, with a specified width
$ hledger [[areg|aregister]] checking [[-C|--cleared]] [[-w|--width]] [120]
copy

Show the checking register, including transactions from forecast rules
$ hledger [[areg|aregister]] checking --forecast
copy

SYNOPSIS

hledger aregister [OPTIONS] [ACCTREGQUERY]

PARAMETERS

-f --file FILE
    use different journal file(s)

--aliases FILE
    use this account aliases file

-b --begin DATE
    start date to report from (overrides query)

-e --end DATE
    end date to report through (overrides query)

--period PERIOD
    report period (overrides begin/end)

--today
    use today's date as default end date

-c --cost
    show amounts as their current market value

--historical
    include historical posts of opens/closes

--infer-market-prices
    infer market prices from transactions

-S --status (cleared|pending|uncleared)
    filter by posting status (overrides query)

--invert
    reverse sign of amounts

--no-total
    suppress the register total

--sort (date|postdate|amount|payee|account|type)
    sort register lines by column

-h --help
    show help

-V --version
    show version

DESCRIPTION

hledger-aregister displays a register of individual postings (not full transactions) filtered to those matching the specified accounts or queries, presented consecutively without the blank separating lines found in hledger register. This flattened view is ideal for generating compact lists of all activity in an account, payee, or other query criteria, suitable for import into spreadsheets or further processing.

Like other hledger commands, it supports powerful queries combining account patterns (eg: assets:bank), date ranges (date:2023), payees (desc:supermarket), amounts (amt:>100), and more. Output columns typically show date, description, account, amount; customizable with options.

Common uses include quick account activity reviews, transaction exports, or scripting reports. It ignores cleared/pending status by default but can filter with status queries. Transactions are read from journal files, supporting multi-file inputs and historical balancing.

Differences from hledger register: no txn separation, focuses on account matches, equivalent to register --flat. Supports all standard hledger queries and most register options for flexible reporting.

CAVEATS

Shows postings only, omitting full transaction context; use hledger register for transaction views. Account patterns in args must match exactly or use queries. No built-in pagination for large outputs.

QUERY EXAMPLES

hledger aregister assets:bank
hledger aregister date:2023 amt:>0
hledger aregister payee:Amazon -2

OUTPUT FORMAT

Tab-separated: date | description | account | amount. Pipe to csvkit or spreadsheet tools.

HISTORY

Introduced in early hledger versions (~2008) by Simon Michael as part of plain-text accounting tools; evolved with hledger's Haskell rewrite (v0.20+, 2013). Remains stable, with query enhancements in v1.x.

SEE ALSO

hledger(1), hledger-register(1), hledger-balance(1), hledger-print(1)

Copied to clipboard