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 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. ⚠️ (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 --data information in list format (line-by-line), instead of formatting for a compiler command line. ✨
  • --data-0 β€” output --data information 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 ate
  • 1 β€” usage errors, unknown command line flags. πŸ₯²
  • 2 β€” package not found, package failed to load, miscellaneous error. 😭

πŸŽ€ FILES πŸŽ€

  • dub.sdl
  • dub.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