id = "ledger"
name = "Ledger"
homepage = "https://www.ledger-cli.org"
description = "A powerful, double-entry accounting system that is accessed from the UNIX command-line."
executables = ["ledger"]
platforms = ["macos", "linux"]
[dotfiles]
paths = [
"[configHome]/ledger/ledgerrc",
"~/.ledgerrc",
]
exclude = []
secret = []
side_effect = false
[[dotfiles.machine_lines]]
file = ["[configHome]/ledger/ledgerrc", "~/.ledgerrc"]
match = { prefix = ["--file", "--price-db"] }
scope = "backup"
[commands]
format = 1
label = "Run a ledger report"
description = "Run a balance, register, print or accounts report over a journal file, with a date range, period and common filters. REPL mode, price lookups and format options are left out."
quality = "ai-draft"
parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false }
[[commands.source]]
id = "man"
kind = "manual"
url = "https://manpages.debian.org/unstable/ledger/ledger.1.en.html"
revision = "2026-10"
evidence = """
ledger [options] [command] [arguments]
accounts [report-query]
balance [report-query]
print [report-query]
register [report-query]
--begin DATE (-b)
--end DATE (-e)
--file FILE (-f)
--period PERIOD (-p)
--monthly (-M)
--market (-V)
--cleared (-C)
--pending
--real (-R)
--empty (-E)
--depth INT
--flat
--no-total
--invert
--sort EXPR (-S)
--limit EXPR (-l)
--subtotal (-s)
"""
[[commands.field]]
id = "file"
label = "Journal file"
type = "path"
option = ["--file", "-f"]
path = { kind = "file", role = "input" }
sources = ["man"]
[[commands.field]]
id = "report"
label = "Report"
type = "enum"
position = 0
choices = [{ value = "balance", label = "Balance" }, { value = "register", label = "Register" }, { value = "print", label = "Print transactions" }, { value = "accounts", label = "List accounts" }]
sources = ["man"]
[[commands.field]]
id = "query"
label = "Report query"
description = "Account names, payees or tags to match; several terms are allowed."
type = "string"
position = 1
multiple = true
sources = ["man"]
[[commands.field]]
id = "begin"
label = "Start date"
type = "string"
option = ["--begin", "-b"]
sources = ["man"]
[[commands.field]]
id = "end"
label = "End date"
description = "Transactions on or after this date are not considered."
type = "string"
option = ["--end", "-e"]
sources = ["man"]
[[commands.field]]
id = "period"
label = "Period expression"
type = "string"
option = ["--period", "-p"]
suggestions = [{ value = "this month", label = "This month" }, { value = "last month", label = "Last month" }, { value = "this year", label = "This year" }]
sources = ["man"]
[[commands.field]]
id = "monthly"
label = "Group by month"
type = "boolean"
option = ["--monthly", "-M"]
sources = ["man"]
[[commands.field]]
id = "market"
label = "Market value"
type = "boolean"
option = ["--market", "-V"]
sources = ["man"]
[[commands.field]]
id = "cleared"
label = "Cleared postings only"
type = "boolean"
option = ["--cleared", "-C"]
sources = ["man"]
[[commands.field]]
id = "empty"
label = "Include empty accounts"
type = "boolean"
option = ["--empty", "-E"]
sources = ["man"]
[[commands.field]]
id = "depth"
label = "Account depth"
type = "integer"
option = ["--depth"]
sources = ["man"]
[[commands.field]]
id = "flat"
label = "Flat account list"
type = "boolean"
option = ["--flat"]
sources = ["man"]
[[commands.field]]
id = "no_total"
label = "Hide total line"
type = "boolean"
option = ["--no-total"]
sources = ["man"]
[[commands.field]]
id = "sort"
label = "Sort expression"
type = "string"
option = ["--sort", "-S"]
sources = ["man"]
[[commands.task]]
id = "balances"
label = "Account balances"
fields = ["file", "report", "query", "begin", "end", "depth", "flat", "no_total"]
required = ["file", "report"]
set = { report = ["balance"] }
[[commands.task]]
id = "monthly_register"
label = "Monthly register"
fields = ["file", "report", "query", "period", "monthly"]
required = ["file", "report"]
set = { report = ["register"], monthly = [true] }
[[commands.group]]
id = "basic"
label = "Basic"
fields = ["file", "report", "query", "begin", "end", "period"]
[[commands.group]]
id = "advanced"
label = "Advanced"
fields = ["monthly", "market", "cleared", "empty", "depth", "flat", "no_total", "sort"]