generate decently looking invoice from JSON with Typst
  • Typst 64.7%
  • Elixir 25.2%
  • Just 7.3%
  • Nix 2.8%
Find a file
2026-05-04 13:09:23 +02:00
fonts init 2026-03-31 14:28:32 +02:00
lib style: format typst files 2026-05-04 13:07:25 +02:00
scripts fix: issued at date error 2026-05-04 12:54:11 +02:00
.envrc init 2026-03-31 14:28:32 +02:00
.gitignore init 2026-03-31 14:28:32 +02:00
justfile init 2026-03-31 14:28:32 +02:00
main.typ fix: incorrect due date 2026-05-04 13:09:23 +02:00
README.md init 2026-03-31 14:28:32 +02:00
shell.nix init 2026-03-31 14:28:32 +02:00

Invoice generator template

Generate decent looking invoices from JSON with Typst.

Requirements

If nix & direnv is installed on your system, all dependencies should be managed automatically.

Usage

  1. Run direnv allow in this directory.
  2. Fill in defaults.json. These data will be shared by all invoices.
  3. Run just add to create new invoice file and fill invoice details in generated JSON file. These data will be shallow-merged into default.json to produce final invoice data. You can also override keys from defaults.json.
  4. Run just compile invoices/{invoice-id}.json or just compile-all to generate PDF invoices.

Invoice number sequence

New invoice generator generator uses {year}-{month}-{ordinal} pattern, where:

  • year is 4-digit year number
  • month is 2-digit zero-padded month number
  • ordinal is 2-digit zero-padded number that denotes n-th invoice in that month