hledger/hledger/hledger_commands.m4.md
2020-02-06 17:52:37 -08:00

4.8 KiB
Raw Blame History

COMMANDS

hledger provides a number of subcommands; hledger with no arguments shows a list.

If you install additional hledger-* packages, or if you put programs or scripts named hledger-NAME in your PATH, these will also be listed as subcommands.

Run a subcommand by writing its name as first argument (eg hledger incomestatement). You can also write one of the standard short aliases displayed in parentheses in the command list (hledger b), or any any unambiguous prefix of a command name (hledger inc).

Here are all the builtin commands in alphabetical order. See also hledger for a more organised command list, and hledger CMD -h for detailed command help.

accounts

include(Hledger/Cli/Commands/Accounts.md)

activity

include(Hledger/Cli/Commands/Activity.md)

add

include(Hledger/Cli/Commands/Add.md)

balance

include({{Hledger/Cli/Commands/Balance.md}})

balancesheet

include({{Hledger/Cli/Commands/Balancesheet.md}})

balancesheetequity

include({{Hledger/Cli/Commands/Balancesheetequity.md}})

cashflow

include({{Hledger/Cli/Commands/Cashflow.md}})

check-dates

include({{Hledger/Cli/Commands/Checkdates.md}})

check-dupes

include({{Hledger/Cli/Commands/Checkdupes.md}})

close

include({{Hledger/Cli/Commands/Close.md}})

commodities

include({{Hledger/Cli/Commands/Commodities.md}})

descriptions

include({{Hledger/Cli/Commands/Descriptions.md}})

diff

include({{Hledger/Cli/Commands/Diff.md}})

files

include({{Hledger/Cli/Commands/Files.md}})

help

include({{Hledger/Cli/Commands/Help.md}})

import

include({{Hledger/Cli/Commands/Import.md}})

incomestatement

include({{Hledger/Cli/Commands/Incomestatement.md}})

notes

include({{Hledger/Cli/Commands/Notes.md}})

payees

include({{Hledger/Cli/Commands/Payees.md}})

prices

include({{Hledger/Cli/Commands/Prices.md}})

print

include({{Hledger/Cli/Commands/Print.md}})

print-unique

include({{Hledger/Cli/Commands/Printunique.md}})

register

include({{Hledger/Cli/Commands/Register.md}})

register-match

include({{Hledger/Cli/Commands/Registermatch.md}})

rewrite

include({{Hledger/Cli/Commands/Rewrite.md}})

roi

include({{Hledger/Cli/Commands/Roi.md}})

stats

include({{Hledger/Cli/Commands/Stats.md}})

tags

include({{Hledger/Cli/Commands/Tags.md}})

test

include({{Hledger/Cli/Commands/Test.md}})

Add-on Commands

hledger also searches for external add-on commands, and will include these in the commands list. These are programs or scripts in your PATH whose name starts with hledger- and ends with a recognised file extension (currently: no extension, bat,com,exe, hs,lhs,pl,py,rb,rkt,sh).

Add-ons can be invoked like any hledger command, but there are a few things to be aware of. Eg if the hledger-web add-on is installed,

  • hledger -h web shows hledgers help, while hledger web -h shows hledger-webs help.

  • Flags specific to the add-on must have a preceding -- to hide them from hledger. So hledger web --serve --port 9000 will be rejected; you must use hledger web -- --serve --port 9000.

  • You can always run add-ons directly if preferred: hledger-web --serve --port 9000.

Add-ons are a relatively easy way to add local features or experiment with new ideas. They can be written in any language, but haskell scripts have a big advantage: they can use the same hledger (and haskell) library functions that built-in commands do, for command-line options, journal parsing, reporting, etc.

Two important add-ons are the hledger-ui and hledger-web user interfaces. These are maintained and released along with hledger:

ui

hledger-ui provides an efficient terminal interface.

web

hledger-web provides a simple web interface.

Third party add-ons, maintained separately from hledger, include:

iadd

hledger-iadd is a more interactive, terminal UI replacement for the add command.

interest

hledger-interest generates interest transactions for an account according to various schemes.

A few more experimental or old add-ons can be found in hledgers bin/ directory. These are typically prototypes and not guaranteed to work.