{
  "id": "xcodes",
  "name": "xcodes",
  "description": "Manages Xcode versions installed on a Mac.",
  "executables": [
    "xcodes"
  ],
  "platforms": [
    "macos"
  ],
  "commands": {
    "format": 1,
    "label": "Manage Xcode versions",
    "description": "List, install and select Xcode versions. Credentials and other subcommands are left out.",
    "quality": "ai-draft",
    "base": "fig:xcodes",
    "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/xcodes.ts",
        "license": "MIT"
      }
    ],
    "subcommand": [
      {
        "path": [
          "list"
        ],
        "label": "List available versions",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/xcodes.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "data_source",
            "label": "Data source",
            "type": "enum",
            "option": [
              "--data-source"
            ],
            "choices": [
              {
                "value": "xcodereleases",
                "label": "xcodereleases"
              },
              {
                "value": "apple",
                "label": "Apple"
              }
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "directory",
            "label": "Xcode directory",
            "type": "path",
            "option": [
              "--directory"
            ],
            "path": {
              "kind": "directory",
              "role": "input",
              "must_exist": true
            },
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "list",
            "label": "List versions",
            "fields": [
              "data_source",
              "directory"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "data_source",
              "directory"
            ]
          }
        ]
      },
      {
        "path": [
          "install"
        ],
        "label": "Download and install Xcode",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/xcodes.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "version",
            "label": "Version",
            "type": "string",
            "position": 0,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "latest",
            "label": "Latest release",
            "type": "boolean",
            "option": [
              "--latest"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "latest_prerelease",
            "label": "Latest prerelease",
            "type": "boolean",
            "option": [
              "--latest-prerelease"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "path",
            "label": "Local Xcode.xip",
            "type": "path",
            "option": [
              "--path"
            ],
            "path": {
              "kind": "file",
              "role": "input",
              "must_exist": true
            },
            "sources": [
              "fig"
            ]
          },
          {
            "id": "directory",
            "label": "Install directory",
            "description": "Defaults to /Applications.",
            "type": "path",
            "option": [
              "--directory"
            ],
            "path": {
              "kind": "directory",
              "role": "output",
              "must_exist": true
            },
            "sources": [
              "fig"
            ]
          },
          {
            "id": "experimental_unxip",
            "label": "Experimental unxip",
            "type": "boolean",
            "option": [
              "--experimental-unxip"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "latest",
            "label": "Install latest",
            "fields": [
              "latest",
              "directory"
            ],
            "set": {
              "latest": [
                true
              ]
            },
            "lock": [
              "latest"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "version",
              "latest",
              "latest_prerelease",
              "path",
              "directory",
              "experimental_unxip"
            ]
          }
        ]
      },
      {
        "path": [
          "select"
        ],
        "label": "Select an Xcode",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/xcodes.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "version_or_path",
            "label": "Version or path",
            "type": "string",
            "position": 0,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "print_path",
            "label": "Print selected path",
            "type": "boolean",
            "option": [
              "-p",
              "--print-path"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "select",
            "label": "Select version",
            "fields": [
              "version_or_path"
            ],
            "required": [
              "version_or_path"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "version_or_path",
              "print_path"
            ]
          }
        ]
      }
    ]
  }
}
