Skip to content

CLI reference

This page is generated from the real --help output at build time.

invoice-agent

usage: invoice-agent [-h] [--version]
                     {extract,process,eval,generate-dataset,serve} ...

Extract invoice PDFs and match them to purchase orders and receipts.

positional arguments:
  {extract,process,eval,generate-dataset,serve}
    extract             Extract one PDF to JSON
    process             Extract, validate and match one or more PDFs, in order
    eval                Score extraction and matching on a labeled dataset
    generate-dataset    Write the synthetic dataset (needs [synth])
    serve               Run the HTTP API (needs [api])

options:
  -h, --help            show this help message and exit
  --version             show program's version number and exit

extract

usage: invoice-agent extract [-h] [--extractor {layout,llm}] [--ocr] pdf

positional arguments:
  pdf

options:
  -h, --help            show this help message and exit
  --extractor {layout,llm}
                        layout: offline rules (default). llm: OpenAI-
                        compatible API
  --ocr                 OCR pages without a text layer ([ocr])

process

usage: invoice-agent process [-h] --pos POS [--receipts RECEIPTS]
                             [--policy POLICY] [--ledger LEDGER] [--json]
                             [--extractor {layout,llm}] [--ocr]
                             pdfs [pdfs ...]

positional arguments:
  pdfs

options:
  -h, --help            show this help message and exit
  --pos POS             Purchase orders (.json, .csv, .db)
  --receipts RECEIPTS   Goods receipts (.json, .csv, .db)
  --policy POLICY       JSON file with MatchPolicy overrides
  --ledger LEDGER       JSON file that remembers processed invoices across
                        runs (created if missing)
  --json                Print JSON lines instead of text
  --extractor {layout,llm}
                        layout: offline rules (default). llm: OpenAI-
                        compatible API
  --ocr                 OCR pages without a text layer ([ocr])

eval

usage: invoice-agent eval [-h] [--dataset DATASET] [--oracle]
                          [--format {markdown,json}] [--output OUTPUT]
                          [--min-decision-accuracy MIN_DECISION_ACCURACY]
                          [--extractor {layout,llm}] [--ocr]

options:
  -h, --help            show this help message and exit
  --dataset DATASET
  --oracle              Use ground-truth extraction to score the matching
                        rules on their own
  --format {markdown,json}
  --output OUTPUT       Also write the report to this file
  --min-decision-accuracy MIN_DECISION_ACCURACY
                        Exit with status 1 if decision accuracy is below this
                        fraction
  --extractor {layout,llm}
                        layout: offline rules (default). llm: OpenAI-
                        compatible API
  --ocr                 OCR pages without a text layer ([ocr])

generate-dataset

usage: invoice-agent generate-dataset [-h] [out]

positional arguments:
  out

options:
  -h, --help  show this help message and exit

serve

usage: invoice-agent serve [-h] --pos POS [--receipts RECEIPTS]
                           [--policy POLICY] [--host HOST] [--port PORT]
                           [--extractor {layout,llm}] [--ocr]

options:
  -h, --help            show this help message and exit
  --pos POS
  --receipts RECEIPTS
  --policy POLICY
  --host HOST
  --port PORT
  --extractor {layout,llm}
                        layout: offline rules (default). llm: OpenAI-
                        compatible API
  --ocr                 OCR pages without a text layer ([ocr])