{
  "id": "trunk",
  "name": "Trunk",
  "description": "All-in-one tool for checking, formatting and monitoring code.",
  "homepage": "https://trunk.io",
  "executables": [
    "trunk"
  ],
  "commands": {
    "format": 1,
    "label": "Trunk",
    "description": "Run Trunk checks and formatters. Other subcommands are outside this form.",
    "quality": "ai-draft",
    "base": "fig:trunk",
    "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/trunk.ts",
        "license": "MIT"
      }
    ],
    "subcommand": [
      {
        "path": [
          "check"
        ],
        "label": "Check code",
        "description": "Run linters on changed files, or all files.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/trunk.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "paths",
            "label": "Paths",
            "type": "path",
            "position": 0,
            "multiple": true,
            "path": {
              "kind": "any",
              "role": "input"
            },
            "sources": [
              "fig"
            ]
          },
          {
            "id": "all",
            "label": "All files",
            "type": "boolean",
            "option": [
              "--all",
              "-a"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "fix",
            "label": "Apply fixes",
            "type": "boolean",
            "option": [
              "--fix",
              "-y"
            ],
            "effect": "overwrite",
            "sources": [
              "fig"
            ]
          },
          {
            "id": "no_fix",
            "label": "Do not fix",
            "type": "boolean",
            "option": [
              "--no-fix",
              "-n"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "filter",
            "label": "Filter linters",
            "type": "string",
            "option": [
              "--filter"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "diff",
            "label": "Diff mode",
            "type": "string",
            "option": [
              "--diff"
            ],
            "suggestions": [
              {
                "value": "none",
                "label": "none"
              },
              {
                "value": "compact",
                "label": "compact"
              },
              {
                "value": "full",
                "label": "full"
              }
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "upstream",
            "label": "Upstream branch",
            "type": "string",
            "option": [
              "--upstream"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "changed",
            "label": "Check changed files",
            "fields": [
              "paths",
              "no_fix"
            ],
            "required": []
          },
          {
            "id": "all",
            "label": "Check everything",
            "set": {
              "all": [
                true
              ]
            },
            "fields": [
              "paths",
              "all",
              "no_fix",
              "filter"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "paths",
              "all",
              "fix",
              "no_fix"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "filter",
              "diff",
              "upstream"
            ]
          }
        ]
      },
      {
        "path": [
          "fmt"
        ],
        "label": "Format code",
        "description": "Run formatters on changed files, or all files.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/trunk.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "paths",
            "label": "Paths",
            "type": "path",
            "position": 0,
            "multiple": true,
            "path": {
              "kind": "any",
              "role": "input"
            },
            "sources": [
              "fig"
            ]
          },
          {
            "id": "all",
            "label": "All files",
            "type": "boolean",
            "option": [
              "--all",
              "-a"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "no_fix",
            "label": "Do not fix",
            "type": "boolean",
            "option": [
              "--no-fix",
              "-n"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "filter",
            "label": "Filter formatters",
            "type": "string",
            "option": [
              "--filter"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "upstream",
            "label": "Upstream branch",
            "type": "string",
            "option": [
              "--upstream"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "fmt",
            "label": "Format changed files",
            "fields": [
              "paths"
            ],
            "required": []
          },
          {
            "id": "all",
            "label": "Format everything",
            "set": {
              "all": [
                true
              ]
            },
            "fields": [
              "paths",
              "all",
              "filter"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "paths",
              "all",
              "no_fix"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "filter",
              "upstream"
            ]
          }
        ]
      }
    ]
  }
}
