{
  "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
    },
    "source": [
      {
        "id": "fig",
        "kind": "completion",
        "url": "https://github.com/withfig/autocomplete/blob/master/src/typst.ts",
        "license": "MIT"
      }
    ],
    "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.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/typst.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "input",
            "label": "Input file",
            "type": "path",
            "position": 0,
            "path": {
              "kind": "file",
              "role": "input",
              "must_exist": true
            },
            "sources": [
              "fig"
            ]
          },
          {
            "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"
            ]
          },
          {
            "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"
            ]
          },
          {
            "id": "root",
            "label": "Project root",
            "type": "path",
            "option": [
              "--root"
            ],
            "path": {
              "kind": "directory",
              "role": "input",
              "must_exist": true
            },
            "sources": [
              "fig"
            ]
          },
          {
            "id": "font_path",
            "label": "Extra font directories",
            "type": "path",
            "option": [
              "--font-path"
            ],
            "multiple": true,
            "path": {
              "kind": "directory",
              "role": "input",
              "must_exist": true
            },
            "sources": [
              "fig"
            ]
          },
          {
            "id": "ppi",
            "label": "PNG resolution (PPI)",
            "type": "integer",
            "option": [
              "--ppi"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "pdf",
            "label": "Compile to PDF",
            "fields": [
              "input",
              "output",
              "root",
              "font_path"
            ],
            "required": [
              "input"
            ]
          },
          {
            "id": "png",
            "label": "Export PNG",
            "set": {
              "format": [
                "png"
              ]
            },
            "lock": [
              "format"
            ],
            "fields": [
              "input",
              "output",
              "format",
              "ppi"
            ],
            "required": [
              "input"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "input",
              "output",
              "format"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "root",
              "font_path",
              "ppi"
            ]
          }
        ]
      }
    ]
  }
}
