### Fetch and run a package Source: https://dub.pm/cli-reference/dub-fetch Examples of fetching a package to a local cache and subsequently running it. ```bash $ dub fetch vibelog --cache=local ``` ```bash $ dub run vibelog --cache=local ``` -------------------------------- ### dub init Source: https://dub.pm/cli-reference/dub Initializes an empty package in the specified directory. ```APIDOC ## dub init ### Description Initializes an empty package of the specified type in the given directory. By default, the current working directory is used. ``` -------------------------------- ### dub describe Source: https://dub.pm/cli-reference/dub Prints a JSON build description for the package and its dependencies. ```APIDOC ## dub describe ### Description Prints a JSON build description for the root package and all dependencies, useful for IDE integration. ``` -------------------------------- ### dub build Source: https://dub.pm/cli-reference/dub Builds a package. ```APIDOC ## dub build ### Description Builds a package, using the main package in the current working directory by default. ``` -------------------------------- ### dub run Source: https://dub.pm/cli-reference/dub Builds and runs a package. ```APIDOC ## dub run ### Description Builds and runs a package, using the main package in the current working directory by default. ``` -------------------------------- ### dub fetch Source: https://dub.pm/cli-reference/dub Retrieves packages. ```APIDOC ## dub fetch ### Description Explicitly retrieves packages, typically used for shared locations. ``` -------------------------------- ### dub test Source: https://dub.pm/cli-reference/dub-test Executes the tests of the selected package. This command builds the package and runs all contained unit tests, with options to customize the build process. ```APIDOC ## dub test ### Description Builds the package and executes all contained unit tests. If no explicit configuration is given, it prefers a 'unittest' configuration, falling back to library or executable configurations. ### Usage dub test [package[@version-spec]] [OPTIONS...] [-- [application arguments...]] ### Options - **--temp-build** - Builds the project in the temp folder if possible. - **--main-file** (VALUE) - Specifies a custom file containing the main() function to use for running the tests. - **--combined** - Tries to build the whole project in a single compiler run. - **--parallel** - Runs multiple compiler instances in parallel, if possible. - **-f, --force** - Forces a recompilation even if the target is up to date. - **--coverage** - Enables code coverage statistics to be generated. - **--coverage-ctfe** - Enables code coverage (including CTFE) statistics to be generated. - **-b, --build** (VALUE) - Specifies the type of build to perform (e.g., debug, release, unittest). - **-c, --config** (VALUE) - Builds the specified configuration defined in dub.json. - **--compiler** (VALUE) - Specifies the compiler binary to use (e.g., dmd, gdc, ldc). - **-a, --arch** (VALUE) - Force a different architecture (e.g., x86 or x86_64). - **-d, --debug** (VALUE) - Define the specified debug version identifier when building. - **--d-version** (VALUE) - Define the specified version identifier when building. - **--nodeps** - Do not resolve missing dependencies before building. - **--build-mode** (VALUE) - Specifies the way the compiler and linker are invoked (separate, allAtOnce, singleFile). - **--single** - Treats the package name as a filename. ### Exit Status - **0** - DUB succeeded - **1** - Usage errors, unknown command line flags - **2** - Package not found, package failed to load, miscellaneous error ``` -------------------------------- ### dub list Source: https://dub.pm/cli-reference/dub-list Prints a list of all or selected local packages that DUB is aware of. ```APIDOC ## dub list ### Description Prints a list of all or selected local packages. This includes all cached packages (user or system wide), all packages in the package search paths, and all manually registered packages. ### Usage `dub list [package[@version-spec]] [OPTIONS...]` ### Parameters - **package** (string) - Optional - The name of the package to filter by. - **version-spec** (string) - Optional - The version specification to filter by. ### Exit Status - **0**: DUB succeeded - **1**: Usage errors, unknown command line flags - **2**: Package not found, package failed to load, or miscellaneous error ``` -------------------------------- ### dub add-path Source: https://dub.pm/cli-reference/dub-add-path Adds a default package search path to the DUB environment. ```APIDOC ## dub add-path ### Description Adds a default package search path. All direct subfolders of this path will be searched for package descriptions and made available as packages. This is equivalent to calling 'dub add-local' on each subfolder manually. ### Usage `dub add-path [OPTIONS...]` ### Parameters - **path** (string) - Required - The directory path to add to the search list. ### Options - **--system** - Optional - Register the path system-wide instead of user-wide. ### Exit Status - **0**: Success - **1**: Usage errors or unknown command line flags - **2**: Package not found, failed to load, or miscellaneous error ``` -------------------------------- ### dub generate Source: https://dub.pm/cli-reference/dub Generates project files for various build systems. ```APIDOC ## dub generate ### Description Generates project files using supported generators such as visuald, sublimetext, cmake, or build. ``` -------------------------------- ### dub clean Source: https://dub.pm/cli-reference/dub Removes cached build files. ```APIDOC ## dub clean ### Description Removes any cached build files of the given package(s). ``` -------------------------------- ### dub add-local Source: https://dub.pm/cli-reference/dub-add-local Adds a local package directory to the DUB dependency resolution system. ```APIDOC ## dub add-local ### Description Adds a local package directory (e.g., a git repository) to be used during dependency resolution. This is useful for registering local packages that are not in the registry or need to be overwritten. ### Usage `dub add-local [version] [OPTIONS...]` ### Parameters - **path** (string) - Required - The file system path to the local package directory. - **version** (string) - Optional - The version of the package. If omitted, it is determined automatically. ### Options - **--system** - Register the package system-wide instead of user-wide. ### Exit Status - **0**: Success - **1**: Usage errors or unknown flags - **2**: Package not found or failed to load ``` -------------------------------- ### dub generate Source: https://dub.pm/cli-reference/dub-generate Generates project files or builds a package using the specified generator. ```APIDOC ## dub generate ### Description Generates project files using one of the supported generators (visuald, sublimetext, cmake, or build). An optional package name can be provided to target a specific package. ### Usage dub generate [package[@version-spec]] [OPTIONS...] ### Options - **-b, --build** (VALUE) - Specifies the build type (e.g., debug, release, unittest). - **-c, --config** (VALUE) - Builds the specified configuration defined in dub.json. - **--override-config** (VALUE) - Uses a specific configuration for a dependency. - **--compiler** (VALUE) - Specifies the compiler binary (e.g., dmd, gdc, ldc). - **-a, --arch** (VALUE) - Forces a specific architecture (e.g., x86, x86_64). - **-d, --debug** (VALUE) - Defines a debug version identifier. - **--d-version** (VALUE) - Defines a version identifier. - **--nodeps** - Skips dependency resolution. - **--build-mode** (VALUE) - Specifies compiler/linker invocation mode (separate, allAtOnce, singleFile). - **--single** - Treats the package name as a filename. - **--filter-versions** - [Experimental] Filters version identifiers for cache efficiency. - **--combined** - Builds the project in a single compiler run. - **--print-builds** - Lists available build types. - **--print-configs** - Lists available configurations. - **--print-platform** - Prints current build platform identifiers. - **--parallel** - Runs compiler instances in parallel. ``` -------------------------------- ### dub dustmite Source: https://dub.pm/cli-reference/dub Isolates the cause of build errors. ```APIDOC ## dub dustmite ### Description Uses the Dustmite utility to isolate the cause of build errors in a DUB project by creating a reduced test case. ``` -------------------------------- ### dub add-override Source: https://dub.pm/cli-reference/dub-add-override Adds a new package override to the DUB configuration. ```APIDOC ## dub add-override ### Description Adds a new package override. This command is deprecated; users are encouraged to use path-based dependencies, custom cache paths, or edit `dub.selections.json` directly. ### Usage `dub add-override [OPTIONS]` ### Options - **--system** - Register system-wide instead of user-wide. ### Exit Status - **0**: DUB succeeded. - **1**: Usage errors, unknown command line flags. - **2**: Package not found, package failed to load, or miscellaneous error. ``` -------------------------------- ### dub lint Source: https://dub.pm/cli-reference/dub Executes D-Scanner linter tests. ```APIDOC ## dub lint ### Description Builds the package and executes D-Scanner linter tests. ``` -------------------------------- ### dub remove-override Source: https://dub.pm/cli-reference/dub-remove-override Removes an existing package override from the DUB configuration. ```APIDOC ## dub remove-override ### Description Removes an existing package override. This command is deprecated; users are encouraged to use path-based dependencies, custom cache paths, or edit `dub.selections.json` directly. ### Usage `dub remove-override [OPTIONS]` ### Options - **--system** - Register system-wide instead of user-wide. ### Exit Status - **0**: DUB succeeded. - **1**: Usage errors, unknown command line flags. - **2**: Package not found, package failed to load, or miscellaneous error. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.