{
  "id": "hledger",
  "name": "hledger",
  "homepage": "https://hledger.org",
  "description": "hledger is friendly, fast, dependable, cross platform accounting software.",
  "executables": [
    "hledger"
  ],
  "dotfiles": {
    "paths": [
      "~/.hledger.conf",
      "~/.config/hledger/hledger.conf"
    ],
    "secret": []
  },
  "commands": {
    "format": 1,
    "label": "hledger",
    "description": "Run common hledger reports. Only balance is covered; other reports and data-entry commands are outside this form.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": true
    },
    "subcommand": [
      {
        "path": [
          "balance"
        ],
        "label": "Balance report",
        "description": "Show account balances, optionally per period, from one or more journal files.",
        "source": [
          {
            "id": "manual",
            "kind": "manual",
            "url": "https://hledger.org/hledger.html",
            "evidence": "  -f --file=[FMT:]FILE      Use this as the journal file (- means stdin). If\n  -b --begin=DATE           include postings/transactions on/after this date\n  -e --end=DATE             include postings/transactions before this date\n  -D --daily                set report interval: 1 day\n  -W --weekly               set report interval: 1 week\n  -M --monthly              set report interval: 1 month\n  -Q --quarterly            set report interval: 1 quarter\n  -Y --yearly               set report interval: 1 year\n  -p --period=PERIODEXP     set begin date, end date, and/or report interval,\n  -E --empty                Show zero items, which are normally hidden.\n     --depth=DEPTHEXP       if a number (or -NUM): show only top NUM levels\n  -H --historical           accumulation mode: accumulate amounts from\n  -l --flat                 list/tree mode: show accounts as a flat list\n  -t --tree                 list/tree mode: show accounts as a tree. Amounts\n     --drop=N               in list mode, omit N leading account name parts\n     --declared             include non-parent declared accounts (best used\n  -A --average              show a row average column (in multicolumn\n  -T --row-total            show a row total column (in multicolumn reports)\n     --summary-only         display only row summaries (e.g. row total,\n  -N --no-total             omit the final total row\n     --full-names           in tree mode, show full account names instead of\n     --format=FORMATSTR     use this custom line format (in simple reports)\n  -S --sort-amount          sort by amount instead of account code/name (in\n  -r --related              show the other accounts transacted with, instead\n"
          }
        ],
        "field": [
          {
            "id": "query",
            "label": "Query",
            "description": "Account patterns or queries such as assets or date:2024.",
            "type": "string",
            "position": 0,
            "multiple": true,
            "sources": [
              "manual"
            ]
          },
          {
            "id": "file",
            "label": "Journal file",
            "type": "path",
            "option": [
              "--file",
              "-f"
            ],
            "multiple": true,
            "path": {
              "kind": "file",
              "role": "input"
            },
            "sources": [
              "manual"
            ]
          },
          {
            "id": "begin",
            "label": "Begin date",
            "type": "string",
            "option": [
              "--begin",
              "-b"
            ],
            "sources": [
              "manual"
            ]
          },
          {
            "id": "end",
            "label": "End date",
            "type": "string",
            "option": [
              "--end",
              "-e"
            ],
            "sources": [
              "manual"
            ]
          },
          {
            "id": "period",
            "label": "Period expression",
            "type": "string",
            "option": [
              "--period",
              "-p"
            ],
            "sources": [
              "manual"
            ]
          },
          {
            "id": "monthly",
            "label": "Monthly columns",
            "type": "boolean",
            "option": [
              "--monthly",
              "-M"
            ],
            "sources": [
              "manual"
            ]
          },
          {
            "id": "yearly",
            "label": "Yearly columns",
            "type": "boolean",
            "option": [
              "--yearly",
              "-Y"
            ],
            "sources": [
              "manual"
            ]
          },
          {
            "id": "tree",
            "label": "Tree mode",
            "type": "boolean",
            "option": [
              "--tree",
              "-t"
            ],
            "sources": [
              "manual"
            ]
          },
          {
            "id": "flat",
            "label": "Flat mode",
            "type": "boolean",
            "option": [
              "--flat",
              "-l"
            ],
            "sources": [
              "manual"
            ]
          },
          {
            "id": "depth",
            "label": "Depth",
            "type": "string",
            "option": [
              "--depth"
            ],
            "sources": [
              "manual"
            ]
          },
          {
            "id": "empty",
            "label": "Show zero items",
            "type": "boolean",
            "option": [
              "--empty",
              "-E"
            ],
            "sources": [
              "manual"
            ]
          },
          {
            "id": "no_total",
            "label": "Omit total row",
            "type": "boolean",
            "option": [
              "--no-total",
              "-N"
            ],
            "sources": [
              "manual"
            ]
          },
          {
            "id": "sort_amount",
            "label": "Sort by amount",
            "type": "boolean",
            "option": [
              "--sort-amount",
              "-S"
            ],
            "sources": [
              "manual"
            ]
          }
        ],
        "task": [
          {
            "id": "monthly",
            "label": "Monthly balances",
            "fields": [
              "query",
              "file",
              "monthly",
              "tree"
            ],
            "required": [
              "file"
            ],
            "set": {
              "monthly": [
                true
              ]
            }
          },
          {
            "id": "totals",
            "label": "Current balances",
            "fields": [
              "query",
              "file",
              "depth"
            ],
            "required": [
              "file"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "query",
              "file",
              "begin",
              "end",
              "period",
              "monthly",
              "yearly"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "tree",
              "flat",
              "depth",
              "empty",
              "no_total",
              "sort_amount"
            ]
          }
        ]
      }
    ]
  }
}
