HLEDGER-UI(1)

๐Ÿ“ฆ
version 1.52.4 ยท 4 versions
, in arch rolling

๐Ÿ’– NAME ๐Ÿ’–

hledger-ui โ€” terminal interface (TUI) for hledger, a robust, friendly plain text accounting app. ๐Ÿซถ

This page is HLEDGER-UI(1), straight outta the hledger User Manuals. ๐Ÿ’…


โœจ SYNOPSIS โœจ

hledger-ui [OPTS] [QUERYARGS]
or
hledger ui [OPTS] [QUERYARGS]

๐ŸŒธ DESCRIPTION ๐ŸŒธ

Okay so this manual is for hledger's terminal interface, version 1.52.4. ๐Ÿ’– Also, bestie, check the hledger manual for common concepts and file formats โ€” it's giving essential context.

hledger is a robust, user-friendly, cross-platform set of programs for tracking money, time, or any other commodity, using double-entry accounting and a simple, editable file format. It's inspired by and largely compatible with ledger(1), and largely interconvertible with beancount(1). No cap, that's the whole vibe. โœจ

hledger-ui is hledger's terminal interface โ€” an efficient full-window text UI for viewing accounts and transactions, plus some limited data entry capability. It's easier than hledger's command-line interface, and sometimes quicker and more convenient than the web interface. Lowkey iconic. ๐Ÿ’…

Like hledger, it reads from (and appends to) a journal file specified by the LEDGER_FILE environment variable (defaulting to $HOME/.hledger.journal); or you can specify files with -f options. It can also read timeclock files, timedot files, or any CSV/SSV/TSV file with a date field. (See hledger(1) -> Input for details.) ๐Ÿฆ‹

Unlike hledger, hledger-ui hides all future-dated transactions by default. They can be revealed, along with any rule-generated periodic transactions, by pressing the F key (or starting with --forecast) to enable "forecast mode". Future you is still main character energy, just hidden until you ask. ๐Ÿ‘‘


๐Ÿ’… OPTIONS ๐Ÿ’…

Any arguments are interpreted as a hledger query which filters the data. hledger-ui provides the following options:

๐ŸŽ€ Flags

  • -w, --watch โ€” watch for data and date changes and reload automatically ๐Ÿ‘€
  • --theme=THEME โ€” use this custom display theme (light, dark, terminal, greenterm) ๐ŸŽจ
  • --cash โ€” start in the cash accounts screen ๐Ÿ’ธ
  • --bs โ€” start in the balance sheet accounts screen ๐Ÿงพ
  • --is โ€” start in the income statement accounts screen ๐Ÿ“Š
  • --all โ€” start in the all accounts screen ๐ŸŒˆ
  • --register=ACCTREGEX โ€” start in the (first matched) account's register ๐Ÿ”Ž
  • --change โ€” show period balances (changes) at startup instead of historical balances ๐Ÿ”„
  • -l, --flat โ€” show accounts as a flat list (default) ๐Ÿ“‹
  • -t, --tree โ€” show accounts as a tree ๐ŸŒณ

๐ŸŒŸ General input/data transformation flags

  • -f, --file=[FMT:]FILE โ€” Read data from FILE, or from stdin if FILE is -, inferring format from extension or a FMT: prefix. Can be specified more than once. If not specified, reads from $LEDGER_FILE or $HOME/.hledger.journal. ๐Ÿ“
  • --rules=RULESFILE โ€” Use rules defined in this rules file for converting subsequent CSV/SSV/TSV files. If not specified, uses FILE.csv.rules for each FILE.csv. ๐Ÿ“œ
  • --alias=A=B|/RGX/=RPL โ€” transform account names from A to B, or by replacing regular expression matches ๐Ÿ”
  • --auto โ€” generate extra postings by applying auto posting rules ("=") to all transactions โš™๏ธ
  • --forecast[=PERIOD] โ€” Generate extra transactions from periodic rules ("~"), from after the latest ordinary transaction until 6 months from now. Or, during the specified PERIOD (the equals is required). Auto posting rules will also be applied to these transactions. In hledger-ui, also make future-dated transactions visible at startup. ๐Ÿ”ฎ
  • -I, --ignore-assertions โ€” don't check balance assertions by default ๐Ÿšซ
  • --txn-balancing=... โ€” how to check that transactions are balanced: 'old': use global display precision; 'exact': use transaction precision (default) โš–๏ธ
  • --infer-costs โ€” infer conversion equity postings from costs ๐Ÿ’ฑ
  • --infer-equity โ€” infer costs from conversion equity postings ๐Ÿงฎ
  • --infer-market-prices โ€” infer market prices from costs ๐Ÿ“ˆ
  • --pivot=TAGNAME โ€” use a different field or tag as account names ๐Ÿ”€
  • -s, --strict โ€” do extra error checks (and override -I) ๐Ÿšจ
  • --verbose-tags โ€” add tags indicating generated/modified data ๐Ÿท๏ธ

๐Ÿ“ General output/reporting flags (supported by some commands)

  • -b, --begin=DATE โ€” include postings/transactions on/after this date ๐Ÿ“…
  • -e, --end=DATE โ€” include postings/transactions before this date (with a report interval, will be adjusted to following subperiod end) ๐Ÿ—“๏ธ
  • -D, --daily โ€” multiperiod report with 1 day interval โ˜€๏ธ
  • -W, --weekly โ€” multiperiod report with 1 week interval ๐Ÿ—“๏ธ
  • -M, --monthly โ€” multiperiod report with 1 month interval ๐ŸŒ™
  • -Q, --quarterly โ€” multiperiod report with 1 quarter interval ๐Ÿ‚
  • -Y, --yearly โ€” multiperiod report with 1 year interval ๐ŸŽ†
  • -p, --period=PERIODEXP โ€” set begin date, end date, and/or report interval, with more flexibility ๐ŸŽ›๏ธ
  • --today=DATE โ€” override today's date (affects relative dates) โฐ
  • --date2 โ€” match/use secondary dates instead (deprecated) โš ๏ธ
  • -U, --unmarked โ€” include only unmarked postings/transactions โšช
  • -P, --pending โ€” include only pending postings/transactions ๐ŸŸก
  • -C, --cleared โ€” include only cleared postings/transactions ๐ŸŸข (-U/-P/-C can be combined)
  • -R, --real โ€” include only non-virtual postings ๐Ÿงฑ
  • -E, --empty โ€” Show zero items, which are normally hidden. In hledger-ui & hledger-web, do the opposite. ๐Ÿซฅ
  • --depth=DEPTHEXP โ€” if a number (or -NUM): show only top NUM levels of accounts. If REGEXP=NUM, only apply limiting to accounts matching the regular expression. ๐Ÿชœ
  • -B, --cost โ€” show amounts converted to their cost/sale amount ๐Ÿ’ฐ
  • -V, --market โ€” Show amounts converted to their value at period end(s) in their default valuation commodity. Equivalent to --value=end. ๐Ÿ“Š
  • -X, --exchange=COMM โ€” Show amounts converted to their value at period end(s) in the specified commodity. Equivalent to --value=end,COMM. ๐Ÿ’ฑ
  • --value=WHEN[,COMM] โ€” show amounts converted to their value on the specified date(s) in their default valuation commodity or a specified commodity. WHEN can be: 'then': value on transaction dates; 'end': value at period end(s); 'now': value today; YYYY-MM-DD: value on given date. ๐Ÿ•ฐ๏ธ
  • -c, --commodity-style=S โ€” Override a commodity's display style. Eg: -c '.' or -c '1.000,00 EUR' ๐ŸŽ€
  • --pretty[=YN] โ€” Use box-drawing characters in text output? Can be 'y'/'yes' or 'n'/'no'. If YN is specified, the equals is required. ๐Ÿ–ผ๏ธ

โœจ General help flags

  • -h, --help โ€” show command line help ๐Ÿ†˜
  • --tldr โ€” show command examples with tldr ๐Ÿ“
  • --info โ€” show the manual with info ๐Ÿ“–
  • --man โ€” show the manual with man ๐Ÿ“š
  • --version โ€” show version information ๐Ÿ”–
  • --debug=[1-9] โ€” show this much debug output (default: 1) ๐Ÿ›
  • --pager=YN โ€” use a pager when needed ? y/yes (default) or n/no ๐Ÿ“„
  • --color=YNA, --colour โ€” use ANSI color ? y/yes, n/no, or auto (default) ๐ŸŒˆ

With hledger-ui, the --debug option sends debug output to a hledger-ui.log file in the current directory. ๐Ÿซถ

If you use the bash shell, you can auto-complete flags by pressing TAB in the command line. If this is not working see Install > Shell completions. โŒจ๏ธ


๐Ÿ–ฑ๏ธ MOUSE ๐Ÿ–ฑ๏ธ

