typst-watch(1)

NAME
typst-watch - Watches an input file and recompiles on changes

SYNOPSIS
typst-watch [--root] [--input] [--font-path] [--ignore-system-fonts] [--creation-timestamp] [--diagnostic-format] [--package-path] [--package-cache-path] [-j|--jobs] [--pages] [--make-deps] [-f|--format] [--open] [--ppi] [--timings] [--pdf-standard] [-h|--help] <INPUT> [OUTPUT]

DESCRIPTION
Watches an input file and recompiles on changes

OPTIONS

--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`

--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`

--creation-timestamp=UNIX_TIMESTAMP
    The document's creation date formatted as a UNIX timestamp. For more information, see <https://reproducible-builds.org/specs/source-date-epoch/>.
    May also be specified with the SOURCE_DATE_EPOCH environment variable.

--diagnostic-format=DIAGNOSTIC_FORMAT [default: human]
    The format to emit diagnostics in
    [possible values: human, short]

--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.

-j, --jobs=JOBS
    Number of parallel jobs spawned during compilation, defaults to number of CPUs. Setting it to 1 disables parallelism

--pages=PAGES
    Which pages to export. When unspecified, all document 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 real page numbers in the document (therefore not being affected by the document's page counter).

--make-deps=PATH
    Output a Makefile rule describing the current compilation

-f, --format=FORMAT
    The format of the output file, inferred from the extension by default
    [possible values: pdf, png, svg]

--open=VIEWER
    Opens the output file with the default viewer or a specific program after compilation Ignored if output is stdout.

--ppi=PPI [default: 144]
    The PPI (pixels per inch) to use for PNG export

--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.

--pdf-standard=PDF_STANDARD
    One (or multiple comma-separated) PDF standards that Typst will enforce conformance with
    Possible values:

    •   1.7: PDF 1.7

    •   a-2b: PDF/A-2b

-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 or SVG). 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.