Compile project
typst_compileCompile a Typst project with the local CLI to check builds after edits, returning file-and-line errors or warnings, output paths, and optional inline PNG page previews.
Instructions
Compile a project with the local typst CLI and return errors/warnings with file and line, plus the output path. Use it after edits to check the document builds. format 'png' with preview_pages>0 returns page images inline so you can look at the layout. Packages (@preview/...) are downloaded automatically.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ppi | No | png resolution | |
| format | No | ||
| main_file | No | Entry file; defaults to the project's main file | |
| project_id | Yes | Project ID from typst_list_projects, e.g. 'pAbC123dEf456gHi789jKl' | |
| output_path | No | Local output path; for png/svg '{p}' is replaced by the page number | |
| preview_pages | No | png only: return the first N pages as images |