DUB(1) Package and build management system for D


 dub [--version] [<command>] [<options...>] [-- [<application arguments...>]]


Manages the DUB project in the current directory. If the command is omitted, DUB will default to "run". When running an application, "--" can be used to separate DUB options from options passed to the application.

Run "dub <command> --help" to get help for a specific command.

You can use the "http_proxy" environment variable to configure a proxy server to be used for fetching packages.

Package creation

init [<directory> [<dependency>...]]
Initializes an empty package skeleton

Build, test and run

run [<package>]
Builds and runs a package (default command)
build [<package>]
Builds a package (uses the main package in the current working directory by default)
test [<package>]
Executes the tests of the selected package
generate <generator> [<package>]
Generates project files using the specified generator
describe [<package>]
Prints a JSON description of the project and its dependencies
clean [<package>]
Removes intermediate build files and cached build results
dustmite <destination-path>
Create reduced test cases for build errors

Package management

fetch <name>
Manually retrieves and caches a package
remove <name>
Removes a cached package
upgrade [<package>]
Forces an upgrade of all dependencies
add-path <path>
Adds a default package search path
remove-path <path>
Removes a package search path
add-local <path> [<version>]
Adds a local package directory (e.g. a git repository)
remove-local <path>
Removes a local package directory
Prints a list of all local packages dub is aware of
add-override <package> <version-spec> <target-path/target-version>
Adds a new package override.
remove-override <package> <version-spec>
Removes an existing package override.
Prints a list of all local package overrides
Removes cached metadata

Common options

-h --help
Display general or command specific help
Path to operate in instead of the current working dir
Search the given DUB registry URL first when resolving dependencies. Can be specified multiple times.
Skips searching certain package registries for dependencies:

 none: Search all configured registries (default)

 standard: Don't search on http://code.dlang.org/

 all: Search none of the configured registries

Do not perform any action, just print what would be done
Read only packages contained in the current directory
-v --verbose
Print diagnostic output
-q --quiet
Only print warnings and errors
Print no messages
Puts any fetched packages in the specified location [local|system|user].