id = "typst" name = "Typst" homepage = "https://typst.app" description = "A markup-based typesetting system and compiler." executables = ["typst"] [commands] format = 1 label = "Typst" description = "Compile a Typst document. Watch, query and font-listing modes are left out." quality = "ai-draft" base = "fig:typst" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/typst.ts" license = "MIT" [[commands.subcommand]] path = ["compile"] label = "Compile document" description = "Compile a .typ file to PDF, PNG or SVG. The format is inferred from the output extension unless set." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/typst.ts" license = "MIT" [[commands.subcommand.field]] id = "input" label = "Input file" type = "path" position = 0 path = { kind = "file", role = "input", must_exist = true } sources = ["fig"] [[commands.subcommand.field]] id = "output" label = "Output file" description = "Defaults to the input name with the output extension." type = "path" position = 1 path = { kind = "file", role = "output", must_exist = false } effect = "overwrite" sources = ["fig"] [[commands.subcommand.field]] id = "format" label = "Output format" type = "string" option = ["--format", "-f"] suggestions = [{ value = "pdf", label = "PDF" }, { value = "png", label = "PNG" }, { value = "svg", label = "SVG" }] sources = ["fig"] [[commands.subcommand.field]] id = "root" label = "Project root" type = "path" option = ["--root"] path = { kind = "directory", role = "input", must_exist = true } sources = ["fig"] [[commands.subcommand.field]] id = "font_path" label = "Extra font directories" type = "path" option = ["--font-path"] multiple = true path = { kind = "directory", role = "input", must_exist = true } sources = ["fig"] [[commands.subcommand.field]] id = "ppi" label = "PNG resolution (PPI)" type = "integer" option = ["--ppi"] sources = ["fig"] [[commands.subcommand.task]] id = "pdf" label = "Compile to PDF" fields = ["input", "output", "root", "font_path"] required = ["input"] [[commands.subcommand.task]] id = "png" label = "Export PNG" set = { format = ["png"] } lock = ["format"] fields = ["input", "output", "format", "ppi"] required = ["input"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["input", "output", "format"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["root", "font_path", "ppi"]