Scroll to navigation

typst-watch(1) General Commands Manual typst-watch(1)

NAME

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

SYNOPSIS

typst-watch [--root] [--input] [--font-path] [--diagnostic-format] [-f|--format] [--open] [--ppi] [--timings] [-h|--help] <INPUT> [OUTPUT]

DESCRIPTION

Watches an input file and recompiles on changes

OPTIONS

Configures the project root (for absolute paths)
May also be specified with the TYPST_ROOT environment variable.
Add a string key-value pair visible through `sys.inputs`
Adds additional directories to search for fonts
May also be specified with the TYPST_FONT_PATHS environment variable.
The format to emit diagnostics in

[possible values: human, short]

The format of the output file, inferred from the extension by default

[possible values: pdf, png, svg]

Opens the output file using the default viewer after compilation
The PPI (pixels per inch) to use for PNG export
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.

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)
typst-watch