From 2139505c02e8f0c7796ff2be1ea95dc361e5783d Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Fri, 7 Jun 2024 07:05:51 -0700 Subject: [PATCH] ;doc: update manuals --- hledger/hledger.1 | 489 +++++++++++++++++++++++- hledger/hledger.info | 875 +++++++++++++++++++++++++++++++------------ hledger/hledger.txt | 431 ++++++++++++++++++++- 3 files changed, 1549 insertions(+), 246 deletions(-) diff --git a/hledger/hledger.1 b/hledger/hledger.1 index 1958ca1e2..a5ad40c6c 100644 --- a/hledger/hledger.1 +++ b/hledger/hledger.1 @@ -7808,6 +7808,14 @@ Show the hledger user manual with \f[CR]info\f[R], \f[CR]man\f[R], or a pager. With a (case insensitive) TOPIC argument, try to open it at that section heading. +.IP +.EX +Flags: + \-i show the manual with info + \-m show the manual with man + \-p show the manual with $PAGER or less + (less is always used if TOPIC is specified) +.EE .PP This command shows the hledger manual built in to your hledger executable. @@ -7844,6 +7852,12 @@ $ hledger help \[aq]time periods\[aq] \-m # use man, even if info is installed .EE .SS demo Play demos of hledger usage in the terminal, if asciinema is installed. +.IP +.EX +Flags: + \-s \-\-speed=SPEED playback speed (1 is original speed, .5 is half, 2 is + double, etc (default: 2)) +.EE .PP Run this command with no argument to list the demos. To play a demo, write its number or a prefix or substring of its title. @@ -7878,6 +7892,11 @@ Runs hledger\-web (if installed). .SH Data entry commands .SS add Record new transactions with interactive prompting in the console. +.IP +.EX +Flags: + \-\-no\-new\-accounts don\[aq]t allow creating new accounts +.EE .PP Many hledger users edit their journals directly with a text editor, or generate them from CSV. @@ -7954,6 +7973,12 @@ Provide answers for the first four prompts: There is a detailed tutorial at https://hledger.org/add.html. .SS import Import new transactions from one or more data files to the main journal. +.IP +.EX +Flags: + \-\-catchup just mark all transactions as already imported + \-\-dry\-run just show the transactions to be imported +.EE .PP This command detects new transactions in each FILE argument since it was last run, and appends them to the main journal. @@ -8098,6 +8123,23 @@ Related: CSV > Amount decimal places. .SH Basic report commands .SS accounts List account names. +.IP +.EX +Flags: + \-u \-\-used show only accounts used by transactions + \-d \-\-declared show only accounts declared by account directive + \-\-unused show only accounts declared but not used + \-\-undeclared show only accounts used but not declared + \-\-types also show account types when known + \-\-positions also show where accounts were declared + \-\-directives show as account directives, for use in journals + \-\-find find the first account matched by the first + argument (a case\-insensitive infix regexp or + account name) + \-l \-\-flat show accounts as a flat list (default) + \-t \-\-tree show accounts as a tree + \-\-drop=N flat mode: omit N leading account name parts +.EE .PP This command lists account names. By default it shows all known accounts, either used in transactions or @@ -8161,6 +8203,11 @@ $ hledger check accounts .EE .SS codes List the codes seen in transactions, in the order parsed. +.IP +.EX +Flags: +no command\-specific flags +.EE .PP This command prints the value of each transaction\[aq]s code field, in the order transactions were parsed. @@ -8211,8 +8258,18 @@ $ hledger codes \-E .EE .SS commodities List all commodity/currency symbols used or declared in the journal. +.IP +.EX +Flags: +no command\-specific flags +.EE .SS descriptions List the unique descriptions that appear in transactions. +.IP +.EX +Flags: +no command\-specific flags +.EE .PP This command lists the unique descriptions that appear in transactions, in alphabetic order. @@ -8230,8 +8287,18 @@ Person A List all files included in the journal. With a REGEX argument, only file names matching the regular expression (case sensitive) are shown. +.IP +.EX +Flags: +no command\-specific flags +.EE .SS notes List the unique notes that appear in transactions. +.IP +.EX +Flags: +no command\-specific flags +.EE .PP This command lists the unique notes that appear in transactions, in alphabetic order. @@ -8248,6 +8315,12 @@ Snacks .EE .SS payees List the unique payee/payer names that appear in transactions. +.IP +.EX +Flags: + \-\-declared show payees declared with payee directives + \-\-used show payees referenced by transactions +.EE .PP This command lists unique payee/payer names which have been declared with payee directives (\-\-declared), used in transaction descriptions @@ -8273,6 +8346,12 @@ With \-\-infer\-market\-prices, also show any additional prices inferred from costs. With \-\-show\-reverse, also show additional prices inferred by reversing known prices. +.IP +.EX +Flags: + \-\-show\-reverse also show the prices inferred by reversing known + prices +.EE .PP Price amounts are always displayed with their full precision, except for reverse prices which are limited to 8 decimal digits. @@ -8286,6 +8365,12 @@ But if in doubt, you can inspect those directly by running the value report with \-\-debug=2. .SS stats Show journal and performance statistics. +.IP +.EX +Flags: + \-v \-\-verbose show more detailed output + \-o \-\-output\-file=FILE write output to FILE. +.EE .PP The stats command shows summary information for the whole journal, or a matched part of it. @@ -8334,6 +8419,13 @@ This command supports the \-o/\-\-output\-file option (but not \-O/\-\-output\-format). .SS tags List the tags used in the journal, or their values. +.IP +.EX +Flags: + \-\-values list tag values instead of tag names + \-\-parsed show tags/values in the order they were parsed, + including duplicates +.EE .PP This command lists the tag names used in the journal, whether on transactions, postings, or account declarations. @@ -8360,6 +8452,31 @@ acquire tags from their postings. .SH Standard report commands .SS print Show full journal entries, representing transactions. +.IP +.EX +Flags: + \-x \-\-explicit show all amounts explicitly + \-\-show\-costs show transaction prices even with conversion + postings + \-\-round=TYPE how much rounding or padding should be done when + displaying amounts ? + none \- show original decimal digits, + as in journal + soft \- just add or remove decimal zeros + to match precision (default) + hard \- round posting amounts to precision + (can unbalance transactions) + all \- also round cost amounts to precision + (can unbalance transactions) + \-\-new show only newer\-dated transactions added in each + file since last run + \-m \-\-match=DESC fuzzy search for one recent transaction with + description closest to DESC + \-O \-\-output\-format=FMT select the output format. Supported formats: + txt, beancount, csv, tsv, json, sql. + \-o \-\-output\-file=FILE write output to FILE. A file extension matching + one of the above formats selects that format. +.EE .PP The print command displays full journal entries (transactions) from the journal file, sorted by date (or with \f[CR]\-\-date2\f[R], by secondary @@ -8553,6 +8670,21 @@ negative amounts under credit and zero or greater amounts under debit.) .PP Show the transactions and running balances in one account, with each transaction on one line. +.IP +.EX +Flags: + \-\-txn\-dates filter strictly by transaction date, not posting + date. Warning: this can show a wrong running + balance. + \-\-no\-elide don\[aq]t show only 2 commodities per amount + \-w \-\-width=N set output width (default: terminal width or + $COLUMNS). \-wN,M sets description width as well. + \-\-align\-all guarantee alignment across all lines (slower) + \-O \-\-output\-format=FMT select the output format. Supported formats: + txt, html, csv, tsv, json. + \-o \-\-output\-file=FILE write output to FILE. A file extension matching + one of the above formats selects that format. +.EE .PP \f[CR]aregister\f[R] shows the overall transactions affecting a particular account (and any subaccounts). @@ -8642,6 +8774,27 @@ This too can cause an inaccurate running balance. (reg) .PP Show postings and their running total. +.IP +.EX +Flags: + \-\-cumulative show running total from report start date + (default) + \-H \-\-historical show historical running total/balance (includes + postings before report start date) + \-A \-\-average show running average of posting amounts instead + of total (implies \-\-empty) + \-m \-\-match=DESC fuzzy search for one recent posting with + description closest to DESC + \-r \-\-related show postings\[aq] siblings instead + \-\-invert display all amounts with reversed sign + \-w \-\-width=N set output width (default: terminal width or + $COLUMNS). \-wN,M sets description width as well. + \-\-align\-all guarantee alignment across all lines (slower) + \-O \-\-output\-format=FMT select the output format. Supported formats: + txt, csv, tsv, json. + \-o \-\-output\-file=FILE write output to FILE. A file extension matching + one of the above formats selects that format. +.EE .PP The register command displays matched postings, across all accounts, in date order, with their running total or running historical balance. @@ -8796,6 +8949,53 @@ options The output formats supported are \f[CR]txt\f[R], \f[CR]csv\f[R], Show the end balances in asset and liability accounts. Amounts are shown with normal positive sign, as in conventional financial statements. +.IP +.EX +Flags: + \-\-sum show sum of posting amounts (default) + \-\-valuechange show total change of period\-end historical + balance value (caused by deposits, withdrawals, + market price fluctuations) + \-\-gain show unrealised capital gain/loss (historical + balance value minus cost basis) + \-\-budget show sum of posting amounts compared to budget + goals defined by periodic transactions + \-\-change accumulate amounts from column start to column + end (in multicolumn reports) + \-\-cumulative accumulate amounts from report start (specified + by e.g. \-b/\-\-begin) to column end + \-H \-\-historical accumulate amounts from journal start to column + end (includes postings before report start date) + (default) + \-l \-\-flat show accounts as a flat list (default). Amounts + exclude subaccount amounts, except where the + account is depth\-clipped. + \-t \-\-tree show accounts as a tree. Amounts include + subaccount amounts. + \-\-drop=N flat mode: omit N leading account name parts + \-\-declared include non\-parent declared accounts (best used + with \-E) + \-A \-\-average show a row average column (in multicolumn + reports) + \-T \-\-row\-total show a row total column (in multicolumn reports) + \-\-summary\-only display only row summaries (e.g. row total, + average) (in multicolumn reports) + \-N \-\-no\-total omit the final total row + \-\-no\-elide don\[aq]t squash boring parent accounts (in tree + mode) + \-\-format=FORMATSTR use this custom line format (in simple reports) + \-S \-\-sort\-amount sort by amount instead of account code/name + \-% \-\-percent express values in percentage of each column\[aq]s + total + \-\-layout=ARG how to show multi\-commodity amounts: + \[aq]wide[,WIDTH]\[aq]: all commodities on one line + \[aq]tall\[aq] : each commodity on a new line + \[aq]bare\[aq] : bare numbers, symbols in a column + \-O \-\-output\-format=FMT select the output format. Supported formats: + txt, html, csv, tsv, json. + \-o \-\-output\-file=FILE write output to FILE. A file extension matching + one of the above formats selects that format. +.EE .PP This command displays a balance sheet, showing historical ending balances of asset and liability accounts. @@ -8849,6 +9049,53 @@ This command displays a balance sheet, showing historical ending balances of asset, liability and equity accounts. Amounts are shown with normal positive sign, as in conventional financial statements. +.IP +.EX +Flags: + \-\-sum show sum of posting amounts (default) + \-\-valuechange show total change of period\-end historical + balance value (caused by deposits, withdrawals, + market price fluctuations) + \-\-gain show unrealised capital gain/loss (historical + balance value minus cost basis) + \-\-budget show sum of posting amounts compared to budget + goals defined by periodic transactions + \-\-change accumulate amounts from column start to column + end (in multicolumn reports) + \-\-cumulative accumulate amounts from report start (specified + by e.g. \-b/\-\-begin) to column end + \-H \-\-historical accumulate amounts from journal start to column + end (includes postings before report start date) + (default) + \-l \-\-flat show accounts as a flat list (default). Amounts + exclude subaccount amounts, except where the + account is depth\-clipped. + \-t \-\-tree show accounts as a tree. Amounts include + subaccount amounts. + \-\-drop=N flat mode: omit N leading account name parts + \-\-declared include non\-parent declared accounts (best used + with \-E) + \-A \-\-average show a row average column (in multicolumn + reports) + \-T \-\-row\-total show a row total column (in multicolumn reports) + \-\-summary\-only display only row summaries (e.g. row total, + average) (in multicolumn reports) + \-N \-\-no\-total omit the final total row + \-\-no\-elide don\[aq]t squash boring parent accounts (in tree + mode) + \-\-format=FORMATSTR use this custom line format (in simple reports) + \-S \-\-sort\-amount sort by amount instead of account code/name + \-% \-\-percent express values in percentage of each column\[aq]s + total + \-\-layout=ARG how to show multi\-commodity amounts: + \[aq]wide[,WIDTH]\[aq]: all commodities on one line + \[aq]tall\[aq] : each commodity on a new line + \[aq]bare\[aq] : bare numbers, symbols in a column + \-O \-\-output\-format=FMT select the output format. Supported formats: + txt, html, csv, tsv, json. + \-o \-\-output\-file=FILE write output to FILE. A file extension matching + one of the above formats selects that format. +.EE .PP This report shows accounts declared with the \f[CR]Asset\f[R], \f[CR]Cash\f[R], \f[CR]Liability\f[R] or \f[CR]Equity\f[R] type (see @@ -8910,6 +9157,52 @@ and outflows affecting \[dq]cash\[dq] (ie, liquid, easily convertible) assets. Amounts are shown with normal positive sign, as in conventional financial statements. +.IP +.EX +Flags: + \-\-sum show sum of posting amounts (default) + \-\-valuechange show total change of period\-end historical + balance value (caused by deposits, withdrawals, + market price fluctuations) + \-\-gain show unrealised capital gain/loss (historical + balance value minus cost basis) + \-\-budget show sum of posting amounts compared to budget + goals defined by periodic transactions + \-\-change accumulate amounts from column start to column + end (in multicolumn reports) (default) + \-\-cumulative accumulate amounts from report start (specified + by e.g. \-b/\-\-begin) to column end + \-H \-\-historical accumulate amounts from journal start to column + end (includes postings before report start date) + \-l \-\-flat show accounts as a flat list (default). Amounts + exclude subaccount amounts, except where the + account is depth\-clipped. + \-t \-\-tree show accounts as a tree. Amounts include + subaccount amounts. + \-\-drop=N flat mode: omit N leading account name parts + \-\-declared include non\-parent declared accounts (best used + with \-E) + \-A \-\-average show a row average column (in multicolumn + reports) + \-T \-\-row\-total show a row total column (in multicolumn reports) + \-\-summary\-only display only row summaries (e.g. row total, + average) (in multicolumn reports) + \-N \-\-no\-total omit the final total row + \-\-no\-elide don\[aq]t squash boring parent accounts (in tree + mode) + \-\-format=FORMATSTR use this custom line format (in simple reports) + \-S \-\-sort\-amount sort by amount instead of account code/name + \-% \-\-percent express values in percentage of each column\[aq]s + total + \-\-layout=ARG how to show multi\-commodity amounts: + \[aq]wide[,WIDTH]\[aq]: all commodities on one line + \[aq]tall\[aq] : each commodity on a new line + \[aq]bare\[aq] : bare numbers, symbols in a column + \-O \-\-output\-format=FMT select the output format. Supported formats: + txt, html, csv, tsv, json. + \-o \-\-output\-file=FILE write output to FILE. A file extension matching + one of the above formats selects that format. +.EE .PP This report shows accounts declared with the \f[CR]Cash\f[R] type (see account types). @@ -8961,6 +9254,52 @@ options The output formats supported are \f[CR]txt\f[R], \f[CR]csv\f[R], Show revenue inflows and expense outflows during the report period. Amounts are shown with normal positive sign, as in conventional financial statements. +.IP +.EX +Flags: + \-\-sum show sum of posting amounts (default) + \-\-valuechange show total change of period\-end historical + balance value (caused by deposits, withdrawals, + market price fluctuations) + \-\-gain show unrealised capital gain/loss (historical + balance value minus cost basis) + \-\-budget show sum of posting amounts compared to budget + goals defined by periodic transactions + \-\-change accumulate amounts from column start to column + end (in multicolumn reports) (default) + \-\-cumulative accumulate amounts from report start (specified + by e.g. \-b/\-\-begin) to column end + \-H \-\-historical accumulate amounts from journal start to column + end (includes postings before report start date) + \-l \-\-flat show accounts as a flat list (default). Amounts + exclude subaccount amounts, except where the + account is depth\-clipped. + \-t \-\-tree show accounts as a tree. Amounts include + subaccount amounts. + \-\-drop=N flat mode: omit N leading account name parts + \-\-declared include non\-parent declared accounts (best used + with \-E) + \-A \-\-average show a row average column (in multicolumn + reports) + \-T \-\-row\-total show a row total column (in multicolumn reports) + \-\-summary\-only display only row summaries (e.g. row total, + average) (in multicolumn reports) + \-N \-\-no\-total omit the final total row + \-\-no\-elide don\[aq]t squash boring parent accounts (in tree + mode) + \-\-format=FORMATSTR use this custom line format (in simple reports) + \-S \-\-sort\-amount sort by amount instead of account code/name + \-% \-\-percent express values in percentage of each column\[aq]s + total + \-\-layout=ARG how to show multi\-commodity amounts: + \[aq]wide[,WIDTH]\[aq]: all commodities on one line + \[aq]tall\[aq] : each commodity on a new line + \[aq]bare\[aq] : bare numbers, symbols in a column + \-O \-\-output\-format=FMT select the output format. Supported formats: + txt, html, csv, tsv, json. + \-o \-\-output\-file=FILE write output to FILE. A file extension matching + one of the above formats selects that format. +.EE .PP This command displays an income statement, showing revenues and expenses during one or more periods. @@ -9016,6 +9355,65 @@ A flexible, general purpose \[dq]summing\[dq] report that shows accounts with some kind of numeric data. This can be balance changes per period, end balances, budget performance, unrealised capital gains, etc. +.IP +.EX +Flags: + \-\-sum show sum of posting amounts (default) + \-\-budget[=DESCPAT] show sum of posting amounts together with budget + goals defined by periodic + transactions. With a DESCPAT argument (must be + separated by = not space), + use only periodic transactions with matching + description + (case insensitive substring match). + \-\-valuechange show total change of value of period\-end + historical balances (caused by deposits, + withdrawals, market price fluctuations) + \-\-gain show unrealised capital gain/loss (historical + balance value minus cost basis) + \-\-count show the count of postings + \-\-change accumulate amounts from column start to column + end (in multicolumn reports, default) + \-\-cumulative accumulate amounts from report start (specified + by e.g. \-b/\-\-begin) to column end + \-H \-\-historical accumulate amounts from journal start to column + end (includes postings before report start date) + \-l \-\-flat show accounts as a flat list (default). Amounts + exclude subaccount amounts, except where the + account is depth\-clipped. + \-t \-\-tree show accounts as a tree. Amounts include + subaccount amounts. + \-\-drop=N omit N leading account name parts (in flat mode) + \-\-declared include non\-parent declared accounts (best used + with \-E) + \-A \-\-average show a row average column (in multicolumn + reports) + \-r \-\-related show postings\[aq] siblings instead + \-T \-\-row\-total show a row total column (in multicolumn reports) + \-\-summary\-only display only row summaries (e.g. row total, + average) (in multicolumn reports) + \-N \-\-no\-total omit the final total row + \-\-no\-elide don\[aq]t squash boring parent accounts (in tree + mode) + \-\-format=FORMATSTR use this custom line format (in simple reports) + \-S \-\-sort\-amount sort by amount instead of account code/name (in + flat mode). With multiple columns, sorts by the row + total, or by row average if that is displayed. + \-% \-\-percent express values in percentage of each column\[aq]s + total + \-\-invert display all amounts with reversed sign + \-\-transpose transpose rows and columns + \-\-layout=ARG how to lay out multi\-commodity amounts and the + overall table: + \[aq]wide[,WIDTH]\[aq]: commodities on one line + \[aq]tall\[aq] : commodities on separate lines + \[aq]bare\[aq] : commodity symbols in one column + \[aq]tidy\[aq] : every attribute in its own column + \-O \-\-output\-format=FMT select the output format. Supported formats: + txt, html, csv, tsv, json. + \-o \-\-output\-file=FILE write output to FILE. A file extension matching + one of the above formats selects that format. +.EE .PP \f[CR]balance\f[R] is one of hledger\[aq]s oldest and most versatile commands, for listing account balances, balance changes, values, value @@ -10110,6 +10508,15 @@ Show top gainers [or losers] last week .SS roi Shows the time\-weighted (TWR) and money\-weighted (IRR) rate of return on your investments. +.IP +.EX +Flags: + \-\-cashflow show all amounts that were used to compute + returns + \-\-investment=QUERY query to select your investment transactions + \-\-profit\-loss=QUERY \-\-pnl query to select profit\-and\-loss or + appreciation/valuation transactions +.EE .PP At a minimum, you need to supply a query (which could be just an account name) to select your investment(s) with \f[CR]\-\-inv\f[R], and another @@ -10304,6 +10711,11 @@ both metrics .SH Chart commands .SS activity Show an ascii barchart of posting counts per interval. +.IP +.EX +Flags: +no command\-specific flags +.EE .PP The activity command displays an ascii histogram showing transaction counts by day, week, month or other reporting interval (by day is the @@ -10330,6 +10742,38 @@ equity, consolidating balances, or viewing lots. Like \f[CR]print\f[R], it prints valid journal entries. You can append or copy these to your journal file(s) when you are happy with how they look. +.IP +.EX +Flags: + \-\-migrate[=NEW] show closing and opening transactions, for Asset + and Liability accounts by default, tagged for easy + matching. The tag\[aq]s default value can be overridden + by providing NEW. + \-\-close[=NEW] (default) show a closing transaction + \-\-open[=NEW] show an opening transaction + \-\-assign[=NEW] show opening balance assignments + \-\-assert[=NEW] show closing balance assertions + \-\-retain[=NEW] show a retain earnings transaction, for Revenue + and Expense accounts by default + \-x \-\-explicit show all amounts explicitly + \-\-show\-costs show amounts with different costs separately + \-\-interleaved show source and destination postings together + \-\-assertion\-type=TYPE =, ==, =* or ==* + \-\-close\-desc=DESC set closing transaction\[aq]s description + \-\-close\-acct=ACCT set closing transaction\[aq]s destination account + \-\-open\-desc=DESC set opening transaction\[aq]s description + \-\-open\-acct=ACCT set opening transaction\[aq]s source account + \-\-round=TYPE how much rounding or padding should be done when + displaying amounts ? + none \- show original decimal digits, + as in journal + soft \- just add or remove decimal zeros + to match precision (default) + hard \- round posting amounts to precision + (can unbalance transactions) + all \- also round cost amounts to precision + (can unbalance transactions) +.EE .PP \f[CR]close\f[R] currently has six modes, selected by a single mode flag: @@ -10544,6 +10988,18 @@ See examples/multi\-year. Print all transactions, rewriting the postings of matched transactions. For now the only rewrite available is adding new postings, like print \-\-auto. +.IP +.EX +Flags: + \-\-add\-posting=\[aq]ACCT AMTEXPR\[aq] add a posting to ACCT, which may be + parenthesised. AMTEXPR is either a literal + amount, or *N which means the transaction\[aq]s + first matched amount multiplied by N (a + decimal number). Two spaces separate ACCT + and AMTEXPR. + \-\-diff generate diff suitable as an input for + patch tool +.EE .PP This is a start at a generic rewriter of transaction entries. It reads the default journal and prints the transactions, like print, @@ -10689,6 +11145,11 @@ print \-\-auto applies rules specified in the journal. .SH Maintenance commands .SS check Check for various kinds of errors in your data. +.IP +.EX +Flags: +no command\-specific flags +.EE .PP hledger provides a number of built\-in correctness checks to help validate your data and prevent errors. @@ -10800,18 +11261,25 @@ assertions are passing Compares a particular account\[aq]s transactions in two input files. It shows any transactions to this account which are in one file but not in the other. +.IP +.EX +Flags: +no command\-specific flags +.EE .PP -More precisely, for each posting affecting this account in either file, -it looks for a corresponding posting in the other file which posts the -same amount to the same account (ignoring date, description, etc.) -Since postings not transactions are compared, this also works when +More precisely: for each posting affecting this account in either file, +this command looks for a corresponding posting in the other file which +posts the same amount to the same account (ignoring date, description, +etc). +.PP +Since it compares postings, not transactions, this also works when multiple bank transactions have been combined into a single journal entry. .PP -This is useful eg if you have downloaded an account\[aq]s transactions -from your bank (eg as CSV data). -When hledger and your bank disagree about the account balance, you can -compare the bank data with your journal to find out the cause. +This command is useful eg if you have downloaded an account\[aq]s +transactions from your bank (eg as CSV data): when hledger and your bank +disagree about the account balance, you can compare the bank data with +your journal to find out the cause. .PP Examples: .IP @@ -10828,6 +11296,11 @@ These transactions are in the second file only: .EE .SS test Run built\-in unit tests. +.IP +.EX +Flags: +no command\-specific flags +.EE .PP This command runs the unit tests built in to hledger and hledger\-lib, printing the results on stdout. diff --git a/hledger/hledger.info b/hledger/hledger.info index 5e4a1cc8f..5798c0a3d 100644 --- a/hledger/hledger.info +++ b/hledger/hledger.info @@ -7421,6 +7421,12 @@ Show the hledger user manual with 'info', 'man', or a pager. With a (case insensitive) TOPIC argument, try to open it at that section heading. +Flags: + -i show the manual with info + -m show the manual with man + -p show the manual with $PAGER or less + (less is always used if TOPIC is specified) + This command shows the hledger manual built in to your hledger executable. It can be useful when offline, or when you prefer the terminal to a web browser, or when the appropriate hledger manual or @@ -7455,6 +7461,10 @@ File: hledger.info, Node: demo, Prev: help, Up: Help commands Play demos of hledger usage in the terminal, if asciinema is installed. +Flags: + -s --speed=SPEED playback speed (1 is original speed, .5 is half, 2 is + double, etc (default: 2)) + Run this command with no argument to list the demos. To play a demo, write its number or a prefix or substring of its title. Tips: @@ -7522,6 +7532,9 @@ File: hledger.info, Node: add, Next: import, Up: Data entry commands Record new transactions with interactive prompting in the console. +Flags: + --no-new-accounts don't allow creating new accounts + Many hledger users edit their journals directly with a text editor, or generate them from CSV. For more interactive data entry, there is the 'add' command, which prompts interactively on the console for new @@ -7586,6 +7599,10 @@ File: hledger.info, Node: import, Prev: add, Up: Data entry commands Import new transactions from one or more data files to the main journal. +Flags: + --catchup just mark all transactions as already imported + --dry-run just show the transactions to be imported + This command detects new transactions in each FILE argument since it was last run, and appends them to the main journal. @@ -7766,6 +7783,21 @@ File: hledger.info, Node: accounts, Next: codes, Up: Basic report commands List account names. +Flags: + -u --used show only accounts used by transactions + -d --declared show only accounts declared by account directive + --unused show only accounts declared but not used + --undeclared show only accounts used but not declared + --types also show account types when known + --positions also show where accounts were declared + --directives show as account directives, for use in journals + --find find the first account matched by the first + argument (a case-insensitive infix regexp or + account name) + -l --flat show accounts as a flat list (default) + -t --tree show accounts as a tree + --drop=N flat mode: omit N leading account name parts + This command lists account names. By default it shows all known accounts, either used in transactions or declared with account directives. @@ -7823,6 +7855,9 @@ File: hledger.info, Node: codes, Next: commodities, Prev: accounts, Up: Basi List the codes seen in transactions, in the order parsed. +Flags: +no command-specific flags + This command prints the value of each transaction's code field, in the order transactions were parsed. The transaction code is an optional value written in parentheses between the date and description, often @@ -7871,6 +7906,9 @@ File: hledger.info, Node: commodities, Next: descriptions, Prev: codes, Up: List all commodity/currency symbols used or declared in the journal. +Flags: +no command-specific flags +  File: hledger.info, Node: descriptions, Next: files, Prev: commodities, Up: Basic report commands @@ -7879,6 +7917,9 @@ File: hledger.info, Node: descriptions, Next: files, Prev: commodities, Up: List the unique descriptions that appear in transactions. +Flags: +no command-specific flags + This command lists the unique descriptions that appear in transactions, in alphabetic order. You can add a query to select a subset of transactions. @@ -7899,6 +7940,9 @@ File: hledger.info, Node: files, Next: notes, Prev: descriptions, Up: Basic List all files included in the journal. With a REGEX argument, only file names matching the regular expression (case sensitive) are shown. +Flags: +no command-specific flags +  File: hledger.info, Node: notes, Next: payees, Prev: files, Up: Basic report commands @@ -7907,6 +7951,9 @@ File: hledger.info, Node: notes, Next: payees, Prev: files, Up: Basic report List the unique notes that appear in transactions. +Flags: +no command-specific flags + This command lists the unique notes that appear in transactions, in alphabetic order. You can add a query to select a subset of transactions. The note is the part of the transaction description after @@ -7926,6 +7973,10 @@ File: hledger.info, Node: payees, Next: prices, Prev: notes, Up: Basic repor List the unique payee/payer names that appear in transactions. +Flags: + --declared show payees declared with payee directives + --used show payees referenced by transactions + This command lists unique payee/payer names which have been declared with payee directives (-declared), used in transaction descriptions (-used), or both (the default). @@ -7954,6 +8005,10 @@ Print the market prices declared with P directives. With costs. With -show-reverse, also show additional prices inferred by reversing known prices. +Flags: + --show-reverse also show the prices inferred by reversing known + prices + Price amounts are always displayed with their full precision, except for reverse prices which are limited to 8 decimal digits. @@ -7972,6 +8027,10 @@ File: hledger.info, Node: stats, Next: tags, Prev: prices, Up: Basic report Show journal and performance statistics. +Flags: + -v --verbose show more detailed output + -o --output-file=FILE write output to FILE. + The stats command shows summary information for the whole journal, or a matched part of it. With a reporting interval, it shows a report for each report period. @@ -8020,6 +8079,11 @@ File: hledger.info, Node: tags, Prev: stats, Up: Basic report commands List the tags used in the journal, or their values. +Flags: + --values list tag values instead of tag names + --parsed show tags/values in the order they were parsed, + including duplicates + This command lists the tag names used in the journal, whether on transactions, postings, or account declarations. @@ -8066,6 +8130,29 @@ File: hledger.info, Node: print, Next: aregister, Up: Standard report command Show full journal entries, representing transactions. +Flags: + -x --explicit show all amounts explicitly + --show-costs show transaction prices even with conversion + postings + --round=TYPE how much rounding or padding should be done when + displaying amounts ? + none - show original decimal digits, + as in journal + soft - just add or remove decimal zeros + to match precision (default) + hard - round posting amounts to precision + (can unbalance transactions) + all - also round cost amounts to precision + (can unbalance transactions) + --new show only newer-dated transactions added in each + file since last run + -m --match=DESC fuzzy search for one recent transaction with + description closest to DESC + -O --output-format=FMT select the output format. Supported formats: + txt, beancount, csv, tsv, json, sql. + -o --output-file=FILE write output to FILE. A file extension matching + one of the above formats selects that format. + The print command displays full journal entries (transactions) from the journal file, sorted by date (or with '--date2', by secondary date). @@ -8266,6 +8353,19 @@ File: hledger.info, Node: aregister, Next: register, Prev: print, Up: Standa Show the transactions and running balances in one account, with each transaction on one line. +Flags: + --txn-dates filter strictly by transaction date, not posting + date. Warning: this can show a wrong running + balance. + --no-elide don't show only 2 commodities per amount + -w --width=N set output width (default: terminal width or + $COLUMNS). -wN,M sets description width as well. + --align-all guarantee alignment across all lines (slower) + -O --output-format=FMT select the output format. Supported formats: + txt, html, csv, tsv, json. + -o --output-file=FILE write output to FILE. A file extension matching + one of the above formats selects that format. + 'aregister' shows the overall transactions affecting a particular account (and any subaccounts). Each report line represents one transaction in this account. Transactions before the report start date @@ -8361,6 +8461,25 @@ File: hledger.info, Node: register, Next: balancesheet, Prev: aregister, Up: Show postings and their running total. +Flags: + --cumulative show running total from report start date + (default) + -H --historical show historical running total/balance (includes + postings before report start date) + -A --average show running average of posting amounts instead + of total (implies --empty) + -m --match=DESC fuzzy search for one recent posting with + description closest to DESC + -r --related show postings' siblings instead + --invert display all amounts with reversed sign + -w --width=N set output width (default: terminal width or + $COLUMNS). -wN,M sets description width as well. + --align-all guarantee alignment across all lines (slower) + -O --output-format=FMT select the output format. Supported formats: + txt, csv, tsv, json. + -o --output-file=FILE write output to FILE. A file extension matching + one of the above formats selects that format. + The register command displays matched postings, across all accounts, in date order, with their running total or running historical balance. (See also the 'aregister' command, which shows matched transactions in a @@ -8505,6 +8624,51 @@ File: hledger.info, Node: balancesheet, Next: balancesheetequity, Prev: regis shown with normal positive sign, as in conventional financial statements. +Flags: + --sum show sum of posting amounts (default) + --valuechange show total change of period-end historical + balance value (caused by deposits, withdrawals, + market price fluctuations) + --gain show unrealised capital gain/loss (historical + balance value minus cost basis) + --budget show sum of posting amounts compared to budget + goals defined by periodic transactions + --change accumulate amounts from column start to column + end (in multicolumn reports) + --cumulative accumulate amounts from report start (specified + by e.g. -b/--begin) to column end + -H --historical accumulate amounts from journal start to column + end (includes postings before report start date) + (default) + -l --flat show accounts as a flat list (default). Amounts + exclude subaccount amounts, except where the + account is depth-clipped. + -t --tree show accounts as a tree. Amounts include + subaccount amounts. + --drop=N flat mode: omit N leading account name parts + --declared include non-parent declared accounts (best used + with -E) + -A --average show a row average column (in multicolumn + reports) + -T --row-total show a row total column (in multicolumn reports) + --summary-only display only row summaries (e.g. row total, + average) (in multicolumn reports) + -N --no-total omit the final total row + --no-elide don't squash boring parent accounts (in tree + mode) + --format=FORMATSTR use this custom line format (in simple reports) + -S --sort-amount sort by amount instead of account code/name + -% --percent express values in percentage of each column's + total + --layout=ARG how to show multi-commodity amounts: + 'wide[,WIDTH]': all commodities on one line + 'tall' : each commodity on a new line + 'bare' : bare numbers, symbols in a column + -O --output-format=FMT select the output format. Supported formats: + txt, html, csv, tsv, json. + -o --output-file=FILE write output to FILE. A file extension matching + one of the above formats selects that format. + This command displays a balance sheet, showing historical ending balances of asset and liability accounts. (To see equity as well, use the balancesheetequity command.) @@ -8558,6 +8722,51 @@ File: hledger.info, Node: balancesheetequity, Next: cashflow, Prev: balancesh balances of asset, liability and equity accounts. Amounts are shown with normal positive sign, as in conventional financial statements. +Flags: + --sum show sum of posting amounts (default) + --valuechange show total change of period-end historical + balance value (caused by deposits, withdrawals, + market price fluctuations) + --gain show unrealised capital gain/loss (historical + balance value minus cost basis) + --budget show sum of posting amounts compared to budget + goals defined by periodic transactions + --change accumulate amounts from column start to column + end (in multicolumn reports) + --cumulative accumulate amounts from report start (specified + by e.g. -b/--begin) to column end + -H --historical accumulate amounts from journal start to column + end (includes postings before report start date) + (default) + -l --flat show accounts as a flat list (default). Amounts + exclude subaccount amounts, except where the + account is depth-clipped. + -t --tree show accounts as a tree. Amounts include + subaccount amounts. + --drop=N flat mode: omit N leading account name parts + --declared include non-parent declared accounts (best used + with -E) + -A --average show a row average column (in multicolumn + reports) + -T --row-total show a row total column (in multicolumn reports) + --summary-only display only row summaries (e.g. row total, + average) (in multicolumn reports) + -N --no-total omit the final total row + --no-elide don't squash boring parent accounts (in tree + mode) + --format=FORMATSTR use this custom line format (in simple reports) + -S --sort-amount sort by amount instead of account code/name + -% --percent express values in percentage of each column's + total + --layout=ARG how to show multi-commodity amounts: + 'wide[,WIDTH]': all commodities on one line + 'tall' : each commodity on a new line + 'bare' : bare numbers, symbols in a column + -O --output-format=FMT select the output format. Supported formats: + txt, html, csv, tsv, json. + -o --output-file=FILE write output to FILE. A file extension matching + one of the above formats selects that format. + This report shows accounts declared with the 'Asset', 'Cash', 'Liability' or 'Equity' type (see account types). Or if no such accounts are declared, it shows top-level accounts named 'asset', @@ -8619,6 +8828,50 @@ inflows and outflows affecting "cash" (ie, liquid, easily convertible) assets. Amounts are shown with normal positive sign, as in conventional financial statements. +Flags: + --sum show sum of posting amounts (default) + --valuechange show total change of period-end historical + balance value (caused by deposits, withdrawals, + market price fluctuations) + --gain show unrealised capital gain/loss (historical + balance value minus cost basis) + --budget show sum of posting amounts compared to budget + goals defined by periodic transactions + --change accumulate amounts from column start to column + end (in multicolumn reports) (default) + --cumulative accumulate amounts from report start (specified + by e.g. -b/--begin) to column end + -H --historical accumulate amounts from journal start to column + end (includes postings before report start date) + -l --flat show accounts as a flat list (default). Amounts + exclude subaccount amounts, except where the + account is depth-clipped. + -t --tree show accounts as a tree. Amounts include + subaccount amounts. + --drop=N flat mode: omit N leading account name parts + --declared include non-parent declared accounts (best used + with -E) + -A --average show a row average column (in multicolumn + reports) + -T --row-total show a row total column (in multicolumn reports) + --summary-only display only row summaries (e.g. row total, + average) (in multicolumn reports) + -N --no-total omit the final total row + --no-elide don't squash boring parent accounts (in tree + mode) + --format=FORMATSTR use this custom line format (in simple reports) + -S --sort-amount sort by amount instead of account code/name + -% --percent express values in percentage of each column's + total + --layout=ARG how to show multi-commodity amounts: + 'wide[,WIDTH]': all commodities on one line + 'tall' : each commodity on a new line + 'bare' : bare numbers, symbols in a column + -O --output-format=FMT select the output format. Supported formats: + txt, html, csv, tsv, json. + -o --output-file=FILE write output to FILE. A file extension matching + one of the above formats selects that format. + This report shows accounts declared with the 'Cash' type (see account types). Or if no such accounts are declared, it shows accounts @@ -8669,6 +8922,50 @@ File: hledger.info, Node: incomestatement, Prev: cashflow, Up: Standard repor Amounts are shown with normal positive sign, as in conventional financial statements. +Flags: + --sum show sum of posting amounts (default) + --valuechange show total change of period-end historical + balance value (caused by deposits, withdrawals, + market price fluctuations) + --gain show unrealised capital gain/loss (historical + balance value minus cost basis) + --budget show sum of posting amounts compared to budget + goals defined by periodic transactions + --change accumulate amounts from column start to column + end (in multicolumn reports) (default) + --cumulative accumulate amounts from report start (specified + by e.g. -b/--begin) to column end + -H --historical accumulate amounts from journal start to column + end (includes postings before report start date) + -l --flat show accounts as a flat list (default). Amounts + exclude subaccount amounts, except where the + account is depth-clipped. + -t --tree show accounts as a tree. Amounts include + subaccount amounts. + --drop=N flat mode: omit N leading account name parts + --declared include non-parent declared accounts (best used + with -E) + -A --average show a row average column (in multicolumn + reports) + -T --row-total show a row total column (in multicolumn reports) + --summary-only display only row summaries (e.g. row total, + average) (in multicolumn reports) + -N --no-total omit the final total row + --no-elide don't squash boring parent accounts (in tree + mode) + --format=FORMATSTR use this custom line format (in simple reports) + -S --sort-amount sort by amount instead of account code/name + -% --percent express values in percentage of each column's + total + --layout=ARG how to show multi-commodity amounts: + 'wide[,WIDTH]': all commodities on one line + 'tall' : each commodity on a new line + 'bare' : bare numbers, symbols in a column + -O --output-format=FMT select the output format. Supported formats: + txt, html, csv, tsv, json. + -o --output-file=FILE write output to FILE. A file extension matching + one of the above formats selects that format. + This command displays an income statement, showing revenues and expenses during one or more periods. @@ -8733,6 +9030,63 @@ File: hledger.info, Node: balance, Next: roi, Up: Advanced report commands some kind of numeric data. This can be balance changes per period, end balances, budget performance, unrealised capital gains, etc. +Flags: + --sum show sum of posting amounts (default) + --budget[=DESCPAT] show sum of posting amounts together with budget + goals defined by periodic + transactions. With a DESCPAT argument (must be + separated by = not space), + use only periodic transactions with matching + description + (case insensitive substring match). + --valuechange show total change of value of period-end + historical balances (caused by deposits, + withdrawals, market price fluctuations) + --gain show unrealised capital gain/loss (historical + balance value minus cost basis) + --count show the count of postings + --change accumulate amounts from column start to column + end (in multicolumn reports, default) + --cumulative accumulate amounts from report start (specified + by e.g. -b/--begin) to column end + -H --historical accumulate amounts from journal start to column + end (includes postings before report start date) + -l --flat show accounts as a flat list (default). Amounts + exclude subaccount amounts, except where the + account is depth-clipped. + -t --tree show accounts as a tree. Amounts include + subaccount amounts. + --drop=N omit N leading account name parts (in flat mode) + --declared include non-parent declared accounts (best used + with -E) + -A --average show a row average column (in multicolumn + reports) + -r --related show postings' siblings instead + -T --row-total show a row total column (in multicolumn reports) + --summary-only display only row summaries (e.g. row total, + average) (in multicolumn reports) + -N --no-total omit the final total row + --no-elide don't squash boring parent accounts (in tree + mode) + --format=FORMATSTR use this custom line format (in simple reports) + -S --sort-amount sort by amount instead of account code/name (in + flat mode). With multiple columns, sorts by the row + total, or by row average if that is displayed. + -% --percent express values in percentage of each column's + total + --invert display all amounts with reversed sign + --transpose transpose rows and columns + --layout=ARG how to lay out multi-commodity amounts and the + overall table: + 'wide[,WIDTH]': commodities on one line + 'tall' : commodities on separate lines + 'bare' : commodity symbols in one column + 'tidy' : every attribute in its own column + -O --output-format=FMT select the output format. Supported formats: + txt, html, csv, tsv, json. + -o --output-file=FILE write output to FILE. A file extension matching + one of the above formats selects that format. + 'balance' is one of hledger's oldest and most versatile commands, for listing account balances, balance changes, values, value changes and more, during one time period or many. Generally it shows a table, with @@ -9760,6 +10114,13 @@ File: hledger.info, Node: roi, Prev: balance, Up: Advanced report commands Shows the time-weighted (TWR) and money-weighted (IRR) rate of return on your investments. +Flags: + --cashflow show all amounts that were used to compute + returns + --investment=QUERY query to select your investment transactions + --profit-loss=QUERY --pnl query to select profit-and-loss or + appreciation/valuation transactions + At a minimum, you need to supply a query (which could be just an account name) to select your investment(s) with '--inv', and another query to identify your profit and loss transactions with '--pnl'. @@ -9961,6 +10322,9 @@ File: hledger.info, Node: activity, Up: Chart commands Show an ascii barchart of posting counts per interval. +Flags: +no command-specific flags + The activity command displays an ascii histogram showing transaction counts by day, week, month or other reporting interval (by day is the default). With query arguments, it counts only matched transactions. @@ -9999,6 +10363,36 @@ balances, or viewing lots. Like 'print', it prints valid journal entries. You can append or copy these to your journal file(s) when you are happy with how they look. +Flags: + --migrate[=NEW] show closing and opening transactions, for Asset + and Liability accounts by default, tagged for easy + matching. The tag's default value can be overridden + by providing NEW. + --close[=NEW] (default) show a closing transaction + --open[=NEW] show an opening transaction + --assign[=NEW] show opening balance assignments + --assert[=NEW] show closing balance assertions + --retain[=NEW] show a retain earnings transaction, for Revenue + and Expense accounts by default + -x --explicit show all amounts explicitly + --show-costs show amounts with different costs separately + --interleaved show source and destination postings together + --assertion-type=TYPE =, ==, =* or ==* + --close-desc=DESC set closing transaction's description + --close-acct=ACCT set closing transaction's destination account + --open-desc=DESC set opening transaction's description + --open-acct=ACCT set opening transaction's source account + --round=TYPE how much rounding or padding should be done when + displaying amounts ? + none - show original decimal digits, + as in journal + soft - just add or remove decimal zeros + to match precision (default) + hard - round posting amounts to precision + (can unbalance transactions) + all - also round cost amounts to precision + (can unbalance transactions) + 'close' currently has six modes, selected by a single mode flag: * Menu: @@ -10270,6 +10664,16 @@ Print all transactions, rewriting the postings of matched transactions. For now the only rewrite available is adding new postings, like print -auto. +Flags: + --add-posting='ACCT AMTEXPR' add a posting to ACCT, which may be + parenthesised. AMTEXPR is either a literal + amount, or *N which means the transaction's + first matched amount multiplied by N (a + decimal number). Two spaces separate ACCT + and AMTEXPR. + --diff generate diff suitable as an input for + patch tool + This is a start at a generic rewriter of transaction entries. It reads the default journal and prints the transactions, like print, but adds one or more specified postings to any transactions matching QUERY. @@ -10432,6 +10836,9 @@ File: hledger.info, Node: check, Next: diff, Up: Maintenance commands Check for various kinds of errors in your data. +Flags: +no command-specific flags + hledger provides a number of built-in correctness checks to help validate your data and prevent errors. Some are run automatically, some when you enable '--strict' mode; or you can run any of them on demand by @@ -10566,17 +10973,22 @@ Compares a particular account's transactions in two input files. It shows any transactions to this account which are in one file but not in the other. - More precisely, for each posting affecting this account in either -file, it looks for a corresponding posting in the other file which posts -the same amount to the same account (ignoring date, description, etc.) -Since postings not transactions are compared, this also works when +Flags: +no command-specific flags + + More precisely: for each posting affecting this account in either +file, this command looks for a corresponding posting in the other file +which posts the same amount to the same account (ignoring date, +description, etc). + + Since it compares postings, not transactions, this also works when multiple bank transactions have been combined into a single journal entry. - This is useful eg if you have downloaded an account's transactions -from your bank (eg as CSV data). When hledger and your bank disagree -about the account balance, you can compare the bank data with your -journal to find out the cause. + This command is useful eg if you have downloaded an account's +transactions from your bank (eg as CSV data): when hledger and your bank +disagree about the account balance, you can compare the bank data with +your journal to find out the cause. Examples: @@ -10598,6 +11010,9 @@ File: hledger.info, Node: test, Prev: diff, Up: Maintenance commands Run built-in unit tests. +Flags: +no command-specific flags + This command runs the unit tests built in to hledger and hledger-lib, printing the results on stdout. If any test fails, the exit code will be non-zero. @@ -11613,228 +12028,228 @@ Node: Help commands269915 Ref: #help-commands270060 Node: help270088 Ref: #help270177 -Node: demo271546 -Ref: #demo271635 -Node: User interface commands272551 -Ref: #user-interface-commands272720 -Node: ui272745 -Ref: #ui272837 -Node: web272870 -Ref: #web272964 -Node: Data entry commands272998 -Ref: #data-entry-commands273167 -Node: add273196 -Ref: #add273290 -Node: import275681 -Ref: #import275781 -Node: Date skipping276789 -Ref: #date-skipping276912 -Node: Import testing279690 -Ref: #import-testing279853 -Node: Importing balance assignments280696 -Ref: #importing-balance-assignments280903 -Node: Import and commodity styles281552 -Ref: #import-and-commodity-styles281732 -Node: Basic report commands281961 -Ref: #basic-report-commands282135 -Node: accounts282262 -Ref: #accounts282372 -Node: codes284259 -Ref: #codes284383 -Node: commodities285247 -Ref: #commodities285387 -Node: descriptions285457 -Ref: #descriptions285599 -Node: files285890 -Ref: #files286012 -Node: notes286153 -Ref: #notes286269 -Node: payees286631 -Ref: #payees286750 -Node: prices287269 -Ref: #prices287388 -Node: stats288041 -Ref: #stats288156 -Node: tags289670 -Ref: #tags-1289770 -Node: Standard report commands290779 -Ref: #standard-report-commands290964 -Node: print291084 -Ref: #print291192 -Node: print explicitness292172 -Ref: #print-explicitness292313 -Node: print amount style293092 -Ref: #print-amount-style293260 -Node: print parseability294330 -Ref: #print-parseability294500 -Node: print other features295249 -Ref: #print-other-features295426 -Node: print output format295947 -Ref: #print-output-format296093 -Node: aregister299232 -Ref: #aregister299365 -Node: aregister and posting dates302246 -Ref: #aregister-and-posting-dates302391 -Node: register303147 -Ref: #register303285 -Node: Custom register output308316 -Ref: #custom-register-output308445 -Node: balancesheet309792 -Ref: #balancesheet309947 -Node: balancesheetequity311609 -Ref: #balancesheetequity311776 -Node: cashflow313796 -Ref: #cashflow313946 -Node: incomestatement315433 -Ref: #incomestatement315570 -Node: Advanced report commands317106 -Ref: #advanced-report-commands317284 -Node: balance317314 -Ref: #balance317422 -Node: balance features318581 -Ref: #balance-features318721 -Node: Simple balance report320631 -Ref: #simple-balance-report320816 -Node: Balance report line format322441 -Ref: #balance-report-line-format322643 -Node: Filtered balance report324801 -Ref: #filtered-balance-report324993 -Node: List or tree mode325320 -Ref: #list-or-tree-mode325488 -Node: Depth limiting326833 -Ref: #depth-limiting326999 -Node: Dropping top-level accounts327600 -Ref: #dropping-top-level-accounts327800 -Node: Showing declared accounts328110 -Ref: #showing-declared-accounts328309 -Node: Sorting by amount328840 -Ref: #sorting-by-amount329007 -Node: Percentages329677 -Ref: #percentages329836 -Node: Multi-period balance report330384 -Ref: #multi-period-balance-report330584 -Node: Balance change end balance333136 -Ref: #balance-change-end-balance333345 -Node: Balance report types334773 -Ref: #balance-report-types334954 -Node: Calculation type335452 -Ref: #calculation-type335607 -Node: Accumulation type336156 -Ref: #accumulation-type336336 -Node: Valuation type337257 -Ref: #valuation-type337445 -Node: Combining balance report types338446 -Ref: #combining-balance-report-types338640 -Node: Budget report340478 -Ref: #budget-report340640 -Node: Using the budget report342783 -Ref: #using-the-budget-report342956 -Node: Budget date surprises345059 -Ref: #budget-date-surprises345259 -Node: Selecting budget goals346423 -Ref: #selecting-budget-goals346626 -Node: Budgeting vs forecasting347371 -Ref: #budgeting-vs-forecasting347548 -Node: Balance report layout349048 -Ref: #balance-report-layout349233 -Node: Wide layout350186 -Ref: #wide-layout350321 -Node: Tall layout352591 -Ref: #tall-layout352746 -Node: Bare layout353897 -Ref: #bare-layout354052 -Node: Tidy layout355956 -Ref: #tidy-layout356091 -Node: Some useful balance reports357500 -Ref: #some-useful-balance-reports357675 -Node: roi358760 -Ref: #roi358860 -Node: Spaces and special characters in --inv and --pnl360672 -Ref: #spaces-and-special-characters-in---inv-and---pnl360910 -Node: Semantics of --inv and --pnl361398 -Ref: #semantics-of---inv-and---pnl361635 -Node: IRR and TWR explained363485 -Ref: #irr-and-twr-explained363643 -Node: Chart commands366896 -Ref: #chart-commands367054 -Node: activity367077 -Ref: #activity367166 -Node: Data generation commands367540 -Ref: #data-generation-commands367714 -Node: close367746 -Ref: #close367852 -Node: close --migrate368505 -Ref: #close---migrate368630 -Node: close --close370269 -Ref: #close---close370411 -Node: close --open370647 -Ref: #close---open370786 -Node: close --assert370896 -Ref: #close---assert371040 -Node: close --assign371261 -Ref: #close---assign371407 -Node: close --retain371933 -Ref: #close---retain372084 -Node: close customisation372829 -Ref: #close-customisation373006 -Node: close and balance assertions374473 -Ref: #close-and-balance-assertions374668 -Node: close examples375995 -Ref: #close-examples376134 -Node: Retain earnings376232 -Ref: #retain-earnings376389 -Node: Migrate balances to a new file376735 -Ref: #migrate-balances-to-a-new-file376959 -Node: More detailed close examples378087 -Ref: #more-detailed-close-examples378283 -Node: rewrite378309 -Ref: #rewrite378419 -Node: Re-write rules in a file380317 -Ref: #re-write-rules-in-a-file380478 -Node: Diff output format381627 -Ref: #diff-output-format381808 -Node: rewrite vs print --auto382900 -Ref: #rewrite-vs.-print---auto383058 -Node: Maintenance commands383614 -Ref: #maintenance-commands383785 -Node: check383823 -Ref: #check383922 -Node: Basic checks384871 -Ref: #basic-checks384989 -Node: Strict checks385824 -Ref: #strict-checks385965 -Node: Other checks386699 -Ref: #other-checks386839 -Node: Custom checks388554 -Ref: #custom-checks388674 -Node: diff389009 -Ref: #diff389119 -Node: test390161 -Ref: #test390257 -Node: PART 5 COMMON TASKS390999 -Ref: #part-5-common-tasks391158 -Node: Getting help391232 -Ref: #getting-help391381 -Node: Constructing command lines392141 -Ref: #constructing-command-lines392322 -Node: Starting a journal file392979 -Ref: #starting-a-journal-file393161 -Node: Setting LEDGER_FILE394363 -Ref: #setting-ledger_file394535 -Node: Setting opening balances395492 -Ref: #setting-opening-balances395673 -Node: Recording transactions398814 -Ref: #recording-transactions398983 -Node: Reconciling399539 -Ref: #reconciling399671 -Node: Reporting401928 -Ref: #reporting402057 -Node: Migrating to a new file406042 -Ref: #migrating-to-a-new-file406192 -Node: BUGS406491 -Ref: #bugs406585 -Node: Troubleshooting407464 -Ref: #troubleshooting407564 +Node: demo271749 +Ref: #demo271838 +Node: User interface commands272882 +Ref: #user-interface-commands273051 +Node: ui273076 +Ref: #ui273168 +Node: web273201 +Ref: #web273295 +Node: Data entry commands273329 +Ref: #data-entry-commands273498 +Node: add273527 +Ref: #add273621 +Node: import276082 +Ref: #import276182 +Node: Date skipping277343 +Ref: #date-skipping277466 +Node: Import testing280244 +Ref: #import-testing280407 +Node: Importing balance assignments281250 +Ref: #importing-balance-assignments281457 +Node: Import and commodity styles282106 +Ref: #import-and-commodity-styles282286 +Node: Basic report commands282515 +Ref: #basic-report-commands282689 +Node: accounts282816 +Ref: #accounts282926 +Node: codes285689 +Ref: #codes285813 +Node: commodities286711 +Ref: #commodities286851 +Node: descriptions286955 +Ref: #descriptions287097 +Node: files287422 +Ref: #files287544 +Node: notes287719 +Ref: #notes287835 +Node: payees288231 +Ref: #payees288350 +Node: prices289015 +Ref: #prices289134 +Node: stats289907 +Ref: #stats290022 +Node: tags291648 +Ref: #tags-1291748 +Node: Standard report commands292955 +Ref: #standard-report-commands293140 +Node: print293260 +Ref: #print293368 +Node: print explicitness295706 +Ref: #print-explicitness295847 +Node: print amount style296626 +Ref: #print-amount-style296794 +Node: print parseability297864 +Ref: #print-parseability298034 +Node: print other features298783 +Ref: #print-other-features298960 +Node: print output format299481 +Ref: #print-output-format299627 +Node: aregister302766 +Ref: #aregister302899 +Node: aregister and posting dates306546 +Ref: #aregister-and-posting-dates306691 +Node: register307447 +Ref: #register307585 +Node: Custom register output313750 +Ref: #custom-register-output313879 +Node: balancesheet315226 +Ref: #balancesheet315381 +Node: balancesheetequity319862 +Ref: #balancesheetequity320029 +Node: cashflow324868 +Ref: #cashflow325018 +Node: incomestatement329296 +Ref: #incomestatement329433 +Node: Advanced report commands333760 +Ref: #advanced-report-commands333938 +Node: balance333968 +Ref: #balance334076 +Node: balance features338851 +Ref: #balance-features338991 +Node: Simple balance report340901 +Ref: #simple-balance-report341086 +Node: Balance report line format342711 +Ref: #balance-report-line-format342913 +Node: Filtered balance report345071 +Ref: #filtered-balance-report345263 +Node: List or tree mode345590 +Ref: #list-or-tree-mode345758 +Node: Depth limiting347103 +Ref: #depth-limiting347269 +Node: Dropping top-level accounts347870 +Ref: #dropping-top-level-accounts348070 +Node: Showing declared accounts348380 +Ref: #showing-declared-accounts348579 +Node: Sorting by amount349110 +Ref: #sorting-by-amount349277 +Node: Percentages349947 +Ref: #percentages350106 +Node: Multi-period balance report350654 +Ref: #multi-period-balance-report350854 +Node: Balance change end balance353406 +Ref: #balance-change-end-balance353615 +Node: Balance report types355043 +Ref: #balance-report-types355224 +Node: Calculation type355722 +Ref: #calculation-type355877 +Node: Accumulation type356426 +Ref: #accumulation-type356606 +Node: Valuation type357527 +Ref: #valuation-type357715 +Node: Combining balance report types358716 +Ref: #combining-balance-report-types358910 +Node: Budget report360748 +Ref: #budget-report360910 +Node: Using the budget report363053 +Ref: #using-the-budget-report363226 +Node: Budget date surprises365329 +Ref: #budget-date-surprises365529 +Node: Selecting budget goals366693 +Ref: #selecting-budget-goals366896 +Node: Budgeting vs forecasting367641 +Ref: #budgeting-vs-forecasting367818 +Node: Balance report layout369318 +Ref: #balance-report-layout369503 +Node: Wide layout370456 +Ref: #wide-layout370591 +Node: Tall layout372861 +Ref: #tall-layout373016 +Node: Bare layout374167 +Ref: #bare-layout374322 +Node: Tidy layout376226 +Ref: #tidy-layout376361 +Node: Some useful balance reports377770 +Ref: #some-useful-balance-reports377945 +Node: roi379030 +Ref: #roi379130 +Node: Spaces and special characters in --inv and --pnl381277 +Ref: #spaces-and-special-characters-in---inv-and---pnl381515 +Node: Semantics of --inv and --pnl382003 +Ref: #semantics-of---inv-and---pnl382240 +Node: IRR and TWR explained384090 +Ref: #irr-and-twr-explained384248 +Node: Chart commands387501 +Ref: #chart-commands387659 +Node: activity387682 +Ref: #activity387771 +Node: Data generation commands388179 +Ref: #data-generation-commands388353 +Node: close388385 +Ref: #close388491 +Node: close --migrate390977 +Ref: #close---migrate391102 +Node: close --close392741 +Ref: #close---close392883 +Node: close --open393119 +Ref: #close---open393258 +Node: close --assert393368 +Ref: #close---assert393512 +Node: close --assign393733 +Ref: #close---assign393879 +Node: close --retain394405 +Ref: #close---retain394556 +Node: close customisation395301 +Ref: #close-customisation395478 +Node: close and balance assertions396945 +Ref: #close-and-balance-assertions397140 +Node: close examples398467 +Ref: #close-examples398606 +Node: Retain earnings398704 +Ref: #retain-earnings398861 +Node: Migrate balances to a new file399207 +Ref: #migrate-balances-to-a-new-file399431 +Node: More detailed close examples400559 +Ref: #more-detailed-close-examples400755 +Node: rewrite400781 +Ref: #rewrite400891 +Node: Re-write rules in a file403353 +Ref: #re-write-rules-in-a-file403514 +Node: Diff output format404663 +Ref: #diff-output-format404844 +Node: rewrite vs print --auto405936 +Ref: #rewrite-vs.-print---auto406094 +Node: Maintenance commands406650 +Ref: #maintenance-commands406821 +Node: check406859 +Ref: #check406958 +Node: Basic checks407941 +Ref: #basic-checks408059 +Node: Strict checks408894 +Ref: #strict-checks409035 +Node: Other checks409769 +Ref: #other-checks409909 +Node: Custom checks411624 +Ref: #custom-checks411744 +Node: diff412079 +Ref: #diff412189 +Node: test413286 +Ref: #test413382 +Node: PART 5 COMMON TASKS414158 +Ref: #part-5-common-tasks414317 +Node: Getting help414391 +Ref: #getting-help414540 +Node: Constructing command lines415300 +Ref: #constructing-command-lines415481 +Node: Starting a journal file416138 +Ref: #starting-a-journal-file416320 +Node: Setting LEDGER_FILE417522 +Ref: #setting-ledger_file417694 +Node: Setting opening balances418651 +Ref: #setting-opening-balances418832 +Node: Recording transactions421973 +Ref: #recording-transactions422142 +Node: Reconciling422698 +Ref: #reconciling422830 +Node: Reporting425087 +Ref: #reporting425216 +Node: Migrating to a new file429201 +Ref: #migrating-to-a-new-file429351 +Node: BUGS429650 +Ref: #bugs429744 +Node: Troubleshooting430623 +Ref: #troubleshooting430723  End Tag Table diff --git a/hledger/hledger.txt b/hledger/hledger.txt index 351618a8a..e89c98fb7 100644 --- a/hledger/hledger.txt +++ b/hledger/hledger.txt @@ -6038,6 +6038,12 @@ Help commands Show the hledger user manual with info, man, or a pager. With a (case insensitive) TOPIC argument, try to open it at that section heading. + Flags: + -i show the manual with info + -m show the manual with man + -p show the manual with $PAGER or less + (less is always used if TOPIC is specified) + This command shows the hledger manual built in to your hledger exe- cutable. It can be useful when offline, or when you prefer the termi- nal to a web browser, or when the appropriate hledger manual or viewers @@ -6067,6 +6073,10 @@ Help commands demo Play demos of hledger usage in the terminal, if asciinema is installed. + Flags: + -s --speed=SPEED playback speed (1 is original speed, .5 is half, 2 is + double, etc (default: 2)) + Run this command with no argument to list the demos. To play a demo, write its number or a prefix or substring of its title. Tips: @@ -6099,6 +6109,9 @@ Data entry commands add Record new transactions with interactive prompting in the console. + Flags: + --no-new-accounts don't allow creating new accounts + Many hledger users edit their journals directly with a text editor, or generate them from CSV. For more interactive data entry, there is the add command, which prompts interactively on the console for new trans- @@ -6166,6 +6179,10 @@ Data entry commands Import new transactions from one or more data files to the main jour- nal. + Flags: + --catchup just mark all transactions as already imported + --dry-run just show the transactions to be imported + This command detects new transactions in each FILE argument since it was last run, and appends them to the main journal. @@ -6295,6 +6312,21 @@ Basic report commands accounts List account names. + Flags: + -u --used show only accounts used by transactions + -d --declared show only accounts declared by account directive + --unused show only accounts declared but not used + --undeclared show only accounts used but not declared + --types also show account types when known + --positions also show where accounts were declared + --directives show as account directives, for use in journals + --find find the first account matched by the first + argument (a case-insensitive infix regexp or + account name) + -l --flat show accounts as a flat list (default) + -t --tree show accounts as a tree + --drop=N flat mode: omit N leading account name parts + This command lists account names. By default it shows all known ac- counts, either used in transactions or declared with account direc- tives. @@ -6347,6 +6379,9 @@ Basic report commands codes List the codes seen in transactions, in the order parsed. + Flags: + no command-specific flags + This command prints the value of each transaction's code field, in the order transactions were parsed. The transaction code is an optional value written in parentheses between the date and description, often @@ -6390,9 +6425,15 @@ Basic report commands commodities List all commodity/currency symbols used or declared in the journal. + Flags: + no command-specific flags + descriptions List the unique descriptions that appear in transactions. + Flags: + no command-specific flags + This command lists the unique descriptions that appear in transactions, in alphabetic order. You can add a query to select a subset of trans- actions. @@ -6408,9 +6449,15 @@ Basic report commands List all files included in the journal. With a REGEX argument, only file names matching the regular expression (case sensitive) are shown. + Flags: + no command-specific flags + notes List the unique notes that appear in transactions. + Flags: + no command-specific flags + This command lists the unique notes that appear in transactions, in al- phabetic order. You can add a query to select a subset of transac- tions. The note is the part of the transaction description after a | @@ -6425,6 +6472,10 @@ Basic report commands payees List the unique payee/payer names that appear in transactions. + Flags: + --declared show payees declared with payee directives + --used show payees referenced by transactions + This command lists unique payee/payer names which have been declared with payee directives (--declared), used in transaction descriptions (--used), or both (the default). @@ -6448,6 +6499,10 @@ Basic report commands --show-reverse, also show additional prices inferred by reversing known prices. + Flags: + --show-reverse also show the prices inferred by reversing known + prices + Price amounts are always displayed with their full precision, except for reverse prices which are limited to 8 decimal digits. @@ -6461,6 +6516,10 @@ Basic report commands stats Show journal and performance statistics. + Flags: + -v --verbose show more detailed output + -o --output-file=FILE write output to FILE. + The stats command shows summary information for the whole journal, or a matched part of it. With a reporting interval, it shows a report for each report period. @@ -6505,6 +6564,11 @@ Basic report commands tags List the tags used in the journal, or their values. + Flags: + --values list tag values instead of tag names + --parsed show tags/values in the order they were parsed, + including duplicates + This command lists the tag names used in the journal, whether on trans- actions, postings, or account declarations. @@ -6531,6 +6595,29 @@ Standard report commands print Show full journal entries, representing transactions. + Flags: + -x --explicit show all amounts explicitly + --show-costs show transaction prices even with conversion + postings + --round=TYPE how much rounding or padding should be done when + displaying amounts ? + none - show original decimal digits, + as in journal + soft - just add or remove decimal zeros + to match precision (default) + hard - round posting amounts to precision + (can unbalance transactions) + all - also round cost amounts to precision + (can unbalance transactions) + --new show only newer-dated transactions added in each + file since last run + -m --match=DESC fuzzy search for one recent transaction with + description closest to DESC + -O --output-format=FMT select the output format. Supported formats: + txt, beancount, csv, tsv, json, sql. + -o --output-file=FILE write output to FILE. A file extension matching + one of the above formats selects that format. + The print command displays full journal entries (transactions) from the journal file, sorted by date (or with --date2, by secondary date). @@ -6709,6 +6796,19 @@ Standard report commands Show the transactions and running balances in one account, with each transaction on one line. + Flags: + --txn-dates filter strictly by transaction date, not posting + date. Warning: this can show a wrong running + balance. + --no-elide don't show only 2 commodities per amount + -w --width=N set output width (default: terminal width or + $COLUMNS). -wN,M sets description width as well. + --align-all guarantee alignment across all lines (slower) + -O --output-format=FMT select the output format. Supported formats: + txt, html, csv, tsv, json. + -o --output-file=FILE write output to FILE. A file extension matching + one of the above formats selects that format. + aregister shows the overall transactions affecting a particular account (and any subaccounts). Each report line represents one transaction in this account. Transactions before the report start date are always in- @@ -6788,6 +6888,25 @@ Standard report commands Show postings and their running total. + Flags: + --cumulative show running total from report start date + (default) + -H --historical show historical running total/balance (includes + postings before report start date) + -A --average show running average of posting amounts instead + of total (implies --empty) + -m --match=DESC fuzzy search for one recent posting with + description closest to DESC + -r --related show postings' siblings instead + --invert display all amounts with reversed sign + -w --width=N set output width (default: terminal width or + $COLUMNS). -wN,M sets description width as well. + --align-all guarantee alignment across all lines (slower) + -O --output-format=FMT select the output format. Supported formats: + txt, csv, tsv, json. + -o --output-file=FILE write output to FILE. A file extension matching + one of the above formats selects that format. + The register command displays matched postings, across all accounts, in date order, with their running total or running historical balance. (See also the aregister command, which shows matched transactions in a @@ -6916,6 +7035,51 @@ Standard report commands shown with normal positive sign, as in conventional financial state- ments. + Flags: + --sum show sum of posting amounts (default) + --valuechange show total change of period-end historical + balance value (caused by deposits, withdrawals, + market price fluctuations) + --gain show unrealised capital gain/loss (historical + balance value minus cost basis) + --budget show sum of posting amounts compared to budget + goals defined by periodic transactions + --change accumulate amounts from column start to column + end (in multicolumn reports) + --cumulative accumulate amounts from report start (specified + by e.g. -b/--begin) to column end + -H --historical accumulate amounts from journal start to column + end (includes postings before report start date) + (default) + -l --flat show accounts as a flat list (default). Amounts + exclude subaccount amounts, except where the + account is depth-clipped. + -t --tree show accounts as a tree. Amounts include + subaccount amounts. + --drop=N flat mode: omit N leading account name parts + --declared include non-parent declared accounts (best used + with -E) + -A --average show a row average column (in multicolumn + reports) + -T --row-total show a row total column (in multicolumn reports) + --summary-only display only row summaries (e.g. row total, + average) (in multicolumn reports) + -N --no-total omit the final total row + --no-elide don't squash boring parent accounts (in tree + mode) + --format=FORMATSTR use this custom line format (in simple reports) + -S --sort-amount sort by amount instead of account code/name + -% --percent express values in percentage of each column's + total + --layout=ARG how to show multi-commodity amounts: + 'wide[,WIDTH]': all commodities on one line + 'tall' : each commodity on a new line + 'bare' : bare numbers, symbols in a column + -O --output-format=FMT select the output format. Supported formats: + txt, html, csv, tsv, json. + -o --output-file=FILE write output to FILE. A file extension matching + one of the above formats selects that format. + This command displays a balance sheet, showing historical ending bal- ances of asset and liability accounts. (To see equity as well, use the balancesheetequity command.) @@ -6964,6 +7128,51 @@ Standard report commands ances of asset, liability and equity accounts. Amounts are shown with normal positive sign, as in conventional financial statements. + Flags: + --sum show sum of posting amounts (default) + --valuechange show total change of period-end historical + balance value (caused by deposits, withdrawals, + market price fluctuations) + --gain show unrealised capital gain/loss (historical + balance value minus cost basis) + --budget show sum of posting amounts compared to budget + goals defined by periodic transactions + --change accumulate amounts from column start to column + end (in multicolumn reports) + --cumulative accumulate amounts from report start (specified + by e.g. -b/--begin) to column end + -H --historical accumulate amounts from journal start to column + end (includes postings before report start date) + (default) + -l --flat show accounts as a flat list (default). Amounts + exclude subaccount amounts, except where the + account is depth-clipped. + -t --tree show accounts as a tree. Amounts include + subaccount amounts. + --drop=N flat mode: omit N leading account name parts + --declared include non-parent declared accounts (best used + with -E) + -A --average show a row average column (in multicolumn + reports) + -T --row-total show a row total column (in multicolumn reports) + --summary-only display only row summaries (e.g. row total, + average) (in multicolumn reports) + -N --no-total omit the final total row + --no-elide don't squash boring parent accounts (in tree + mode) + --format=FORMATSTR use this custom line format (in simple reports) + -S --sort-amount sort by amount instead of account code/name + -% --percent express values in percentage of each column's + total + --layout=ARG how to show multi-commodity amounts: + 'wide[,WIDTH]': all commodities on one line + 'tall' : each commodity on a new line + 'bare' : bare numbers, symbols in a column + -O --output-format=FMT select the output format. Supported formats: + txt, html, csv, tsv, json. + -o --output-file=FILE write output to FILE. A file extension matching + one of the above formats selects that format. + This report shows accounts declared with the Asset, Cash, Liability or Equity type (see account types). Or if no such accounts are declared, it shows top-level accounts named asset, liability or equity (case in- @@ -7018,6 +7227,50 @@ Standard report commands assets. Amounts are shown with normal positive sign, as in conven- tional financial statements. + Flags: + --sum show sum of posting amounts (default) + --valuechange show total change of period-end historical + balance value (caused by deposits, withdrawals, + market price fluctuations) + --gain show unrealised capital gain/loss (historical + balance value minus cost basis) + --budget show sum of posting amounts compared to budget + goals defined by periodic transactions + --change accumulate amounts from column start to column + end (in multicolumn reports) (default) + --cumulative accumulate amounts from report start (specified + by e.g. -b/--begin) to column end + -H --historical accumulate amounts from journal start to column + end (includes postings before report start date) + -l --flat show accounts as a flat list (default). Amounts + exclude subaccount amounts, except where the + account is depth-clipped. + -t --tree show accounts as a tree. Amounts include + subaccount amounts. + --drop=N flat mode: omit N leading account name parts + --declared include non-parent declared accounts (best used + with -E) + -A --average show a row average column (in multicolumn + reports) + -T --row-total show a row total column (in multicolumn reports) + --summary-only display only row summaries (e.g. row total, + average) (in multicolumn reports) + -N --no-total omit the final total row + --no-elide don't squash boring parent accounts (in tree + mode) + --format=FORMATSTR use this custom line format (in simple reports) + -S --sort-amount sort by amount instead of account code/name + -% --percent express values in percentage of each column's + total + --layout=ARG how to show multi-commodity amounts: + 'wide[,WIDTH]': all commodities on one line + 'tall' : each commodity on a new line + 'bare' : bare numbers, symbols in a column + -O --output-format=FMT select the output format. Supported formats: + txt, html, csv, tsv, json. + -o --output-file=FILE write output to FILE. A file extension matching + one of the above formats selects that format. + This report shows accounts declared with the Cash type (see account types). Or if no such accounts are declared, it shows accounts @@ -7063,6 +7316,50 @@ Standard report commands Amounts are shown with normal positive sign, as in conventional finan- cial statements. + Flags: + --sum show sum of posting amounts (default) + --valuechange show total change of period-end historical + balance value (caused by deposits, withdrawals, + market price fluctuations) + --gain show unrealised capital gain/loss (historical + balance value minus cost basis) + --budget show sum of posting amounts compared to budget + goals defined by periodic transactions + --change accumulate amounts from column start to column + end (in multicolumn reports) (default) + --cumulative accumulate amounts from report start (specified + by e.g. -b/--begin) to column end + -H --historical accumulate amounts from journal start to column + end (includes postings before report start date) + -l --flat show accounts as a flat list (default). Amounts + exclude subaccount amounts, except where the + account is depth-clipped. + -t --tree show accounts as a tree. Amounts include + subaccount amounts. + --drop=N flat mode: omit N leading account name parts + --declared include non-parent declared accounts (best used + with -E) + -A --average show a row average column (in multicolumn + reports) + -T --row-total show a row total column (in multicolumn reports) + --summary-only display only row summaries (e.g. row total, + average) (in multicolumn reports) + -N --no-total omit the final total row + --no-elide don't squash boring parent accounts (in tree + mode) + --format=FORMATSTR use this custom line format (in simple reports) + -S --sort-amount sort by amount instead of account code/name + -% --percent express values in percentage of each column's + total + --layout=ARG how to show multi-commodity amounts: + 'wide[,WIDTH]': all commodities on one line + 'tall' : each commodity on a new line + 'bare' : bare numbers, symbols in a column + -O --output-format=FMT select the output format. Supported formats: + txt, html, csv, tsv, json. + -o --output-file=FILE write output to FILE. A file extension matching + one of the above formats selects that format. + This command displays an income statement, showing revenues and ex- penses during one or more periods. @@ -7112,6 +7409,63 @@ Advanced report commands some kind of numeric data. This can be balance changes per period, end balances, budget performance, unrealised capital gains, etc. + Flags: + --sum show sum of posting amounts (default) + --budget[=DESCPAT] show sum of posting amounts together with budget + goals defined by periodic + transactions. With a DESCPAT argument (must be + separated by = not space), + use only periodic transactions with matching + description + (case insensitive substring match). + --valuechange show total change of value of period-end + historical balances (caused by deposits, + withdrawals, market price fluctuations) + --gain show unrealised capital gain/loss (historical + balance value minus cost basis) + --count show the count of postings + --change accumulate amounts from column start to column + end (in multicolumn reports, default) + --cumulative accumulate amounts from report start (specified + by e.g. -b/--begin) to column end + -H --historical accumulate amounts from journal start to column + end (includes postings before report start date) + -l --flat show accounts as a flat list (default). Amounts + exclude subaccount amounts, except where the + account is depth-clipped. + -t --tree show accounts as a tree. Amounts include + subaccount amounts. + --drop=N omit N leading account name parts (in flat mode) + --declared include non-parent declared accounts (best used + with -E) + -A --average show a row average column (in multicolumn + reports) + -r --related show postings' siblings instead + -T --row-total show a row total column (in multicolumn reports) + --summary-only display only row summaries (e.g. row total, + average) (in multicolumn reports) + -N --no-total omit the final total row + --no-elide don't squash boring parent accounts (in tree + mode) + --format=FORMATSTR use this custom line format (in simple reports) + -S --sort-amount sort by amount instead of account code/name (in + flat mode). With multiple columns, sorts by the row + total, or by row average if that is displayed. + -% --percent express values in percentage of each column's + total + --invert display all amounts with reversed sign + --transpose transpose rows and columns + --layout=ARG how to lay out multi-commodity amounts and the + overall table: + 'wide[,WIDTH]': commodities on one line + 'tall' : commodities on separate lines + 'bare' : commodity symbols in one column + 'tidy' : every attribute in its own column + -O --output-format=FMT select the output format. Supported formats: + txt, html, csv, tsv, json. + -o --output-file=FILE write output to FILE. A file extension matching + one of the above formats selects that format. + balance is one of hledger's oldest and most versatile commands, for listing account balances, balance changes, values, value changes and more, during one time period or many. Generally it shows a table, with @@ -8000,6 +8354,13 @@ Advanced report commands Shows the time-weighted (TWR) and money-weighted (IRR) rate of return on your investments. + Flags: + --cashflow show all amounts that were used to compute + returns + --investment=QUERY query to select your investment transactions + --profit-loss=QUERY --pnl query to select profit-and-loss or + appreciation/valuation transactions + At a minimum, you need to supply a query (which could be just an ac- count name) to select your investment(s) with --inv, and another query to identify your profit and loss transactions with --pnl. @@ -8172,6 +8533,9 @@ Chart commands activity Show an ascii barchart of posting counts per interval. + Flags: + no command-specific flags + The activity command displays an ascii histogram showing transaction counts by day, week, month or other reporting interval (by day is the default). With query arguments, it counts only matched transactions. @@ -8195,6 +8559,36 @@ Data generation commands You can append or copy these to your journal file(s) when you are happy with how they look. + Flags: + --migrate[=NEW] show closing and opening transactions, for Asset + and Liability accounts by default, tagged for easy + matching. The tag's default value can be overridden + by providing NEW. + --close[=NEW] (default) show a closing transaction + --open[=NEW] show an opening transaction + --assign[=NEW] show opening balance assignments + --assert[=NEW] show closing balance assertions + --retain[=NEW] show a retain earnings transaction, for Revenue + and Expense accounts by default + -x --explicit show all amounts explicitly + --show-costs show amounts with different costs separately + --interleaved show source and destination postings together + --assertion-type=TYPE =, ==, =* or ==* + --close-desc=DESC set closing transaction's description + --close-acct=ACCT set closing transaction's destination account + --open-desc=DESC set opening transaction's description + --open-acct=ACCT set opening transaction's source account + --round=TYPE how much rounding or padding should be done when + displaying amounts ? + none - show original decimal digits, + as in journal + soft - just add or remove decimal zeros + to match precision (default) + hard - round posting amounts to precision + (can unbalance transactions) + all - also round cost amounts to precision + (can unbalance transactions) + close currently has six modes, selected by a single mode flag: close --migrate @@ -8385,6 +8779,16 @@ Data generation commands For now the only rewrite available is adding new postings, like print --auto. + Flags: + --add-posting='ACCT AMTEXPR' add a posting to ACCT, which may be + parenthesised. AMTEXPR is either a literal + amount, or *N which means the transaction's + first matched amount multiplied by N (a + decimal number). Two spaces separate ACCT + and AMTEXPR. + --diff generate diff suitable as an input for + patch tool + This is a start at a generic rewriter of transaction entries. It reads the default journal and prints the transactions, like print, but adds one or more specified postings to any transactions matching QUERY. The @@ -8508,6 +8912,9 @@ Maintenance commands check Check for various kinds of errors in your data. + Flags: + no command-specific flags + hledger provides a number of built-in correctness checks to help vali- date your data and prevent errors. Some are run automatically, some when you enable --strict mode; or you can run any of them on demand by @@ -8608,16 +9015,21 @@ Maintenance commands shows any transactions to this account which are in one file but not in the other. - More precisely, for each posting affecting this account in either file, - it looks for a corresponding posting in the other file which posts the - same amount to the same account (ignoring date, description, etc.) - Since postings not transactions are compared, this also works when mul- + Flags: + no command-specific flags + + More precisely: for each posting affecting this account in either file, + this command looks for a corresponding posting in the other file which + posts the same amount to the same account (ignoring date, description, + etc). + + Since it compares postings, not transactions, this also works when mul- tiple bank transactions have been combined into a single journal entry. - This is useful eg if you have downloaded an account's transactions from - your bank (eg as CSV data). When hledger and your bank disagree about - the account balance, you can compare the bank data with your journal to - find out the cause. + This command is useful eg if you have downloaded an account's transac- + tions from your bank (eg as CSV data): when hledger and your bank dis- + agree about the account balance, you can compare the bank data with + your journal to find out the cause. Examples: @@ -8634,6 +9046,9 @@ Maintenance commands test Run built-in unit tests. + Flags: + no command-specific flags + This command runs the unit tests built in to hledger and hledger-lib, printing the results on stdout. If any test fails, the exit code will be non-zero.