References
- http://ledger-cli.org/3.0/doc/ledger3.html
- https://gist.github.com/agaviria/3317397
- Ledger Cli Cheat Sheet - Cheat Sheet Maker
Effective dates
2008/01/01=2008/01/14 Client invoice ; estimated date you'll be paid
Assets:Accounts Receivable $100.00
Income: Client name
Say you're in business. If you bill a customer, you can enter something like above. Then, when you receive the payment, you change it to:
2008/01/01=2008/01/15 Client invoice ; actual date money received
Assets:Accounts Receivable $100.00
Income: Client name
Display
-n, --collapse # [register] collapse entries
# [balance] no grand total
-s, --subtotal # [balance] show sub-accounts
# [other] show subtotals
--flat
Queries
^regex$
@payee
%tag
%tag=value
=note
#code
term and term
term or term
not term
\( term \)
Example:
ledger r ^expenses and @Denny's
ledger r food and @Starbucks and not dining
Filters
-b, --begin DATE
-e, --end DATE
-d payee =~ /pioneer/
-C, --cleared # (with *)
-U, --uncleared # (no *)
--pending # (with !)
-R, --real # ignore virtual postings (eg: "(Cash) $-400")
-L, --actual # no automated postings (eg: "= /^Income/")
-r, --related # show the other side
# "reg -r savings" shows where it comes from)
Register
$ ledger reg
{: .-setup}
-D, --daily
-W, --weekly
-M, --monthly
--quarterly
-Y, --yearly
-s, --subtotal
--start-of-week monday
-S, --sort date
-S, --sort amount
Periods
[interval] [begin] [end]
interval:
every day|week|month|quarter|year
every N days|weeks|...
daily|weekly|...
begin:
from <spec>
end:
to <spec>
spec:
2004
2004/10/1
$ ledger bal|reg --period "until aug"
$ ledger bal|reg --period "last oct"
$ ledger bal|reg --period "every week"
{: .-setup}
Comments
; line comment
# also line comment
% also line comment
| also line comment
* also line comment
Querying
Budgeting
~ Monthly
Expenses:Rent $500
Expenses:Food $100
Expenses $40 ; everything else
Assets
~ Yearly
ledger bal --budget Expenses
ledger bal --unbudgeted Expenses
{: .-setup}
Commodity definitions
commodity $
note American Dollars
format $1,000.00
nomarket
default
Top comments (0)