Preview as you edit
tagua render --watch renders a template to PDF and renders it again every time you save the template, its data,
or anything it uses: subreports, fonts and images. Keep the PDF open in a viewer that reloads changed files and
you see each change in a fraction of a second.
tagua render invoice.report.yaml --watch --open--openopens the PDF once it is rendered.--outwrites it somewhere other than next to the template (invoice.pdf).--datanames the data file, if it is notinvoice.data.yamlnext to the template.
When the template has a mistake, tagua prints each error with where it is, and the last good PDF stays in place:
[14:02:11] invoice.report.yaml: not rendered; the last PDF is unchanged. error body.detail[3].content[0].value: Unknown name 'Totl'. Did you mean 'Total'? (at column 1 of 'Totl')A data file has the template’s own shape: values for the parameters, and the rows of each dataset.
parameters:FacturXml: "<rsm:CrossIndustryInvoice ...>"data:invoice: - { Number: INV-0042, IssueDate: 2026-09-01, CustomerName: Contoso Ltd }lines: - { Description: Consulting, Quantity: 3, UnitPrice: 0.10, VatRate: 0.23 }Dates and times are ISO strings, bytes are base64, and numbers keep their exact decimal value. JSON works too.
Anything the file leaves out, and everything when there is no file, gets sample values made up from the declared types: “Customer 1”, 1, 123.45, dates a month apart. So a template renders before any data exists. The log says what was made up.
Completion and checking in your editor
Section titled “Completion and checking in your editor”Tagua’s templates have a JSON Schema. With it, your editor completes property names and values, shows what each property does, and flags mistakes as you type. Write it next to your templates:
tagua schema --out template.schema.jsonThen point your templates at it with a first line (Visual Studio Code with the YAML extension, and JetBrains IDEs, read it):
# yaml-language-server: $schema=template.schema.json