{
"name": "typst",
"description": "The Typst compiler",
"subcommands": [
{
"name": "compile",
"aliases": [
"c"
],
"description": "Compiles an input file into a supported output format",
"options": [
{
"names": [
"--root"
],
"description": "Configures the project root (for absolute paths)",
"takes_arg": true,
"arg": {
"name": "root",
"template": "folders"
}
},
{
"names": [
"--font-path"
],
"description": "Adds additional directories to search for fonts",
"takes_arg": true,
"arg": {
"name": "font_paths",
"template": "filepaths"
}
},
{
"names": [
"--diagnostic-format"
],
"description": "The format to emit diagnostics in",
"takes_arg": true,
"arg": {
"name": "diagnostic_format",
"suggestions": [
"human",
"short"
]
}
},
{
"names": [
"-f",
"--format"
],
"description": "The format of the output file, inferred from the extension by default",
"takes_arg": true,
"arg": {
"name": "format",
"suggestions": [
"pdf",
"png",
"svg"
]
}
},
{
"names": [
"--open"
],
"description": "Opens the output file using the default viewer after compilation",
"takes_arg": true,
"arg": {
"name": "open",
"is_variadic": true
}
},
{
"names": [
"--ppi"
],
"description": "The PPI (pixels per inch) to use for PNG export",
"takes_arg": true,
"arg": {
"name": "ppi"
}
},
{
"names": [
"--flamegraph"
],
"description": "Produces a flamegraph of the compilation process",
"takes_arg": true,
"arg": {
"name": "flamegraph",
"is_variadic": true,
"template": "filepaths"
}
},
{
"names": [
"-h",
"--help"
],
"description": "Print help"
}
],
"args": [
{
"name": "input",
"description": "Path to input Typst file"
},
{
"name": "output",
"description": "Path to output file (PDF, PNG, or SVG)",
"template": "filepaths"
}
]
},
{
"name": "watch",
"aliases": [
"w"
],
"description": "Watches an input file and recompiles on changes",
"options": [
{
"names": [
"--root"
],
"description": "Configures the project root (for absolute paths)",
"takes_arg": true,
"arg": {
"name": "root",
"template": "folders"
}
},
{
"names": [
"--font-path"
],
"description": "Adds additional directories to search for fonts",
"takes_arg": true,
"arg": {
"name": "font_paths",
"template": "filepaths"
}
},
{
"names": [
"--diagnostic-format"
],
"description": "The format to emit diagnostics in",
"takes_arg": true,
"arg": {
"name": "diagnostic_format",
"suggestions": [
"human",
"short"
]
}
},
{
"names": [
"-f",
"--format"
],
"description": "The format of the output file, inferred from the extension by default",
"takes_arg": true,
"arg": {
"name": "format",
"suggestions": [
"pdf",
"png",
"svg"
]
}
},
{
"names": [
"--open"
],
"description": "Opens the output file using the default viewer after compilation",
"takes_arg": true,
"arg": {
"name": "open",
"is_variadic": true
}
},
{
"names": [
"--ppi"
],
"description": "The PPI (pixels per inch) to use for PNG export",
"takes_arg": true,
"arg": {
"name": "ppi"
}
},
{
"names": [
"--flamegraph"
],
"description": "Produces a flamegraph of the compilation process",
"takes_arg": true,
"arg": {
"name": "flamegraph",
"is_variadic": true,
"template": "filepaths"
}
},
{
"names": [
"-h",
"--help"
],
"description": "Print help"
}
],
"args": [
{
"name": "input",
"description": "Path to input Typst file"
},
{
"name": "output",
"description": "Path to output file (PDF, PNG, or SVG)",
"template": "filepaths"
}
]
},
{
"name": "query",
"description": "Processes an input file to extract provided metadata",
"options": [
{
"names": [
"--root"
],
"description": "Configures the project root (for absolute paths)",
"takes_arg": true,
"arg": {
"name": "root",
"template": "folders"
}
},
{
"names": [
"--font-path"
],
"description": "Adds additional directories to search for fonts",
"takes_arg": true,
"arg": {
"name": "font_paths",
"template": "filepaths"
}
},
{
"names": [
"--diagnostic-format"
],
"description": "The format to emit diagnostics in",
"takes_arg": true,
"arg": {
"name": "diagnostic_format",
"suggestions": [
"human",
"short"
]
}
},
{
"names": [
"--field"
],
"description": "Extracts just one field from all retrieved elements",
"takes_arg": true,
"arg": {
"name": "field"
}
},
{
"names": [
"--format"
],
"description": "The format to serialize in",
"takes_arg": true,
"arg": {
"name": "format",
"suggestions": [
"json",
"yaml"
]
}
},
{
"names": [
"--one"
],
"description": "Expects and retrieves exactly one element"
},
{
"names": [
"-h",
"--help"
],
"description": "Print help"
}
],
"args": [
{
"name": "input",
"description": "Path to input Typst file"
},
{
"name": "selector",
"description": "Defines which elements to retrieve"
}
]
},
{
"name": "fonts",
"description": "Lists all discovered fonts in system and custom font paths",
"options": [
{
"names": [
"--font-path"
],
"description": "Adds additional directories to search for fonts",
"takes_arg": true,
"arg": {
"name": "font_paths",
"template": "filepaths"
}
},
{
"names": [
"--variants"
],
"description": "Also lists style variants of each font family"
},
{
"names": [
"-h",
"--help"
],
"description": "Print help"
}
]
},
{
"name": "update",
"description": "Self update the Typst CLI (disabled)",
"options": [
{
"names": [
"--force"
],
"description": "Forces a downgrade to an older version (required for downgrading)"
},
{
"names": [
"--revert"
],
"description": "Reverts to the version from before the last update (only possible if `typst update` has previously ran)"
},
{
"names": [
"-h",
"--help"
],
"description": "Print help"
}
],
"args": [
{
"name": "version",
"description": "Which version to update to (defaults to latest)"
}
]
},
{
"name": "help",
"description": "Print this message or the help of the given subcommand(s)",
"subcommands": [
{
"name": "compile",
"description": "Compiles an input file into a supported output format"
},
{
"name": "watch",
"description": "Watches an input file and recompiles on changes"
},
{
"name": "query",
"description": "Processes an input file to extract provided metadata"
},
{
"name": "fonts",
"description": "Lists all discovered fonts in system and custom font paths"
},
{
"name": "update",
"description": "Self update the Typst CLI (disabled)"
},
{
"name": "help",
"description": "Print this message or the help of the given subcommand(s)"
}
]
}
],
"options": [
{
"names": [
"--cert"
],
"description": "Path to a custom CA certificate to use when making network requests",
"takes_arg": true,
"arg": {
"name": "cert",
"template": "filepaths"
}
},
{
"names": [
"-v",
"--verbosity"
],
"description": "Sets the level of logging verbosity: -v = warning & error, -vv = info, -vvv = debug, -vvvv = trace"
},
{
"names": [
"-h",
"--help"
],
"description": "Print help"
},
{
"names": [
"-V",
"--version"
],
"description": "Print version"
}
]
}