DUB-GENERATE(1)

🌸 NAME 🌸

dub-generate β€” generates project files using the specified generator ✨ This is the DUB-GENERATE(1) page, bestie, and it's lowkey iconic.

πŸ“œ SYNOPSIS πŸ“œ

Okay so the shape of it is:

dub generate <generator> [<package>[@<version-spec>]] OPTIONS...

πŸ’« DESCRIPTION πŸ’«

Okay so bestie, dub generate makes project files using one of the supported generators:

  • visuald β€” VisualD project files
  • sublimetext β€” SublimeText project file
  • cmake β€” CMake build scripts
  • build β€” Builds the package directly

An optional package name can be given to generate a different package than the root/CWD package. Main character energy, tbh.

✨ OPTIONS ✨

Bestie, here's the whole menu:

  • --dest=VALUE β€” Base directory in which output atifacts will be placed. Yes, "atifacts" is the original spelling β€” I'm just the messenger 🫢
  • -b, --build=VALUE β€” Specifies the type of build to perform. Heads up: setting the DFLAGS environment variable will override the build type with custom flags. Possible names: 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.
  • --override-config=VALUE β€” Uses the specified configuration for a certain dependency. Can be specified multiple times. Format: --override-config=<dependency>/<config>.
  • --compiler=VALUE β€” Specifies the compiler binary to use (can be a path). Arbitrary pre- and suffixes to the identifiers below are recognized (e.g. ldc2 or dmd-2.063) and matched to the proper compiler type: dmd, gdc, ldc, gdmd, ldmd.
  • -a, --arch=VALUE β€” Force a different architecture (e.g. x86 or x86_64).
  • -d, --debug=VALUE β€” Define the specified debug version identifier when building β€” can be used multiple times.
  • --d-version=VALUE β€” Define the specified version identifier when building β€” can be used multiple times. Use sparingly, with great power comes great responsibility! For commonly used or combined versions and versions that dependees should be able to use, create configurations in your package.
  • --nodeps β€” Do not resolve missing dependencies before building.
  • --build-mode=VALUE β€” Specifies the way the compiler and linker are invoked. Valid values: separate (default), allAtOnce, singleFile.
  • --single β€” Treats the package name as a filename. The file must contain a package recipe comment.
  • --force-remove β€” Deprecated option that does nothing. It's giving ghost flag πŸ‘»
  • --filter-versions β€” [Experimental] Filter version identifiers and debug version identifiers to improve build cache efficiency.
  • --combined β€” Tries to build the whole project in a single compiler run.
  • --print-builds β€” Prints the list of available build types.
  • --print-configs β€” Prints the list of available configurations.
  • --print-platform β€” Prints the identifiers for the current build platform as used for the build fields in dub.json.
  • --parallel β€” Runs multiple compiler instances in parallel, if possible.

🫢 COMMON OPTIONS 🫢

See dub(1) β€” yes, that's the whole vibe.

🚦 EXIT STATUS 🚦

  • 0 β€” DUB succeeded. Slay.
  • 1 β€” usage errors, unknown command line flags.
  • 2 β€” package not found, package failed to load, miscellaneous error.

πŸ“ FILES πŸ“

  • dub.sdl
  • dub.json

πŸ‘‘ AUTHOR πŸ‘‘

Copyright (c) 1999-2026 by The D Language Foundation. Iconic.

🌈 ONLINE DOCUMENTATION 🌈

http://code.dlang.org/docs/commandline ⟨⟩

πŸ’œ SEE ALSO πŸ’œ

dub(1), dub-describe(1).


πŸ’– Sign-off: source/version β€” The D Language Foundation; date β€” 2026-08-16. Stay hydrated and read your manpages, bestie. periodt. πŸŽ€

πŸ“¦ where this page comes from