DUB-ADD-PATH(1)

✨ DUB-ADD-PATH(1) ✨

okay so bestie, welcome to dub-add-path β€” a page from the D Language Foundation's manual set and honestly one of the easiest little glow-ups you can give your build setup πŸ’…


🌸 NAME 🌸

dub-add-path β€” adds a default package search path. that's it. that's the whole vibe πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

dub add-path <path> OPTIONS...

πŸ’– DESCRIPTION πŸ’–

so you run this and it adds a default package search path, periodt. every single direct sub folder of that <path> gets searched for package descriptions and gets made available as packages ✨

and here's the tea: using this command has the equivalent effect as calling dub add-local on each of the sub folders manually. so like, you could do it by hand… but why would you 😭

any packages you register with add-path get preferred over packages downloaded from the package registry when dependencies are being searched during a build operation. homegrown packages stay winning πŸ‘‘

okay and now the part everyone always asks about β€” where does the version come from? the version of the packages is determined by one of these, in this order:

  • for GIT working copies, the last tag (git describe) is used to determine the version 🏷️
  • if the package contains a "version" field in the package description, this is used πŸ“
  • if neither of those apply, ~master is assumed πŸ™ˆ

⭐ OPTIONS ⭐

  • --system β€” DEPRECATED: use --cache=system instead. like, she still works but she's retired, use the new one bestie 🫢

🌈 COMMON OPTIONS 🌈

see dub(1) β€” all the shared stuff lives over there πŸ’œ


πŸ”₯ EXIT STATUS πŸ”₯

  • 0 β€” DUB succeeded. slay, we ate πŸŽ‰
  • 1 β€” usage errors, unknown command line flags πŸ’€
  • 2 β€” package not found, package failed to load, miscellaneous error 😭

πŸ“ FILES πŸ“

  • dub.sdl
  • dub.json

(the package description files, iykyk πŸ“‚)


πŸ‘‘ AUTHOR πŸ‘‘

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


🧚 ONLINE DOCUMENTATION 🧚

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


πŸ’œ SEE ALSO πŸ’œ


and that's the whole page, no cap πŸ’– brought to you by The D Language Foundation, dated 2026-08-16 β€” mwah, go add some paths and thrive, bestie πŸ¦‹βœ¨

πŸ“¦ where this page comes from