commands.sh

hledger accounts

all

List account names.

More info →

Options (5)

boolean

Show all accounts used or declared in the default journal file

Example: hledger {{[acc|accounts]}}
-u, --usedboolean

Show accounts used by transactions

Example: hledger {{[acc|accounts]}} {{[-u|--used]}}
-d, --declaredboolean

Show accounts declared with account directives

Example: hledger {{[acc|accounts]}} {{[-d|--declared]}}
-t, --treeboolean

Show the first two levels of the accounts hierarchy

Example: hledger {{[acc|accounts]}} {{[-t|--tree]}} {{[-2|--depth 2]}}
-2boolean

Show the first two levels of the accounts hierarchy

Example: hledger {{[acc|accounts]}} {{[-t|--tree]}} {{[-2|--depth 2]}}

Examples (7)

Show all accounts used or declared in the default journal file

hledger [acc|accounts]

Show accounts used by transactions

hledger [acc|accounts] [-u|--used]

Show accounts declared with account directives

hledger [acc|accounts] [-d|--declared]

Add new account directives, for accounts used but not declared, to the journal

hledger [acc|accounts] --undeclared --directives >> 2024-accounts.journal

Show accounts with `asset` in their name, and their declared/inferred types

hledger [acc|accounts] asset --types

Show accounts of the `Asset` type

hledger [acc|accounts] type:A

Show the first two levels of the accounts hierarchy

hledger [acc|accounts] [-t|--tree] [-2|--depth 2]
made by @shridhargupta | data from tldr-pages