{
  "id": "swiftly",
  "name": "Swiftly",
  "homepage": "https://www.swift.org/swiftly/",
  "description": "A toolchain manager for Swift.",
  "executables": [
    "swiftly"
  ],
  "dotfiles": {
    "paths": [
      "~/.local/share/swiftly/config.json",
      "[appData]/swiftly/config.json"
    ],
    "exclude": [
      "~/.local/share/swiftly/env.sh",
      "~/.local/share/swiftly/toolchains/",
      "~/.local/share/swiftly/bin/",
      "[appData]/swiftly/env",
      "[appData]/swiftly/toolchains/",
      "[appData]/swiftly/bin/"
    ],
    "secret": [],
    "side_effect": false
  },
  "commands": {
    "format": 1,
    "label": "Swiftly",
    "description": "Install a Swift toolchain or switch the one in use. Source: swiftly CLI reference. Other subcommands (list, update, uninstall, run) are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "subcommand": [
      {
        "path": [
          "install"
        ],
        "label": "Install a toolchain",
        "description": "Install a stable release or snapshot toolchain; with no version, installs the one selected by .swift-version.",
        "source": [
          {
            "id": "ref",
            "kind": "manual",
            "url": "https://raw.githubusercontent.com/swiftlang/swiftly/HEAD/Documentation/SwiftlyDocs.docc/swiftly-cli-reference.md",
            "revision": "2026-10-27",
            "evidence": "swiftly install [<version>] [--use] [--verify] [--no-verify] [--post-install-file=<post-install-file>] [--progress-file=<progress-file>] [--format=<format>] [--assume-yes] [--verbose] [--version] [--help]\n--use: Mark the newly installed toolchain as in-use.\n--verify: Verify (or not) the toolchain's PGP signature before proceeding with installation.\n--no-verify: Verify (or not) the toolchain's PGP signature before proceeding with installation.\n--assume-yes: Disable confirmation prompts by assuming 'yes'\n--verbose: Enable verbose reporting from swiftly\n$ swiftly install latest\n$ swiftly install 5.7-snapshot\n"
          }
        ],
        "field": [
          {
            "id": "version",
            "label": "Toolchain version",
            "description": "latest, a version such as 5.4.2 or 5.6, or a snapshot such as main-snapshot.",
            "type": "string",
            "position": 0,
            "suggestions": [
              {
                "value": "latest",
                "label": "Latest stable"
              },
              {
                "value": "main-snapshot",
                "label": "Latest main snapshot"
              }
            ],
            "sources": [
              "ref"
            ]
          },
          {
            "id": "use",
            "label": "Use after installing",
            "type": "boolean",
            "option": [
              "--use"
            ],
            "sources": [
              "ref"
            ]
          },
          {
            "id": "verify",
            "label": "Verify signature",
            "type": "boolean",
            "option": [
              "--verify"
            ],
            "false_option": "--no-verify",
            "sources": [
              "ref"
            ]
          },
          {
            "id": "assume_yes",
            "label": "Assume yes",
            "type": "boolean",
            "option": [
              "--assume-yes"
            ],
            "sources": [
              "ref"
            ]
          },
          {
            "id": "verbose",
            "label": "Verbose",
            "type": "boolean",
            "option": [
              "--verbose"
            ],
            "sources": [
              "ref"
            ]
          }
        ],
        "task": [
          {
            "id": "install-latest",
            "label": "Install latest and use it",
            "set": {
              "version": [
                "latest"
              ],
              "use": [
                true
              ]
            },
            "fields": [
              "version",
              "use",
              "assume_yes"
            ],
            "required": [
              "version"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "version",
              "use",
              "verify",
              "assume_yes",
              "verbose"
            ]
          }
        ]
      },
      {
        "path": [
          "use"
        ],
        "label": "Switch toolchain",
        "description": "Set the in-use or default toolchain; with no toolchain, prints the one currently in use.",
        "source": [
          {
            "id": "ref",
            "kind": "manual",
            "url": "https://raw.githubusercontent.com/swiftlang/swiftly/HEAD/Documentation/SwiftlyDocs.docc/swiftly-cli-reference.md",
            "revision": "2026-10-27",
            "evidence": "swiftly use [--print-location] [--global-default] [--format=<format>] [--assume-yes] [--verbose] [<toolchain>] [--version] [--help]\n--print-location: Print the location of the in-use toolchain. This is valid only when there is no toolchain argument.\n--global-default: Set the global default toolchain that is used when there are no .swift-version files.\n--assume-yes: Disable confirmation prompts by assuming 'yes'\n$ swiftly use latest\n"
          }
        ],
        "field": [
          {
            "id": "toolchain",
            "label": "Toolchain",
            "type": "string",
            "position": 0,
            "suggestions": [
              {
                "value": "latest",
                "label": "Latest stable"
              },
              {
                "value": "main-snapshot",
                "label": "Latest main snapshot"
              },
              {
                "value": "xcode",
                "label": "Xcode (macOS)"
              }
            ],
            "sources": [
              "ref"
            ]
          },
          {
            "id": "global_default",
            "label": "Set as global default",
            "type": "boolean",
            "option": [
              "--global-default"
            ],
            "sources": [
              "ref"
            ]
          },
          {
            "id": "print_location",
            "label": "Print location",
            "description": "Only valid without a toolchain.",
            "type": "boolean",
            "option": [
              "--print-location"
            ],
            "sources": [
              "ref"
            ]
          },
          {
            "id": "assume_yes",
            "label": "Assume yes",
            "type": "boolean",
            "option": [
              "--assume-yes"
            ],
            "sources": [
              "ref"
            ]
          }
        ],
        "task": [
          {
            "id": "use-toolchain",
            "label": "Use a toolchain",
            "fields": [
              "toolchain",
              "global_default",
              "assume_yes"
            ],
            "required": [
              "toolchain"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "toolchain",
              "global_default",
              "print_location",
              "assume_yes"
            ]
          }
        ]
      }
    ]
  }
}
