{
  "id": "dub",
  "name": "DUB",
  "homepage": "https://dub.pm/",
  "description": "Build tool for D projects",
  "executables": [
    "dub"
  ],
  "dotfiles": {
    "paths": [
      "~/.dub/settings.json",
      "%APPDATA%/dub/settings.json"
    ],
    "secret": []
  },
  "commands": {
    "format": 1,
    "label": "DUB",
    "description": "Common DUB jobs: build, run, test and create a package. Dependency management, dub.json editing and describe/generate commands are not covered.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": false,
      "short_attached": true,
      "short_bundles": false
    },
    "subcommand": [
      {
        "path": [
          "build"
        ],
        "label": "Build a package",
        "source": [
          {
            "id": "help",
            "kind": "manual",
            "url": "https://dub.pm/cli-reference/dub-build",
            "revision": "2026-10-27",
            "evidence": "dub build [<package>[@<version-spec>]] OPTIONS...\n-f, --force\nForces a recompilation even if the target is up to date\n-b, --build=VALUE\nSpecifies the type of build to perform.\n  debug, plain, release, release-debug, release-nobounds, unittest, profile, profile-gc, docs, ddox, cov, cov-ctfe, unittest-cov, unittest-cov-ctfe, syntax and custom types\n-c, --config=VALUE\nBuilds the specified configuration. Configurations can be defined in dub.json\n--compiler=VALUE\nSpecifies the compiler binary to use (can be a path).\n  dmd, gdc, ldc, gdmd, ldmd\n-a, --arch=VALUE\nForce a different architecture (e.g. x86 or x86_64)\n--nodeps\nDo not resolve missing dependencies before building\n--combined\nTries to build the whole project in a single compiler run.\n--parallel\nRuns multiple compiler instances in parallel, if possible.\n"
          }
        ],
        "field": [
          {
            "id": "package",
            "label": "Package",
            "description": "Package name, optionally name@version. Defaults to the package in the current directory.",
            "type": "string",
            "position": 0,
            "sources": [
              "help"
            ]
          },
          {
            "id": "build",
            "label": "Build type",
            "description": "One of the built-in build types or a custom type.",
            "type": "string",
            "option": [
              "--build",
              "-b"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "config",
            "label": "Configuration",
            "type": "string",
            "option": [
              "--config",
              "-c"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "compiler",
            "label": "Compiler",
            "description": "dmd, gdc, ldc, gdmd, ldmd or a path to a compiler binary.",
            "type": "string",
            "option": [
              "--compiler"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "arch",
            "label": "Architecture",
            "description": "For example x86 or x86_64.",
            "type": "string",
            "option": [
              "--arch",
              "-a"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "force",
            "label": "Force recompilation",
            "type": "boolean",
            "option": [
              "--force",
              "-f"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "combined",
            "label": "Build in a single compiler run",
            "type": "boolean",
            "option": [
              "--combined"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "parallel",
            "label": "Parallel compiler instances",
            "type": "boolean",
            "option": [
              "--parallel"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "nodeps",
            "label": "Skip dependency resolution",
            "type": "boolean",
            "option": [
              "--nodeps"
            ],
            "sources": [
              "help"
            ]
          }
        ],
        "task": [
          {
            "id": "build",
            "label": "Build",
            "fields": [
              "package",
              "build",
              "config",
              "compiler"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "package",
              "build",
              "config",
              "compiler"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "arch",
              "force",
              "combined",
              "parallel",
              "nodeps"
            ]
          }
        ]
      },
      {
        "path": [
          "run"
        ],
        "label": "Build and run a package",
        "source": [
          {
            "id": "help",
            "kind": "manual",
            "url": "https://dub.pm/cli-reference/dub-run",
            "revision": "2026-10-27",
            "evidence": "dub run [<package>[@<version-spec>]] OPTIONS...\n-f, --force\nForces a recompilation even if the target is up to date\n-b, --build=VALUE\nSpecifies the type of build to perform.\n  debug, plain, release, release-debug, release-nobounds, unittest, profile, profile-gc, docs, ddox, cov, cov-ctfe, unittest-cov, unittest-cov-ctfe, syntax and custom types\n-c, --config=VALUE\nBuilds the specified configuration. Configurations can be defined in dub.json\n--compiler=VALUE\nSpecifies the compiler binary to use (can be a path).\n  dmd, gdc, ldc, gdmd, ldmd\n-a, --arch=VALUE\nForce a different architecture (e.g. x86 or x86_64)\n--nodeps\nDo not resolve missing dependencies before building\n--combined\nTries to build the whole project in a single compiler run.\n--parallel\nRuns multiple compiler instances in parallel, if possible.\n"
          }
        ],
        "field": [
          {
            "id": "package",
            "label": "Package",
            "description": "Package name, optionally name@version. Defaults to the package in the current directory.",
            "type": "string",
            "position": 0,
            "sources": [
              "help"
            ]
          },
          {
            "id": "build",
            "label": "Build type",
            "description": "One of the built-in build types or a custom type.",
            "type": "string",
            "option": [
              "--build",
              "-b"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "config",
            "label": "Configuration",
            "type": "string",
            "option": [
              "--config",
              "-c"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "compiler",
            "label": "Compiler",
            "description": "dmd, gdc, ldc, gdmd, ldmd or a path to a compiler binary.",
            "type": "string",
            "option": [
              "--compiler"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "arch",
            "label": "Architecture",
            "description": "For example x86 or x86_64.",
            "type": "string",
            "option": [
              "--arch",
              "-a"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "force",
            "label": "Force recompilation",
            "type": "boolean",
            "option": [
              "--force",
              "-f"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "combined",
            "label": "Build in a single compiler run",
            "type": "boolean",
            "option": [
              "--combined"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "parallel",
            "label": "Parallel compiler instances",
            "type": "boolean",
            "option": [
              "--parallel"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "nodeps",
            "label": "Skip dependency resolution",
            "type": "boolean",
            "option": [
              "--nodeps"
            ],
            "sources": [
              "help"
            ]
          }
        ],
        "task": [
          {
            "id": "run",
            "label": "Build and run",
            "fields": [
              "package",
              "build",
              "config",
              "compiler"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "package",
              "build",
              "config",
              "compiler"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "arch",
              "force",
              "combined",
              "parallel",
              "nodeps"
            ]
          }
        ]
      },
      {
        "path": [
          "test"
        ],
        "label": "Run unit tests",
        "source": [
          {
            "id": "help",
            "kind": "manual",
            "url": "https://dub.pm/cli-reference/dub-test",
            "revision": "2026-10-27",
            "evidence": "dub test [<package>[@<version-spec>]] OPTIONS...\n--main-file=VALUE\nSpecifies a custom file containing the main() function to use for running the tests.\n--coverage\nEnables code coverage statistics to be generated.\n-f, --force\nForces a recompilation even if the target is up to date\n-b, --build=VALUE\nSpecifies the type of build to perform.\n  debug, plain, release, release-debug, release-nobounds, unittest, profile, profile-gc, docs, ddox, cov, cov-ctfe, unittest-cov, unittest-cov-ctfe, syntax and custom types\n-c, --config=VALUE\nBuilds the specified configuration. Configurations can be defined in dub.json\n--compiler=VALUE\nSpecifies the compiler binary to use (can be a path).\n  dmd, gdc, ldc, gdmd, ldmd\n-a, --arch=VALUE\nForce a different architecture (e.g. x86 or x86_64)\n--nodeps\nDo not resolve missing dependencies before building\n--combined\nTries to build the whole project in a single compiler run.\n--parallel\nRuns multiple compiler instances in parallel, if possible.\n"
          }
        ],
        "field": [
          {
            "id": "package",
            "label": "Package",
            "description": "Package name, optionally name@version. Defaults to the package in the current directory.",
            "type": "string",
            "position": 0,
            "sources": [
              "help"
            ]
          },
          {
            "id": "build",
            "label": "Build type",
            "description": "One of the built-in build types or a custom type.",
            "type": "string",
            "option": [
              "--build",
              "-b"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "config",
            "label": "Configuration",
            "type": "string",
            "option": [
              "--config",
              "-c"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "compiler",
            "label": "Compiler",
            "description": "dmd, gdc, ldc, gdmd, ldmd or a path to a compiler binary.",
            "type": "string",
            "option": [
              "--compiler"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "arch",
            "label": "Architecture",
            "description": "For example x86 or x86_64.",
            "type": "string",
            "option": [
              "--arch",
              "-a"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "force",
            "label": "Force recompilation",
            "type": "boolean",
            "option": [
              "--force",
              "-f"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "combined",
            "label": "Build in a single compiler run",
            "type": "boolean",
            "option": [
              "--combined"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "parallel",
            "label": "Parallel compiler instances",
            "type": "boolean",
            "option": [
              "--parallel"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "nodeps",
            "label": "Skip dependency resolution",
            "type": "boolean",
            "option": [
              "--nodeps"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "coverage",
            "label": "Code coverage",
            "type": "boolean",
            "option": [
              "--coverage"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "main_file",
            "label": "Custom main file",
            "type": "path",
            "option": [
              "--main-file"
            ],
            "path": {
              "kind": "file",
              "role": "input",
              "must_exist": true
            },
            "sources": [
              "help"
            ]
          }
        ],
        "task": [
          {
            "id": "test",
            "label": "Run tests",
            "fields": [
              "package",
              "config",
              "compiler",
              "coverage"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "package",
              "config",
              "compiler",
              "coverage"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "build",
              "arch",
              "force",
              "combined",
              "parallel",
              "nodeps",
              "main_file"
            ]
          }
        ]
      },
      {
        "path": [
          "init"
        ],
        "label": "Create a package skeleton",
        "source": [
          {
            "id": "help",
            "kind": "manual",
            "url": "https://dub.pm/cli-reference/dub-init",
            "revision": "2026-10-27",
            "evidence": "dub init [<directory> [<dependency>...]] OPTIONS...\n-t, --type=VALUE\nSet the type of project to generate. Available types:\nminimal - simple \"hello world\" project (default)\nvibe.d  - minimal HTTP server based on vibe.d\ndeimos  - skeleton for C header bindings\ncustom  - custom project provided by dub package\n-f, --format=VALUE\nSets the format to use for the package description file. Possible values:\n  json (default), sdl\n-n, --non-interactive\nDon't enter interactive mode.\n"
          }
        ],
        "field": [
          {
            "id": "directory",
            "label": "Directory",
            "description": "Defaults to the current directory.",
            "type": "path",
            "position": 0,
            "path": {
              "kind": "directory",
              "role": "output",
              "must_exist": false
            },
            "sources": [
              "help"
            ]
          },
          {
            "id": "type",
            "label": "Project type",
            "type": "enum",
            "option": [
              "--type",
              "-t"
            ],
            "choices": [
              {
                "value": "minimal",
                "label": "minimal"
              },
              {
                "value": "vibe.d",
                "label": "vibe.d"
              },
              {
                "value": "deimos",
                "label": "deimos"
              },
              {
                "value": "custom",
                "label": "custom"
              }
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "format",
            "label": "Package file format",
            "type": "enum",
            "option": [
              "--format",
              "-f"
            ],
            "choices": [
              {
                "value": "json",
                "label": "json"
              },
              {
                "value": "sdl",
                "label": "sdl"
              }
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "non_interactive",
            "label": "Non-interactive",
            "type": "boolean",
            "option": [
              "--non-interactive",
              "-n"
            ],
            "sources": [
              "help"
            ]
          }
        ],
        "task": [
          {
            "id": "init",
            "label": "Create a package",
            "fields": [
              "directory",
              "type",
              "format",
              "non_interactive"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "directory",
              "type",
              "format",
              "non_interactive"
            ]
          }
        ]
      }
    ]
  }
}
