---
name: "typst-eval"
section: "1"
platform: "linux"
package: "typst"
version: "1:0.15.1-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/typst-eval"
---

# typst-eval(1)

Evaluates a piece of Typst code, optionally in the context of a document

## NAME

typst-eval - Evaluates a piece of Typst code, optionally in the context of a document

## SYNOPSIS

**typst-eval** \[**--in**\] \[**--target**\] \[**--format**\] \[**--pretty**\] \[**--root**\] \[**--input**\] \[**--font-path**\] \[**--ignore-system-fonts**\] \[**--ignore-embedded-fonts**\] \[**--package-path**\] \[**--package-cache-path**\] \[**--creation-timestamp**\] \[**-j**\|**--jobs**\] \[**--features**\] \[**--diagnostic-format**\] \[**-h**\|**--help**\] \<*EXPRESSION*\>

## DESCRIPTION

Evaluates a piece of Typst code, optionally in the context of a document

## OPTIONS

- **--in** *\<IN\>*

  A file in whose context to evaluate the code. Can be used to introspect the document. Use \`-\` to read input from stdin

- **--target** *\<TARGET\>* \[default: paged\]

  The target to compile for\

  *Possible values:*

  - •

    paged: PDF and image formats

  - •

    html: HTML

  - •

    bundle: Bundle

- **--format** *\<FORMAT\>* \[default: json\]

  The format to serialize in\

  *Possible values:*

  - •

    json

  - •

    yaml

- **--pretty**

  Whether to pretty-print the serialized output.

  Only applies to JSON format.

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

  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 information, see \<https://reproducible-builds.org/specs/source-date-epoch/\>.

  May also be specified with the **SOURCE\_DATE\_EPOCH** environment variable.

- **-j**, **--jobs** *\<JOBS\>*

  Number of parallel jobs spawned during compilation. Defaults to number of CPUs. Setting it to 1 disables parallelism

- **--features** *\<FEATURES\>*

  Enables in-development features that may be changed or removed at any time\

  *Possible values:*

  - •

    html

  - •

    bundle

  - •

    a11y-extras

  May also be specified with the **TYPST\_FEATURES** environment variable.

- **--diagnostic-format** *\<DIAGNOSTIC\_FORMAT\>* \[default: human\]

  The format to emit diagnostics in\

  *Possible values:*

  - •

    human

  - •

    short

- **-h**, **--help**

  Print help (see a summary with '-h')

- \<*EXPRESSION*\>

  The piece of Typst code to evaluate
