2.4 KiB
| author | date | title | |
|---|---|---|---|
|
monthyear | hledger(1) hledger version |
web({{ versions({{hledger}}) toc }})
man({{
NAME
hledger - a command-line accounting tool
SYNOPSIS
hledger [-f FILE] COMMAND [OPTIONS] [CMDARGS]
hledger [-f FILE] ADDONCMD -- [OPTIONS] [CMDARGS]
DESCRIPTION
hledgerdescription Tested on unix, mac, windows, hledger aims to be a reliable, practical tool for daily use. }})
This is hledger’s command-line interface (there are also curses and web interfaces). Its basic function is to read a plain text file describing financial transactions (in accounting terms, a general journal) and print useful reports on standard output, or export them as CSV. hledger can also read some other file formats such as CSV files, translating them to journal format. Additionally, hledger lists other hledger-* executables found in the user’s $PATH and can invoke them as subcommands.
hledger reads files If using $LEDGER_FILE, note
this must be a real environment variable, not a shell variable. You can
specify standard input with -f-.
Transactions are dated movements of money between two (or more) named accounts, and are recorded with journal entries like this:
journal({{ 2015/10/16 bought food expenses:food $10 assets:cash }})
For more about this format, see hledger_journal(5).
Most users use a text editor to edit the journal, usually with an editor mode such as ledger-mode for added convenience. hledger’s interactive add command is another way to record new transactions. hledger never changes existing transactions.
To get started, you can either save some entries like the above in
~/.hledger.journal, or run hledger add and
follow the prompts. Then try some commands like
hledger print or hledger balance. See COMMANDS
and EXAMPLES below.
include(examples.m4.md) include(options.m4.md) include(queries.m4.md) include(commands.m4.md) include(troubleshooting.m4.md) man({{
ENVIRONMENT
COLUMNS The screen width used by the register command. Default: the full terminal width.
LEDGER_FILE
FILES
Reads files
BUGS
The need to precede options with -- when invoked from
hledger is awkward.
hledger can’t render non-ascii characters when run from a Windows command prompt (up to Windows 7 at least).
When input data contains non-ascii characters, a suitable system locale must be configured (or there will be an unhelpful error). Eg on POSIX, set LANG to something other than C.
}})