generate decently looking invoice from JSON with Typst
  • Typst 65.4%
  • Elixir 24.4%
  • Just 7.4%
  • Nix 2.8%
Find a file
2026-03-03 00:02:32 +01:00
fonts init 2026-02-03 15:31:24 +01:00
lib init 2026-02-03 15:31:24 +01:00
scripts init 2026-02-03 15:31:24 +01:00
.envrc add nix shell 2026-02-03 15:38:51 +01:00
.gitignore ignore invoices 2026-03-03 00:02:32 +01:00
defaults.json init 2026-02-03 15:31:24 +01:00
justfile init 2026-02-03 15:31:24 +01:00
main.typ init 2026-02-03 15:31:24 +01:00
README.md add readme 2026-02-03 16:13:58 +01:00
shell.nix update shell.nix 2026-02-03 16:13:52 +01: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