DUB-DESCRIBE(1)
π dub-describe β the manual page, but make it group chat
Hey bestie, welcome to dub-describe(1) β yes, that's from the D Language Foundation's dub manual set, and no, you don't have to read it alone. I got you. π«Ά
β¨ NAME β¨
dub-describe β prints a JSON description of the project and its dependencies. That's it, that's the whole vibe. πΈ
β¨ SYNOPSIS β¨
dub describe [<package>[@<version-spec>]] OPTIONS...
Lowkey just: package (optionally with a version spec), then whatever options you want. Slay. π
β¨ DESCRIPTION β¨
Okay so picture this: dub describe prints a JSON build description for the root package and all of their dependencies, in a format that's basically a JSON package description file's cousin. It's useful mostly for IDEs β that's the main character use case right there. π
Also, all the usual options that get used for build/run/generate apply here too. Same energy, different command. β¨
Now, the fun part: when you supply --data=VALUE, it prints specific build settings for a project instead β and by default those are formatted for the current compiler. π
And you can totally pass --data=VALUE multiple times to grab several pieces of info at once. A comma-separated list works too (ex: --data=dflags,libs). The data comes out in the same order you requested it on the command line β fr fr, order is preserved, we love a consistent queen. π
The accepted values for --data=VALUE are:
main-source-file, dflags, lflags, libs, linker-files, source-files,
versions, debug-versions, import-paths, string-import-paths, import-
files, options
And these extra ones are also accepted by --data if --data-list is used:
target-type, target-path, target-name, working-directory, copy-files,
string-import-files, pre-generate-commands, post-generate-commands, pre-
build-commands, post-build-commands, pre-run-commands, post-run-
commands, requirements
iykyk β the second list is the --data-list-only club. ποΈ
β¨ OPTIONS β¨
--dest=VALUEβ base directory where the output artifacts get placed. Your little build-artifact home. π-b,--build=VALUEβ specifies the type of build to perform. Heads up though: setting theDFLAGSenvironment 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 indub.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.ldc2ordmd-2.063) and matched to the proper compiler type:
dmd, gdc, ldc, gdmd, ldmd
-a,--arch=VALUEβ force a different architecture (e.g.x86orx86_64). π¦-d,--debug=VALUEβ define the specifieddebugversion identifier when building β can be used multiple times. π₯--d-version=VALUEβ define the specifiedversionidentifier 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. β οΈ (no cap, this one's spicy)--nodepsβ do not resolve missing dependencies before building. Skipping the whole dependency-resolution side quest. πΆββοΈ--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. That file must contain a package recipe comment. π--force-removeβ deprecated option that does nothing. Literally doing nothing and still showing up to the party. π--filter-versionsβ[Experimental]filter version identifiers and debug version identifiers to improve build cache efficiency. Bestie, it's experimental, so mind the label. π§ͺ--import-pathsβ shortcut for--data=import-paths --data-list. π--string-import-pathsβ shortcut for--data=string-import-paths --data-list. π--data=VALUEβ just list the values of a particular build setting, either for this package alone or recursively including all dependencies. Accepts a comma-separated list. See above for more details and accepted possibilities for VALUE. π--data-listβ output--datainformation in list format (line-by-line), instead of formatting for a compiler command line. β¨--data-0β output--datainformation using null-delimiters, rather than spaces or newlines. Result is usable with, ex.,xargs -0. π§
π COMMON OPTIONS π
See dub(1). That's the shared-options hub, go peek there. π
β¨ EXIT STATUS β¨
0β DUB succeeded. π we ate1β usage errors, unknown command line flags. π₯²2β package not found, package failed to load, miscellaneous error. π
π FILES π
dub.sdldub.json
Those two. The iconic duo. π
β¨ AUTHOR β¨
Copyright (c) 1999-2026 by The D Language Foundation π«Ά
π ONLINE DOCUMENTATION π
http://code.dlang.org/docs/commandline π¦
π₯ SEE ALSO π₯
That's the whole page, bestie β you're now lowkey a dub-describe expert. β¨ Signed off with love from The D Language Foundation, dated 2026-08-16. Go describe some projects, periodt. π
πΈ
π¦ where this page comes from
- arch rolling: dub 1.42.0-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms