{
  "id": "swift",
  "name": "Swift",
  "homepage": "https://www.swift.org",
  "description": "A general-purpose programming language built using a modern approach to safety, performance, and software design patterns.",
  "icon": "SimpleIcons:swift",
  "executables": [
    "swift",
    "swiftc"
  ],
  "dotfiles": {
    "paths": [
      "~/.swiftpm/configuration/registries.json"
    ],
    "exclude": [
      "~/.swiftpm/cache/",
      "~/.swiftpm/security/"
    ],
    "secret": []
  },
  "commands": {
    "format": 1,
    "label": "Swift Package Manager",
    "description": "Build, run and test a Swift package. Compiler flags, package and other subcommands are left out.",
    "quality": "ai-draft",
    "base": "fig:swift",
    "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/swift.ts",
        "license": "MIT"
      }
    ],
    "subcommand": [
      {
        "path": [
          "build"
        ],
        "label": "Build",
        "description": "Build sources into binary products.",
        "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/swift.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "product",
            "label": "Product",
            "type": "string",
            "option": [
              "--product"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "target",
            "label": "Target",
            "type": "string",
            "option": [
              "--target"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "build_tests",
            "label": "Build tests too",
            "type": "boolean",
            "option": [
              "--build-tests"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "show_bin_path",
            "label": "Print binary path",
            "type": "boolean",
            "option": [
              "--show-bin-path"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "build",
            "label": "Build package",
            "fields": [
              "product",
              "target",
              "build_tests"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "product",
              "target",
              "build_tests",
              "show_bin_path"
            ]
          }
        ]
      },
      {
        "path": [
          "run"
        ],
        "label": "Run",
        "description": "Build and run an executable product.",
        "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/swift.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "executable",
            "label": "Executable",
            "type": "string",
            "position": 0,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "arguments",
            "label": "Arguments",
            "type": "string",
            "position": 1,
            "multiple": true,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "skip_build",
            "label": "Skip build",
            "type": "boolean",
            "option": [
              "--skip-build"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "build_tests",
            "label": "Build tests too",
            "type": "boolean",
            "option": [
              "--build-tests"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "repl",
            "label": "Launch REPL",
            "type": "boolean",
            "option": [
              "--repl"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "run",
            "label": "Run executable",
            "fields": [
              "executable",
              "arguments",
              "skip_build"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "executable",
              "arguments",
              "skip_build"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "build_tests",
              "repl"
            ]
          }
        ]
      },
      {
        "path": [
          "test"
        ],
        "label": "Test",
        "description": "Build and run tests.",
        "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/swift.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "filter",
            "label": "Filter (regex)",
            "type": "string",
            "option": [
              "--filter"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "skip",
            "label": "Skip (regex)",
            "type": "string",
            "option": [
              "--skip"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "parallel",
            "label": "Run in parallel",
            "type": "boolean",
            "option": [
              "--parallel"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "num_workers",
            "label": "Parallel workers",
            "type": "integer",
            "option": [
              "--num-workers"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "skip_build",
            "label": "Skip build",
            "type": "boolean",
            "option": [
              "--skip-build"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "list_tests",
            "label": "List tests",
            "type": "boolean",
            "option": [
              "--list-tests",
              "-l"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "xunit_output",
            "label": "xUnit output file",
            "type": "path",
            "option": [
              "--xunit-output"
            ],
            "path": {
              "kind": "file",
              "role": "output",
              "must_exist": false
            },
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "test",
            "label": "Run tests",
            "fields": [
              "filter",
              "parallel"
            ],
            "required": []
          },
          {
            "id": "list",
            "label": "List tests",
            "set": {
              "list_tests": [
                true
              ]
            },
            "lock": [
              "list_tests"
            ],
            "fields": [
              "list_tests",
              "filter"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "filter",
              "skip",
              "parallel",
              "list_tests"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "num_workers",
              "skip_build",
              "xunit_output"
            ]
          }
        ]
      }
    ]
  }
}