In most modern terminals, you can navigate through the screens with a mouse or touchpad:

  • Use mouse wheel or trackpad to scroll up and down ๐ŸŒ€
  • Click on list items to go deeper ๐Ÿ‘†
  • Click on the left margin (column 0) to go back. โฌ…๏ธ

๐Ÿ”‘ KEYS ๐Ÿ”‘

Okay bestie, the keyboard is where the real power lives. Mouse is cute, keys are iconic. ๐Ÿ’…

? pulls up a help dialog listing all the keys. (Some of them also show up in the quick help down at the bottom of each screen, so you're never fully lost.) Press ? again โ€” or ESCAPE, or LEFT, or q โ€” to close it. The following keys work on most screens:

The cursor keys navigate, obviously: RIGHT or ENTER goes deeper ๐Ÿ•ณ๏ธ, LEFT goes back to the previous screen, and UP/DOWN/PGUP/PGDN/HOME/END move you up and down through lists. J/K jump down/up 10 items at a time, because scrolling one by one is giving "loading screen" energy. Emacs-style (CTRL-p/CTRL-n/CTRL-f/CTRL-b) and VI-style (k,j,l,h) movement keys are supported too. Everyone eats. ๐Ÿฝ๏ธ

Tip: movement speed is limited by your keyboard repeat rate โ€” so if you wanna go faster you may want to adjust it. On a mac, the Karabiner app is one way to do that.

/ lets you set a general filter query limiting the data shown, using the same query terms as in hledger and hledger-web. While you're editing the query, you can use CTRL-a/e/d/k, BS, cursor keys; press ENTER to set it, or ESCAPE to cancel. There are also keys for quickly adjusting some common filters like account depth and transaction status (more on those below ๐Ÿ‘‡). BACKSPACE or DELETE removes all filters, showing all transactions. Clean slate, fresh start, we love to see it. โœจ

Like I said earlier, by default hledger-ui hides future transactions โ€” both ordinary transactions recorded in the journal, and periodic transactions generated by rule. F toggles forecast mode, where future/forecasted transactions get shown. ๐Ÿ”ฎ

Pressing SHIFT-DOWN narrows the report period, and pressing SHIFT-UP expands it again. When it's narrowed, the current report period is displayed in the header line, pressing SHIFT-LEFT or SHIFT-RIGHT moves to the previous or next period, and pressing T sets the period to "today". If you're using -w/--watch and viewing a narrowed period containing today, the view will follow any changes in system date (moving to the period containing the new date). (These keys work only with the standard Julian calendar year/quarter/month/week/day periods; they are not affected by a custom report interval specified at the command line.) ๐Ÿ“…

You can also specify a non-standard period with / and a date: query โ€” but heads up, in this case the period is not movable with the arrow keys.

Tip: arrow keys with Shift do not work out of the box in all terminal software. Eg in Apple's Terminal, the SHIFT-DOWN and SHIFT-UP keys must be configured as follows: in Terminal's preferences, click Profiles, select your current profile on the left, click Keyboard on the right, click + and add this for SHIFT-DOWN: \033[1;2B, click + and add this for SHIFT-UP: \033[1;2A. In other terminals (Windows Terminal ?) you might need to configure SHIFT-RIGHT and SHIFT-LEFT to emit \033[1;2C and \033[1;2D respectively.

ESCAPE resets the UI state and jumps back to the top screen, restoring the app's initial state at startup. Or, it cancels minibuffer data entry or the help dialog. It's the "nvm, take me back" key and honestly same. ๐Ÿƒโ€โ™€๏ธ๐Ÿ’จ

CTRL-l redraws the screen and centers the selection if possible (selections near the top won't be centered, since we don't scroll above the top). No cap.

g reloads from the data file(s) and updates the current screen and any previous screens. (With large files, this could cause a noticeable pause. ๐ŸŒ)

I toggles balance assertion checking. Disabling balance assertions temporarily can be useful for troubleshooting. (If hledger-ui was started with a --pivot option, re-enabling balance assertions with the I key also reloads the journal, like g.)

a runs command-line hledger's add command, and reloads the updated file. This allows some basic data entry. ๐Ÿ“

A is like a, but runs the hledger-iadd tool, which provides a terminal interface. This key will be available if hledger-iadd is installed in $path.

E runs $HLEDGER_UI_EDITOR, or $EDITOR, or a default (emacsclient -a "" -nw) on the journal file. With some editors (emacs, vi), the cursor will be positioned at the current transaction when invoked from the register and transaction screens, and at the error location (if possible) when invoked from the error screen. Cursor goes exactly where you need it, we love an editor with aim. ๐ŸŽฏ

B toggles cost mode, showing amounts converted to their cost's commodity (see hledger manual > Cost reporting).

V toggles value mode, showing amounts converted to their market value (see hledger manual > Valuation flag). More specifically:

  1. By default, the V key toggles showing end value (--value=end) on or off. The valuation date will be the report end date if specified, otherwise today.
  2. If you started hledger-ui with some other valuation (such as --value=then,EUR), the V key toggles that off or on.

Cost/value tips:

  • When showing end value, you can change the report end date without restarting, by pressing / and adding a query like date:..YYYY-MM-DD.
  • Either cost mode, or value mode, can be active, but not both at once. Cost mode takes precedence. ๐Ÿ‘‘
  • There's not yet any visual indicator that cost or value mode is active, other than the amount values. (iykyk vibes only, the numbers are the whole personality.)

q quits the application. Bye bestie, slay, see you never (until you run it again). ๐Ÿ‘‹

Additional screen-specific keys are described below.


๐Ÿ–ฅ๏ธ SCREENS ๐Ÿ–ฅ๏ธ

At startup, hledger-ui shows a menu screen by default. From here you can navigate to other screens using the cursor keys: UP/DOWN to select, RIGHT to move to the selected screen, LEFT to return to the previous screen. Or you can use ESC to return directly to the top menu screen. ๐Ÿงญ

You can also use a command line flag to specific a different startup screen (--cs, --bs, --is, --all, or --register=ACCT).

This is the top-most screen. From here you can navigate to several screens listing accounts of various types. Note some of these may not show anything until you have configured account types. (No data? No vibes. Configure first, bestie.)

๐Ÿ’ธ Cash accounts screen

This screen shows "cash" (ie, liquid asset) accounts (like hledger balancesheet type:c). It always shows balances (historical ending balances on the date shown in the title line).

โš–๏ธ Balance sheet accounts screen

This screen shows asset, liability and equity accounts (like hledger balancesheetequity). It always shows balances.

๐Ÿ“ˆ Income statement accounts screen

This screen shows revenue and expense accounts (like hledger incomestatement). It always shows changes (balance changes in the period shown in the title line).

๐Ÿ—‚๏ธ All accounts screen

This screen shows all accounts in your journal (unless filtered by a query; like hledger balance). It shows balances by default; you can toggle showing changes with the H key.

๐Ÿ“’ Register screen

This screen shows the transactions affecting a particular account. Each line represents one transaction, and shows:

  • the other account(s) involved, in abbreviated form. (If there are both real and virtual postings, it shows only the accounts affected by real postings.)
  • the overall change to the current account's balance; positive for an inflow to this account, negative for an outflow.
  • the running total after the transaction. With the H key you can toggle between
    • the period total, which is from just the transactions displayed
    • or the historical total, which includes any undisplayed transactions before the start of the report period (and matching the filter query if any). This will be the running historical balance (what you would see on a bank's website, eg) if not disturbed by a query.

Note, this screen combines each transaction's in-period postings to a single line item, dated with the earliest in-period transaction or posting date (like hledger's aregister). So custom posting dates can cause the running balance to be temporarily inaccurate. (See hledger manual > aregister and posting dates.) ๐Ÿ˜ญ it's fine, it's documented, it's fine.

Transactions affecting this account's subaccounts will be included in the register if the accounts screen is in tree mode, or if it's in list mode but this account has subaccounts which are not shown due to a depth limit. In other words, the register always shows the transactions contributing to the balance shown on the accounts screen. Tree mode/list mode can be toggled with t here also.

U toggles filtering by unmarked status, showing or hiding unmarked transactions. Similarly, P toggles pending transactions, and C toggles cleared transactions. (By default, transactions with all statuses are shown; if you activate one or two status filters, only those transactions are shown; and if you activate all three, the filter is removed. So the third toggle just yeets the whole filter, iconique.)

R toggles real mode, in which virtual postings are ignored.

z toggles nonzero mode, in which only transactions posting a nonzero change are shown (hledger-ui shows zero items by default, unlike command-line hledger). Zero items are NOT it, turn on z if you're a hater. ๐Ÿ’€

Press RIGHT to view the selected transaction in detail.

๐Ÿงพ Transaction screen

This screen shows a single transaction, as a general journal entry, similar to hledger's print command and journal format (hledger_journal(5)).

The transaction's date(s) and any cleared flag, transaction code, description, comments, along with all of its account postings are shown. Simple transactions have two postings, but there can be more (or in certain cases, fewer).

UP and DOWN will step through all transactions listed in the previous account register screen. In the title bar, the numbers in parentheses show your position within that account register. They will vary depending on which account register you came from (remember most transactions appear in multiple account registers). The #N number preceding them is the transaction's position within the complete unfiltered journal, which is a more stable id (at least until the next reload).

On this screen (and the register screen), the E key will open your text editor with the cursor positioned at the current transaction if possible.

๐Ÿšจ Error screen

This screen will appear if there is a problem, such as a parse error, when you press g to reload. Once you have fixed the problem, press g again to reload and resume normal operation. (Or, you can press escape to cancel the reload attempt.) We do not panic, we read the error, we fix, we reload, we move on. Main character energy. ๐Ÿ’…โœจ

๐Ÿฆ‹ WATCH MODE ๐Ÿฆ‹

okay so this is genuinely one of hledger-ui's best features and I need you to be seated for it: the auto-reloading -w/--watch mode. bestie. with this flag on, it just updates the display automatically whenever changes get saved to the data files. no refresh button, no drama, it just knows. โœจ

this is SO useful when you're reconciling, like actually life-changing. the workflow that slaps is: have your bank's online register open in a browser window for reference, the journal file open in an editor window, and hledger-ui in watch mode chilling in a terminal window. it's giving three-window main character energy:

$ hledger-ui --watch --register checking -C

as you mark things cleared in the editor, you see the effect immediately โ€” no context switching, no mental gymnastics. that leaves so much more mental bandwidth for your accounting, which is the whole point. ๐Ÿ‘‘

and no cap, you can still interact with hledger-ui whenever you want โ€” toggle cleared mode, explore the history, all of it. watch mode doesn't lock you out or anything. ๐Ÿ’…

--watch problems

BUT. ๐Ÿ˜ญ there are limitations and unresolved bugs with --watch, and I'm gonna be real with you about them:

  • it may not work at all for you, depending on platform or system configuration. on some unix systems, increasing fs.inotify.max_user_watches or fs.file-max parameters in /etc/sysctl.conf might help. (#836)
  • it may not detect changes made from outside a virtual machine, ie by an editor running on the host system.
  • it may not detect file changes on certain less common filesystems.
  • it may use increasing CPU and RAM over time, especially with large files. (this is probably not --watch specific โ€” you may be able to reproduce it by pressing g repeatedly.) (#1825)

tips and workarounds, because I would never leave you hanging:

  • if --watch won't work for you, press g to reload data manually instead. lowkey iconic fallback tbh.
  • if --watch is leaking resources over time, quit and restart (or suspend and resume) hledger-ui when you're not using it.
  • when running hledger-ui inside a VM, also make file changes inside the VM.
  • when working with files mounted from another machine, make sure the system clocks on both machines are roughly in agreement. โฐ

๐ŸŒธ ENVIRONMENT ๐ŸŒธ

  • LEDGER_FILE โ€” the main journal file to use when it's not specified with -f/--file. default: $HOME/.hledger.journal. ๐ŸŽ€

๐Ÿ’€ BUGS ๐Ÿ’€

we welcome bug reports, fr fr โ€” drop them in the hledger issue tracker (https://bugs.hledger.org), or on the hledger chat or mail list (https://hledger.org/support). we're nice about it, I promise. ๐Ÿซถ

some known issues, so you're not surprised:

  • -f- doesn't work (hledger-ui can't read from stdin). rude, I know.
  • --watch is not robust, especially with large files (see WATCH MODE above).
  • if you press g with large files, there could be a noticeable pause with the UI unresponsive. just... give it a sec. ๐Ÿ™ˆ

๐Ÿ‘‘ AUTHORS ๐Ÿ‘‘

Simon Michael <simon@joyful.com> and contributors. See http://hledger.org/CREDITS.html


Copyright 2007-2023 Simon Michael and contributors.


โญ LICENSE โญ

Released under GNU GPL v3 or later.


๐Ÿฆ‹ SEE ALSO ๐Ÿฆ‹

hledger(1), hledger-ui(1), hledger-web(1), ledger(1)


and that's the whole page, bestie! this edition is hledger-ui-1.52.4, dated August 2026 โ€” screenshot it, bookmark it, tattoo it on your forearm, whatever works. now go reconcile something and slay. ๐Ÿ’–โœจ๐ŸŽ€

๐Ÿ“ฆ where this page comes from