LinuxCommandLibrary

hledger-ui

Browse and visualize hledger journal files

TLDR

Start in the main menu screen, reading from the default journal file

$ hledger-ui
copy

Start with a different color theme
$ hledger-ui --theme [terminal|greenterm|dark]
copy

Start in the balance sheet accounts screen, showing hierarchy down to level 3
$ hledger-ui --bs [[-t|--tree]] [[-3|--depth 3]]
copy

Start in this account's screen, showing cleared transactions, and reload on change
$ hledger-ui --register [assets:bank:checking] [[-C|--cleared]] [[-w|--watch]]
copy

Read two journal files, and show amounts as current value when known
$ hledger-ui [[-f|--file]] [path/to/2024.journal] [[-f|--file]] [path/to/2024-prices.journal] --value now
copy

Show the manual in Info format, if possible
$ hledger-ui --info
copy

Display help
$ hledger-ui [[-h|--help]]
copy

SYNOPSIS

hledger-ui [OPTION...] [FILE...] [QUERY...]

PARAMETERS

FILE, -f FILE
    Specifies the journal file(s) to load. Defaults to `~/.hledger.journal` or `hledger.journal`.

-p PORT, --port=PORT
    Sets the port for the local web server to listen on. Default is usually 5000.

--host=HOST
    Specifies the host address for the server to bind to (e.g., `127.0.0.1` for local access).

--no-browser
    Prevents hledger-ui from automatically opening a web browser after starting the server.

--refresh
    Enables automatic reloading of data in the UI when the journal files are modified.

--server
    Runs the web server continuously in server mode without exiting after initial requests.

QUERY
    A query string to pre-filter transactions or reports displayed in the UI (e.g., `account:expenses`).

DESCRIPTION

hledger-ui offers a user-friendly, web-based interface for hledger, the robust plain text accounting system. It significantly simplifies the process of interacting with your financial data by abstracting away the intricacies of command-line operations. When invoked, hledger-ui launches a local web server, primarily utilizing hledger-web, and subsequently opens your default web browser to the interface. This setup enables users to effortlessly browse transactions, generate and view various financial reports—such as detailed balances, income and expense statements—and apply powerful filters to their data using intuitive web controls. This tool is specifically designed to make hledger more accessible to individuals who prefer a graphical environment or wish to quickly review their finances without needing to memorize and type numerous hledger command-line arguments. It acts as a powerful, accessible graphical layer over hledger's robust text-based accounting engine.

CAVEATS

Requires both hledger and hledger-web executables to be installed and accessible in the system's PATH.
Runs a local web server, which consumes system resources while active.
Primarily designed for local, personal use; exposing it to the internet without robust security measures is not recommended.
The web interface might not expose every advanced or niche feature available directly via hledger's command-line interface.

DEFAULT PORT AND ACCESS

By default, hledger-ui typically starts its web server on localhost:5000 (or the next available port) and attempts to automatically open your default web browser to this address. If the --no-browser option is used, you will need to manually navigate to the displayed URL in your browser.

CONFIGURATION

While command-line arguments configure specific runs, many global hledger settings, such as default journal file location, default currency, and display preferences, are managed through hledger's configuration files (e.g., ~/.hledger.journal or hledger.conf).

HISTORY

The hledger project, inspired by the Ledger command-line accounting tool, began its development in the early 2000s. As hledger grew in capability, the need for a more accessible, graphical interface became apparent. hledger-web was developed to provide the underlying web server component, and hledger-ui emerged as a convenient wrapper script to easily launch and interact with this web interface. This evolution allowed hledger to reach a broader audience, complementing its powerful text-based core with a user-friendly visual layer.

SEE ALSO

hledger(1), hledger-web(1), hledger-plot(1)

Copied to clipboard