{
  "name": "trunk",
  "description": "An all-in-one tool for scalably checking, formatting, and monitoring code",
  "options": [
    {
      "names": [
        "-h",
        "--help"
      ],
      "description": "Usage information",
      "isPersistent": true
    },
    {
      "names": [
        "--version"
      ],
      "description": "The version",
      "isPersistent": true
    },
    {
      "names": [
        "-m",
        "--monitor"
      ],
      "description": "Enable the trunk daemon to monitor file changes in your repo",
      "isPersistent": true,
      "args": [
        {
          "name": "value",
          "suggestions": [
            "true",
            "false"
          ]
        }
      ]
    },
    {
      "names": [
        "--ci"
      ],
      "description": "Run in continuous integration mode",
      "isPersistent": true
    },
    {
      "names": [
        "-o",
        "--output"
      ],
      "description": "Output format",
      "isPersistent": true,
      "args": [
        {
          "name": "format",
          "suggestions": [
            "text",
            "json"
          ]
        }
      ]
    },
    {
      "names": [
        "--no-progress"
      ],
      "description": "Don't show progress updates",
      "isPersistent": true,
      "exclusiveOn": [
        "--ci-progress"
      ]
    },
    {
      "names": [
        "--ci-progress"
      ],
      "description": "Show updates every 30 seconds without clearing terminal screen (implicit with --ci)",
      "isPersistent": true,
      "exclusiveOn": [
        "--no-progress"
      ]
    },
    {
      "names": [
        "--action_timeout"
      ],
      "description": "How long actions (downloads, lint runs, etc.) have to time out, with units (s, ms, etc)",
      "isPersistent": true,
      "args": [
        {
          "name": "timeout"
        }
      ]
    },
    {
      "names": [
        "-v",
        "--verbose"
      ],
      "description": "Output details about what's happening under the hood",
      "isPersistent": true
    }
  ],
  "subcommands": [
    {
      "name": "init",
      "description": "Setup trunk in this repo",
      "options": [
        {
          "names": [
            "--lock"
          ],
          "description": "Add sha256s to trunk.yaml for additional verification"
        },
        {
          "names": [
            "--check-sample"
          ],
          "description": "Run `trunk check sample` without prompting",
          "exclusiveOn": [
            "--nocheck-sample"
          ]
        },
        {
          "names": [
            "--nocheck-sample"
          ],
          "description": "Do not run `trunk check sample` post-init",
          "exclusiveOn": [
            "--check-sample"
          ]
        },
        {
          "names": [
            "--force"
          ],
          "description": "Overwrite existing trunk.yaml"
        }
      ]
    },
    {
      "name": "check",
      "description": "Universal code checker",
      "options": [
        {
          "names": [
            "-y",
            "--fix"
          ],
          "description": "Automatically apply all fixes without prompting"
        },
        {
          "names": [
            "-a",
            "--all"
          ],
          "description": "Run on all files instead of only changed files"
        },
        {
          "names": [
            "-n",
            "--no-fix"
          ],
          "description": "Don't automatically apply fixes"
        },
        {
          "names": [
            "--include-existing-autofixes"
          ],
          "description": "Show autofixes for existing issues"
        },
        {
          "names": [
            "--force"
          ],
          "description": "Run on all files, even if ignored"
        },
        {
          "names": [
            "--diff"
          ],
          "description": "Diff printing mode",
          "args": [
            {
              "name": "mode",
              "suggestions": [
                "none",
                "compact",
                "full"
              ]
            }
          ]
        },
        {
          "names": [
            "--filter"
          ],
          "description": "Filter the set of executed linters and/or the returned codes; use a leading '-' to exclude a linter or code",
          "args": [
            {
              "name": "linter or code",
              "isVariadic": true
            }
          ]
        },
        {
          "names": [
            "--exclude"
          ],
          "description": "Shorthand for an inverse --filter",
          "args": [
            {
              "name": "linter or code",
              "isVariadic": true
            }
          ]
        },
        {
          "names": [
            "-j",
            "--jobs"
          ],
          "description": "Number of concurrent jobs (does not affect background linting)",
          "args": [
            {
              "name": "number"
            }
          ]
        },
        {
          "names": [
            "--sample"
          ],
          "description": "Run each linter on N files (implies --no-fix and --all if no paths are given)",
          "args": [
            {
              "name": "N"
            },
            {
              "name": "paths",
              "isOptional": true,
              "isVariadic": true,
              "template": "filepaths"
            }
          ]
        },
        {
          "names": [
            "--upstream"
          ],
          "description": "Upstream branch used to compute changed files (autodetected by default)",
          "args": [
            {
              "name": "branch"
            }
          ]
        }
      ],
      "args": [
        {
          "name": "paths",
          "isOptional": true,
          "isVariadic": true,
          "template": "filepaths"
        }
      ],
      "subcommands": [
        {
          "name": "upgrade",
          "description": "Upgrade all linters to latest versions",
          "args": [
            {
              "name": "linters",
              "description": "Linter(s) to upgrade (upgrades all if none specified)",
              "isVariadic": true
            }
          ]
        },
        {
          "name": "download",
          "description": "Download all files needed for trunk to work offline",
          "args": [
            {
              "name": "tools",
              "description": "Tool(s) to download (if omitted, downloads all configured tools)",
              "isVariadic": true
            }
          ]
        },
        {
          "name": "enable",
          "description": "Enable linters",
          "args": [
            {
              "name": "linters",
              "description": "Linter(s) to enable",
              "isVariadic": true
            }
          ]
        },
        {
          "name": "disable",
          "description": "Disable linters",
          "args": [
            {
              "name": "linters",
              "description": "Linter(s) to disable",
              "isVariadic": true
            }
          ]
        }
      ]
    },
    {
      "name": "fmt",
      "description": "Universal code formatter",
      "options": [
        {
          "names": [
            "-a",
            "--all"
          ],
          "description": "Run on all files instead of only changed files"
        },
        {
          "names": [
            "-n",
            "--no-fix"
          ],
          "description": "Don't automatically apply fixes"
        },
        {
          "names": [
            "--include-existing-autofixes"
          ],
          "description": "Show autofixes for existing issues"
        },
        {
          "names": [
            "--force"
          ],
          "description": "Run on all files, even if ignored"
        },
        {
          "names": [
            "--diff"
          ],
          "description": "Diff printing mode",
          "args": [
            {
              "name": "mode",
              "suggestions": [
                "none",
                "compact",
                "full"
              ]
            }
          ]
        },
        {
          "names": [
            "--filter"
          ],
          "description": "Filter the set of executed linters and/or the returned codes; use a leading '-' to exclude a linter or code",
          "args": [
            {
              "name": "linter or code",
              "isVariadic": true
            }
          ]
        },
        {
          "names": [
            "--exclude"
          ],
          "description": "Shorthand for an inverse --filter",
          "args": [
            {
              "name": "linter or code",
              "isVariadic": true
            }
          ]
        },
        {
          "names": [
            "-j",
            "--jobs"
          ],
          "description": "Number of concurrent jobs (does not affect background linting)",
          "args": [
            {
              "name": "number"
            }
          ]
        },
        {
          "names": [
            "--sample"
          ],
          "description": "Run each linter on N files (implies --no-fix and --all if no paths are given)",
          "args": [
            {
              "name": "N"
            },
            {
              "name": "paths",
              "isOptional": true,
              "isVariadic": true,
              "template": "filepaths"
            }
          ]
        },
        {
          "names": [
            "--upstream"
          ],
          "description": "Upstream branch used to compute changed files (autodetected by default)",
          "args": [
            {
              "name": "branch"
            }
          ]
        }
      ],
      "args": [
        {
          "name": "paths",
          "isOptional": true,
          "isVariadic": true,
          "template": "filepaths"
        }
      ]
    },
    {
      "name": "upgrade",
      "description": "Upgrade trunk to the latest release"
    },
    {
      "name": "git-hooks",
      "description": "Git hooks",
      "subcommands": [
        {
          "name": "install",
          "description": "Install trunk git hooks"
        }
      ]
    },
    {
      "name": "cache",
      "description": "Cache management",
      "subcommands": [
        {
          "name": "clean",
          "description": "Clean the cache",
          "options": [
            {
              "names": [
                "--all"
              ],
              "description": "Delete all files (including results cache)"
            },
            {
              "names": [
                "-n",
                "--dry-run"
              ],
              "description": "Print all directories that would be cleaned out without running deletion"
            }
          ]
        }
      ]
    },
    {
      "name": "print-config",
      "description": "Print the resolved trunk config"
    },
    {
      "name": "daemon",
      "description": "Daemon management",
      "subcommands": [
        {
          "name": "launch",
          "description": "Start the trunk daemon if its not already running"
        },
        {
          "name": "shutdown",
          "description": "Shutdown the trunk daemon if it is running"
        },
        {
          "name": "status",
          "description": "Report daemon status"
        }
      ]
    }
  ]
}
