{
  "description": "Build or run project targets. Source: xmake's own task definitions (actions/build and actions/run). Configuration, packages and project creation are left out.",
  "name": "xmake",
  "subcommands": [
    {
      "name": "build",
      "description": "Build the given targets, or all default targets when none are named.",
      "options": [
        {
          "names": [
            "--rebuild",
            "-r"
          ],
          "description": "Rebuild"
        },
        {
          "names": [
            "--all",
            "-a"
          ],
          "description": "Build all targets"
        },
        {
          "names": [
            "--group",
            "-g"
          ],
          "description": "Group",
          "args": {
            "name": "group",
            "isOptional": false
          }
        },
        {
          "names": [
            "--jobs",
            "-j"
          ],
          "description": "Parallel jobs",
          "args": {
            "name": "jobs",
            "isOptional": false
          }
        },
        {
          "names": [
            "--dry-run"
          ],
          "description": "Dry run"
        }
      ],
      "args": [
        {
          "name": "targets",
          "isOptional": true,
          "isVariadic": true
        }
      ]
    },
    {
      "name": "run",
      "description": "Run a project target, optionally passing arguments to it.",
      "options": [
        {
          "names": [
            "--debug",
            "-d"
          ],
          "description": "Run under debugger"
        },
        {
          "names": [
            "--all",
            "-a"
          ],
          "description": "Run all targets"
        },
        {
          "names": [
            "--workdir",
            "-w"
          ],
          "description": "Working directory",
          "args": {
            "name": "workdir",
            "isOptional": false,
            "template": "folders"
          }
        }
      ],
      "args": [
        {
          "name": "target",
          "isOptional": true
        }
      ]
    }
  ]
}
