typst-watch(1)

πŸ“¦
version 0.14.2 Β· 3 versions
, in alpine 3.24, nixos 26.05

πŸ’– NAME πŸ’–

okay so bestie, welcome to typst-watch β€” the watch-and-recompile era of the General Commands Manual (that's the manual name btw, we're folding it in here so you don't have to read a boring header line ilysm). It watches an input file and recompiles on changes. literally that's the whole vibe. ✨


🌸 SYNOPSIS 🌸

typst-watch [-f|--format] [--root] [--input] [--font-path]
[--ignore-system-fonts] [--ignore-embedded-fonts] [--package-path]
[--package-cache-path] [--creation-timestamp] [--pages] [--pdf-standard]
[--no-pdf-tags] [--ppi] [--deps] [--deps-format] [-j|--jobs]
[--features] [--diagnostic-format] [--open] [--timings] [--no-serve]
[--no-reload] [--port] [-h|--help] <INPUT> [OUTPUT]

πŸ¦‹ DESCRIPTION πŸ¦‹

Watches an input file and recompiles on changes. that's it, that's the girlboss. you save, she rebuilds, you slay. 🫢


✨ OPTIONS ✨

the full menu, no skips, no cuts, we're listing every single one because we don't do gatekeeping here πŸ’…

  • -f, --format=FORMAT β€” the format of the output file β€” she infers it from the extension by default. possible values: pdf, png, svg, html.
  • --root=DIR β€” configures the project root (for absolute paths). may also be specified with the TYPST_ROOT environment variable.
  • --input=key=value β€” add a string key-value pair visible through sys.inputs. little gift for your document, cute.
  • --font-path=DIR β€” adds additional directories that are recursively searched for fonts. if multiple paths are specified, they are separated by the system's path separator (: on Unix-like systems and ; on Windows). may also be specified with the TYPST_FONT_PATHS environment variable.
  • --ignore-system-fonts β€” ensures system fonts won't be searched, unless explicitly included via --font-path. may also be specified with the TYPST_IGNORE_SYSTEM_FONTS environment variable.
  • --ignore-embedded-fonts β€” ensures fonts embedded into Typst won't be considered. may also be specified with the TYPST_IGNORE_EMBEDDED_FONTS environment variable.
  • --package-path=DIR β€” custom path to local packages, defaults to system-dependent location. may also be specified with the TYPST_PACKAGE_PATH environment variable.
  • --package-cache-path=DIR β€” custom path to package cache, defaults to system-dependent location. may also be specified with the TYPST_PACKAGE_CACHE_PATH environment variable.
  • --creation-timestamp=UNIX_TIMESTAMP β€” the document's creation date formatted as a UNIX timestamp. for more info, see <https://reproducible-builds.org/specs/source-date-epoch/>. may also be specified with the SOURCE_DATE_EPOCH environment variable.
  • --pages=PAGES β€” which pages to export. when unspecified, all pages are exported. pages to export are separated by commas, and can be either simple page numbers (e.g. 2,5 to export only pages 2 and 5) or page ranges (e.g. 2,3-6,8- to export page 2, pages 3 to 6 (inclusive), page 8 and any pages after it). page numbers are one-indexed and correspond to physical page numbers in the document (therefore not being affected by the document's page counter). πŸŽ€
  • --pdf-standard=PDF_STANDARD β€” one (or multiple comma-separated) PDF standards that Typst will enforce conformance with. possible values:
    • 1.4: PDF 1.4
    • 1.5: PDF 1.5
    • 1.6: PDF 1.6
    • 1.7: PDF 1.7
    • 2.0: PDF 2.0
    • a-1b: PDF/A-1b
    • a-1a: PDF/A-1a
    • a-2b: PDF/A-2b
    • a-2u: PDF/A-2u
    • a-2a: PDF/A-2a
    • a-3b: PDF/A-3b
    • a-3u: PDF/A-3u
    • a-3a: PDF/A-3a
    • a-4: PDF/A-4
    • a-4f: PDF/A-4f
    • a-4e: PDF/A-4e
    • ua-1: PDF/UA-1
  • --no-pdf-tags β€” by default, even when not producing a PDF/UA-1 document, a tagged PDF document is written to provide a baseline of accessibility. in some circumstances (for example when trying to reduce the size of a document) it can be desirable to disable tagged PDF.
  • --ppi=PPI [default: 144] β€” the PPI (pixels per inch) to use for PNG export.
  • --deps=PATH β€” file path to which a list of current compilation's dependencies will be written. use - to write to stdout.
  • --deps-format=DEPS_FORMAT [default: json] β€” file format to use for dependencies. possible values:
    • json: encodes as JSON, failing for non-Unicode paths
    • zero: separates paths with NULL bytes and can express all paths
    • make: emits in Make format, omitting inexpressible paths
  • -j, --jobs=JOBS β€” number of parallel jobs spawned during compilation. defaults to number of CPUs. setting it to 1 disables parallelism. multi-core slay πŸ”₯
  • --features=FEATURES β€” enables in-development features that may be changed or removed at any time. possible values: html, a11y-extras. may also be specified with the TYPST_FEATURES environment variable.
ok real talk β€” these can be changed or removed at any time, so don't build your whole personality on them πŸ™ˆ
  • --diagnostic-format=DIAGNOSTIC_FORMAT [default: human] β€” the format to emit diagnostics in. possible values: human, short.
  • --open=VIEWER β€” opens the output file with the default viewer or a specific program after compilation. ignored if output is stdout.
  • --timings=OUTPUT_JSON β€” produces performance timings of the compilation process. (experimental) the resulting JSON file can be loaded into a tracing tool such as <https://ui.perfetto.dev>. it does not contain any sensitive information apart from file names and line numbers.
  • --no-serve β€” disables the built-in HTTP server for HTML export.
  • --no-reload β€” disables the injected live reload script for HTML export. the HTML that is written to disk isn't affected either way.
  • --port=PORT β€” the port where HTML is served. defaults to the first free port in the range 3000-3005.
  • -h, --help β€” print help (see a summary with -h).
  • <INPUT> β€” path to input Typst file. use - to read input from stdin.
  • [OUTPUT] β€” path to output file (PDF, PNG, SVG, or HTML). use - to write output to stdout.

for output formats emitting one file per page (PNG & SVG), a page number template must be present if the source document renders to multiple pages. use {p} for page numbers, {0p} for zero padded page numbers and {t} for page count. for example, page-{0p}-of-{t}.png creates page-01-of-10.png, page-02-of-10.png, and so on. ⭐


ngl the whole thing is basically: point it at your <INPUT>, optionally tell it where the [OUTPUT] goes, and let her cook. no cap. 🧚

and that's the page, bestie πŸŽ€ β€” brought to you by typst-watch and dated typst-watch(1), straight from the general commands manual. go recompile something iconic. πŸ‘‘

πŸ“¦ where this page comes from