KosmoKrator

rendering

Typst CLI for Headless Automation

Use the Typst CLI for headless automation with headless JSON commands, schema discovery, credentials, and permission controls.

1 functions 0 read 1 write No credentials auth

Typst CLI for Headless Automation

Use KosmoKrator as a non-interactive integration runtime for local automations and wrappers.

Use headless automation when another tool needs a stable local command surface. The Typst CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.

Command Shape

# Typst CLI for Headless Automation
kosmokrator integrations:configure typst --enable --read allow --write ask --json
kosmo integrations:call typst.render_typst '{"markup":"example_markup","title":"example_title"}' --json

Discovery Before Execution

Agents and scripts can inspect Typst docs and schemas before choosing a function.

kosmo integrations:docs typst --json
kosmo integrations:docs typst.render_typst --json
kosmo integrations:schema typst.render_typst --json
kosmo integrations:search "Typst" --json
kosmo integrations:list --json

Useful Typst CLI Functions

FunctionTypeParametersDescription
typst.render_typst Write markup, title Render a Typst document to PDF. Pass valid Typst markup and get back a downloadable PDF link. Use this tool to generate formatted documents: reports, invoices, proposals, summaries, letters, tables, and more. Example markup: ``` #set page(margin: 2cm) #set text(size: 11pt) = Quarterly Report == Summary Revenue increased by *15%* compared to last quarter. #table( columns: (1fr, 1fr, 1fr), [*Metric*], [*Q1*], [*Q2*], [Revenue], [$1.2M], [$1.38M], [Users], [12,000], [15,400], ) ``` Key Typst syntax: - `= Heading` for headings (`==` for h2, `===` for h3) - `*bold*` for bold, `_italic_` for italic - `#table(columns: ..., [...], [...])` for tables - `#set page(margin: 2cm)` for page settings - `#set text(size: 12pt, font: "...")` for text settings - `- item` for bullet lists, `+ item` for numbered lists - `#line(length: 100%)` for horizontal rules - `#align(center)[...]` for alignment - `#v(1em)` for vertical spacing

Automation Notes

Related Typst CLI Pages