Typst
$ typst Official Low RiskTypst (typst) is a fast, programmable typesetting system replacing LaTeX for reports, papers, and invoices. Written in Rust, it compiles .typ files to PDF, SVG, or PNG with millisecond incremental builds and includes typst query to extract document metadata or headings as JSON.
brew install typst Typst compiles local .typ files to PDF/SVG/PNG in milliseconds with deterministic exit codes and typst query JSON extraction—ideal directly as a CLI.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Single-pass typst compile and typst query (JSON stdout) with clean diagnostics, non-zero exit codes on errors, and zero interactive prompts.
typst queryemits structured JSON for any selector- Deterministic millisecond compilation without multi-pass LaTeX reruns
Sandboxed filesystem access rooted at --root and purely local compilation with no arbitrary shell execution like LaTeX --shell-escape.
- No
--shell-escapearbitrary code execution risk --rootconfines file reads to the project directory
Single self-contained Rust binary (~30 MB) needing no multi-gigabyte TeX distribution; installs via Homebrew, Cargo, or binary.
brew install typstandcargo install --locked typst-cli
Dramatically faster and cleaner for agents generating PDFs, reports, and diagrams than LaTeX.
- Supports PDF, SVG, PNG output and structured
queryintrospection
Official Typst GmbH repository (typst/typst) actively developed under Apache-2.0.
- Official Typst GitHub organization
Crisp, modern official documentation at typst.app/docs and clear compiler error diagnostics.
- Official docs at typst.app/docs/
Security, Auth & Guardrails
No credentials required; offline compiler with optional local package cache in OS cache directories.
CLI is free and open-source (Apache-2.0); Typst's optional collaborative web app has free and paid tiers.
# Typst CLI Agent Rules - Run `typst compile` rather than `typst watch` in synchronous agent turns. - Pin `--root` to the project directory when compiling untrusted `.typ` files. - Use `typst query` to verify document structure or metadata programmatically.
Agent-Ready Command Recipes
Safe Read-Only Queries
typst query main.typ "heading"
Evaluates a Typst document and outputs matching elements/headings as structured JSON without writing files.
typst fonts
Lists font families discovered by Typst locally.
Controlled Writes & Previews
typst compile main.typ dist/main.pdf
Compiles main.typ deterministically into dist/main.pdf.
Strengths for Agents
- + Millisecond single-binary Rust compiler replaces multi-gigabyte TeX Live installs.
- +
typst queryextracts headings, labels, and metadata as clean JSON. - + Project-rooted sandbox prevents arbitrary shell execution during document builds.
Caveats & Pitfalls
- !
typst watchblocks continuously until terminated. - ! First-time compilation using
@preview/...Universe packages requires network access to fetch packages into cache.