typst-business-templatesv0.7.2

CASOON Open Source

Business documents from JSON, typeset by Typst.

Templates for invoices, offers, reminders, letters, credentials, concepts, diagrams and more. Keep each document as a JSON or .typ file, and docgen compiles it to PDF with your company data, branding and language.

curl -fsSL https://raw.githubusercontent.com/casoon/typst-business-templates/main/install.sh | bash
cargo install --git https://github.com/casoon/typst-business-templates docgen
cargo add typst-business-templates
MITdocgen 0.7.2crates.io 0.1.5macOS · Linux · Windows
German invoice RE-2025-042 from TechVision Consulting to MedTech Solutions AG: address block, five line items for an AWS cloud migration, net total 39,900.00 EUR, VAT 7,581.00 EUR, gross total 47,481.00 EUR, company footer in four columns.
First page of it-consultant/documents/invoices/2025/invoice.json, compiled by docgen 0.7.2.
document templates
20
languages for labels and CLI
7
font presets, fonts in the repository
10
diagram layouts, no coordinates needed
8

What it does

  1. Your documents are plain files

    Invoices and offers are JSON, long documents are Typst markup. Company data, clients and number counters are JSON as well. Everything diffs and versions in Git.

  2. German business conventions built in

    DIN 5008 address block, VAT breakdown, dunning levels and a company footer with tax and bank data. One example project invoices as Kleinunternehmer (§ 19 UStG) without VAT.

  3. Templates that stay current, forks that stay put

    Standard templates are extracted into .docgen/templates/ and updated with docgen. docgen template fork copies one into templates/, where updates never touch it.

  4. CLI or Rust library

    docgen compiles single files, whole folders or on change. The typst-business-templates crate embeds templates, locales and fonts and returns the PDF bytes without a typst binary.

Compiled by docgen

All examples →

First pages of documents from the example projects, compiled by docgen 0.7.2. Each links to its source file and the full PDF.

examples/

Quickstart

From an empty folder to a PDF. docgen calls the typst CLI for invoices and other documents, so install Typst first. The documentation covers the JSON format, templates and diagrams.

  1. Install docgen and Typst.
  2. Create a project with docgen init and fill in data/company.json.
  3. Add a JSON document and run docgen compile — or docgen build for all of them.
terminalShell
docgen init my-business
cd my-business
# edit data/company.json, then add a document:
#   documents/invoices/2026/invoice.json
docgen compile documents/invoices/2026/invoice.json
# → documents/invoices/2026/invoice.pdf