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 }
[[commands.subcommand]]
path = ["build"]
label = "Build a package"
[[commands.subcommand.source]]
id = "help"
kind = "manual"
url = "https://dub.pm/cli-reference/dub-build"
revision = "2026-10-27"
evidence = """
dub build [<package>[@<version-spec>]] OPTIONS...
-f, --force
Forces a recompilation even if the target is up to date
-b, --build=VALUE
Specifies the type of build to perform.
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
-c, --config=VALUE
Builds the specified configuration. Configurations can be defined in dub.json
--compiler=VALUE
Specifies the compiler binary to use (can be a path).
dmd, gdc, ldc, gdmd, ldmd
-a, --arch=VALUE
Force a different architecture (e.g. x86 or x86_64)
--nodeps
Do not resolve missing dependencies before building
--combined
Tries to build the whole project in a single compiler run.
--parallel
Runs multiple compiler instances in parallel, if possible.
"""
[[commands.subcommand.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"]
[[commands.subcommand.field]]
id = "build"
label = "Build type"
description = "One of the built-in build types or a custom type."
type = "string"
option = ["--build", "-b"]
sources = ["help"]
[[commands.subcommand.field]]
id = "config"
label = "Configuration"
type = "string"
option = ["--config", "-c"]
sources = ["help"]
[[commands.subcommand.field]]
id = "compiler"
label = "Compiler"
description = "dmd, gdc, ldc, gdmd, ldmd or a path to a compiler binary."
type = "string"
option = ["--compiler"]
sources = ["help"]
[[commands.subcommand.field]]
id = "arch"
label = "Architecture"
description = "For example x86 or x86_64."
type = "string"
option = ["--arch", "-a"]
sources = ["help"]
[[commands.subcommand.field]]
id = "force"
label = "Force recompilation"
type = "boolean"
option = ["--force", "-f"]
sources = ["help"]
[[commands.subcommand.field]]
id = "combined"
label = "Build in a single compiler run"
type = "boolean"
option = ["--combined"]
sources = ["help"]
[[commands.subcommand.field]]
id = "parallel"
label = "Parallel compiler instances"
type = "boolean"
option = ["--parallel"]
sources = ["help"]
[[commands.subcommand.field]]
id = "nodeps"
label = "Skip dependency resolution"
type = "boolean"
option = ["--nodeps"]
sources = ["help"]
[[commands.subcommand.task]]
id = "build"
label = "Build"
fields = ["package", "build", "config", "compiler"]
required = []
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["package", "build", "config", "compiler"]
[[commands.subcommand.group]]
id = "advanced"
label = "Advanced"
fields = ["arch", "force", "combined", "parallel", "nodeps"]
[[commands.subcommand]]
path = ["run"]
label = "Build and run a package"
[[commands.subcommand.source]]
id = "help"
kind = "manual"
url = "https://dub.pm/cli-reference/dub-run"
revision = "2026-10-27"
evidence = """
dub run [<package>[@<version-spec>]] OPTIONS...
-f, --force
Forces a recompilation even if the target is up to date
-b, --build=VALUE
Specifies the type of build to perform.
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
-c, --config=VALUE
Builds the specified configuration. Configurations can be defined in dub.json
--compiler=VALUE
Specifies the compiler binary to use (can be a path).
dmd, gdc, ldc, gdmd, ldmd
-a, --arch=VALUE
Force a different architecture (e.g. x86 or x86_64)
--nodeps
Do not resolve missing dependencies before building
--combined
Tries to build the whole project in a single compiler run.
--parallel
Runs multiple compiler instances in parallel, if possible.
"""
[[commands.subcommand.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"]
[[commands.subcommand.field]]
id = "build"
label = "Build type"
description = "One of the built-in build types or a custom type."
type = "string"
option = ["--build", "-b"]
sources = ["help"]
[[commands.subcommand.field]]
id = "config"
label = "Configuration"
type = "string"
option = ["--config", "-c"]
sources = ["help"]
[[commands.subcommand.field]]
id = "compiler"
label = "Compiler"
description = "dmd, gdc, ldc, gdmd, ldmd or a path to a compiler binary."
type = "string"
option = ["--compiler"]
sources = ["help"]
[[commands.subcommand.field]]
id = "arch"
label = "Architecture"
description = "For example x86 or x86_64."
type = "string"
option = ["--arch", "-a"]
sources = ["help"]
[[commands.subcommand.field]]
id = "force"
label = "Force recompilation"
type = "boolean"
option = ["--force", "-f"]
sources = ["help"]
[[commands.subcommand.field]]
id = "combined"
label = "Build in a single compiler run"
type = "boolean"
option = ["--combined"]
sources = ["help"]
[[commands.subcommand.field]]
id = "parallel"
label = "Parallel compiler instances"
type = "boolean"
option = ["--parallel"]
sources = ["help"]
[[commands.subcommand.field]]
id = "nodeps"
label = "Skip dependency resolution"
type = "boolean"
option = ["--nodeps"]
sources = ["help"]
[[commands.subcommand.task]]
id = "run"
label = "Build and run"
fields = ["package", "build", "config", "compiler"]
required = []
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["package", "build", "config", "compiler"]
[[commands.subcommand.group]]
id = "advanced"
label = "Advanced"
fields = ["arch", "force", "combined", "parallel", "nodeps"]
[[commands.subcommand]]
path = ["test"]
label = "Run unit tests"
[[commands.subcommand.source]]
id = "help"
kind = "manual"
url = "https://dub.pm/cli-reference/dub-test"
revision = "2026-10-27"
evidence = """
dub test [<package>[@<version-spec>]] OPTIONS...
--main-file=VALUE
Specifies a custom file containing the main() function to use for running the tests.
--coverage
Enables code coverage statistics to be generated.
-f, --force
Forces a recompilation even if the target is up to date
-b, --build=VALUE
Specifies the type of build to perform.
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
-c, --config=VALUE
Builds the specified configuration. Configurations can be defined in dub.json
--compiler=VALUE
Specifies the compiler binary to use (can be a path).
dmd, gdc, ldc, gdmd, ldmd
-a, --arch=VALUE
Force a different architecture (e.g. x86 or x86_64)
--nodeps
Do not resolve missing dependencies before building
--combined
Tries to build the whole project in a single compiler run.
--parallel
Runs multiple compiler instances in parallel, if possible.
"""
[[commands.subcommand.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"]
[[commands.subcommand.field]]
id = "build"
label = "Build type"
description = "One of the built-in build types or a custom type."
type = "string"
option = ["--build", "-b"]
sources = ["help"]
[[commands.subcommand.field]]
id = "config"
label = "Configuration"
type = "string"
option = ["--config", "-c"]
sources = ["help"]
[[commands.subcommand.field]]
id = "compiler"
label = "Compiler"
description = "dmd, gdc, ldc, gdmd, ldmd or a path to a compiler binary."
type = "string"
option = ["--compiler"]
sources = ["help"]
[[commands.subcommand.field]]
id = "arch"
label = "Architecture"
description = "For example x86 or x86_64."
type = "string"
option = ["--arch", "-a"]
sources = ["help"]
[[commands.subcommand.field]]
id = "force"
label = "Force recompilation"
type = "boolean"
option = ["--force", "-f"]
sources = ["help"]
[[commands.subcommand.field]]
id = "combined"
label = "Build in a single compiler run"
type = "boolean"
option = ["--combined"]
sources = ["help"]
[[commands.subcommand.field]]
id = "parallel"
label = "Parallel compiler instances"
type = "boolean"
option = ["--parallel"]
sources = ["help"]
[[commands.subcommand.field]]
id = "nodeps"
label = "Skip dependency resolution"
type = "boolean"
option = ["--nodeps"]
sources = ["help"]
[[commands.subcommand.field]]
id = "coverage"
label = "Code coverage"
type = "boolean"
option = ["--coverage"]
sources = ["help"]
[[commands.subcommand.field]]
id = "main_file"
label = "Custom main file"
type = "path"
option = ["--main-file"]
path = { kind = "file", role = "input", must_exist = true }
sources = ["help"]
[[commands.subcommand.task]]
id = "test"
label = "Run tests"
fields = ["package", "config", "compiler", "coverage"]
required = []
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["package", "config", "compiler", "coverage"]
[[commands.subcommand.group]]
id = "advanced"
label = "Advanced"
fields = ["build", "arch", "force", "combined", "parallel", "nodeps", "main_file"]
[[commands.subcommand]]
path = ["init"]
label = "Create a package skeleton"
[[commands.subcommand.source]]
id = "help"
kind = "manual"
url = "https://dub.pm/cli-reference/dub-init"
revision = "2026-10-27"
evidence = """
dub init [<directory> [<dependency>...]] OPTIONS...
-t, --type=VALUE
Set the type of project to generate. Available types:
minimal - simple "hello world" project (default)
vibe.d - minimal HTTP server based on vibe.d
deimos - skeleton for C header bindings
custom - custom project provided by dub package
-f, --format=VALUE
Sets the format to use for the package description file. Possible values:
json (default), sdl
-n, --non-interactive
Don't enter interactive mode.
"""
[[commands.subcommand.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"]
[[commands.subcommand.field]]
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"]
[[commands.subcommand.field]]
id = "format"
label = "Package file format"
type = "enum"
option = ["--format", "-f"]
choices = [{ value = "json", label = "json" }, { value = "sdl", label = "sdl" }]
sources = ["help"]
[[commands.subcommand.field]]
id = "non_interactive"
label = "Non-interactive"
type = "boolean"
option = ["--non-interactive", "-n"]
sources = ["help"]
[[commands.subcommand.task]]
id = "init"
label = "Create a package"
fields = ["directory", "type", "format", "non_interactive"]
required = []
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["directory", "type", "format", "non_interactive"]