typst-business-templatesv0.3.0

CASOON Open Source

Deterministic PDFs from JSON and Typst.

Use structured JSON data and reusable Typst templates to generate standardized business PDFs. Fix the data, templates, fonts, assets, compiler version and build timestamp for reproducible output.

MIT0.3.0 template package
JSON data and a reusable Typst template, with fixed build inputs, are compiled by typstgen into a standardized PDF.JSON data and a reusable Typst template, with fixed build inputs, are compiled by typstgen into a standardized PDF.
Pin the data, templates, fonts, assets, compiler and timestamp to reproduce a build.
document templates
21
JSON schemas for structured input
15
data and layout kept in versionable files
JSON + Typst

Templates, not tax advice

The invoice and tax-case profiles are templates. They have not been reviewed by a tax adviser or accountant and may need adjusting to your situation and country. Have them checked before you issue real invoices. Only two cases are released; the others are drafts you must select explicitly. Company details, accounts and rates in the examples are fictional.

What you can use it for

Which invoice cases are covered

Each case is a profile with its own prerequisites, notes and checks. You confirm the facts; the package does not decide which case applies to you.

CaseBasisState
Domestic sale, standard or reduced rate§ 12 UStGReleased
Small business (Kleinunternehmer)§ 19 UStGReleased
0 % rate for photovoltaic systems§ 12 Abs. 3 UStGReleased
Tax-exempt supply§ 4 UStGReleased
Domestic reverse charge§ 13b UStGReleased
Goods to a business in another EU state§ 4 Nr. 1b, § 6a UStGReleased
Service to a business in another EU state (reverse charge)§ 3a, § 14a UStGReleased
Export to a non-EU country§ 4 Nr. 1a, § 6 UStGReleased
Consumer in another EU state (OSS)§ 18j UStGReleased
Small business selling in another EU state§ 19a UStGReleased
France: domestic sale between businessesFrench VAT rulesDraft

Released means a bounded case, not a tax opinion: a tax adviser or accountant has not reviewed these cases, so have them checked before you issue real invoices. A draft is a preview you opt into and have checked. Chain and triangular transactions, new vehicles and other schemes are not supported. Prerequisites for each case

Template package 0.3.0. Use the matching source release and documented compiler to rebuild the examples. Setup guide · What is supported

The templates and the compiler

business-templates: this repository

Reusable Typst layouts, JSON schemas, translations and editable examples. Your data and these templates define the document.

Explore the template package →

typstgen: a separate project

The PDF builder, with the Typst compiler embedded. Use its CLI, Rust library or MCP server to compile your documents. Since 0.6.0 it also prepares configured invoices, calculates their totals and writes XRechnung/Peppol files.

Explore typstgen → · GitHub repository

Install it with cargo install typstgen --version 0.6.2 --locked; the setup guide has the remaining two steps.

What it does

  • One layout, standardized documents

    Define the document in a reusable Typst template and load structured content and company data from JSON. Version the source files and repeat the same build for each document.

  • Invoice in the language your client reads

    Choose from seven invoice languages, A4 or US Letter, and separate currency and number formats. Supply your own descriptions and notes; translated labels come from the package.

  • Keep invoice amounts consistent

    Calculate line amounts and tax totals from the rates you configure, and check any totals you supply. VAT invoices use the same values for the PDF and for Factur-X, XRechnung and Peppol files; sales-tax invoices are rendered as PDF.

  • Guides, forms and project documents

    Use 21 templates for business correspondence and project work. Assemble compact guides, printable intake forms and landscape brochures with reusable Typst components.

  • Fit document generation into your project

    Keep JSON data and Typst sources in Git. Compile with the CLI or integrate through Rust. Add chartlet diagrams when your documents need them.

Let your AI assistant check the document it builds

Connect an MCP-compatible assistant to typstgen’s local Model Context Protocol server. The assistant edits your JSON or Typst files using its editor tools, then asks typstgen to check the source, show a page preview and write the PDF.

  1. Check

    Get compiler errors and warnings with file and line references.

  2. Preview

    Inspect a rendered page to spot table overflow and awkward page breaks.

  3. Compile

    Save the PDF using the same templates, data and fixed build inputs.

“Check the letter, show me the first page, then save the PDF with a fixed build timestamp.”

The model proposes edits; the Typst compiler renders the result. Review the data and preview before using the final document.

Set up MCP with these templates → · Watch typstgen’s MCP walkthrough

Seven invoice languages, plus a US variant

All examples →

Eight real invoice PDFs from one shared template, each with editable configuration, invoice data and a fictional SVG logo. Seven-language labels apply to invoices; other templates have their own language support. Tax rates and company details are illustrative, not national tax presets.

examples/invoice-languages/

Guides, forms and other documents

All examples →

Outputs from the example projects: compact publications, printable forms, landscape brochures, credentials, concepts and chartlet diagrams. Each entry includes its source and full PDF.

examples/

Make an example your own

Start with a letter, project document or invoice in the showcase. Follow the setup guide to install typstgen and the template package. The command below rebuilds the invoice demos.

  1. Choose a PDF example and open its linked Typst source or JSON data.
  2. Replace the sample company details, logo and content. For invoices, also configure taxes, language and paper.
  3. Build with the CLI or ask your MCP-connected assistant to check, preview and compile. Keep the inputs and build settings with your project.
terminalShell
cargo install typstgen --version 0.6.2 --locked
git clone --branch templates-v0.3.0 https://github.com/casoon/typst-business-templates
cd typst-business-templates && ./scripts/install-package.sh
python3 examples/invoice-languages/build.py

New in v0.3.0

Changelog →

Frequently asked questions

Is business-templates published on Typst Universe?

No. It is distributed as a source release tag (currently templates-v0.3.0) and installed locally as @local/business-templates; clone the tagged repository rather than fetching a package.

Do I need typstgen to use these templates?

Yes. This repository holds only the Typst package, JSON schemas and examples; typstgen is the separate project that provides the CLI, Rust library and MCP server with the Typst compiler embedded.

Have the invoice cases been reviewed by a tax adviser?

No. The profiles are templates built from the statutes and standards named in their sources; nobody has certified them for your situation. Released cases are bounded, drafts must be selected explicitly, and you confirm the facts. Have a tax adviser or accountant check them before you issue real invoices.

Can I send XRechnung or Peppol files with it?

It writes the files, and the tested examples pass the validators named in the documentation. Delivery over the Peppol network or to a portal, and your national obligations, are outside the package; validate your own files before sending them.

Are the example tax rates and company details usable as-is?

No. The businesses, accounts and tax rates in the language demos are fictional, and a language demo is not a reviewed national tax preset. Optional reviewed profiles exist separately for cases that need them.

What happened to the old docgen CLI and Rust crate?

They are discontinued. This repository is now the standalone Typst package, and client/project management, numbering and the former --encrypt option were not carried over. Historical tags keep their original meaning.

Can an AI assistant check and compile the documents for me?

Yes, through MCP. Connect an MCP-compatible assistant to typstgen’s local server so it can check the Typst source, inspect a page preview and compile the PDF while you edit the JSON or Typst inputs.