DUB-ADD(1)

πŸ’… NAME πŸ’…

ok so dub-add β€” the DUB subcommand that literally just adds dependencies to your package file. that's it, that's the whole vibe. she's simple, she's iconic, she does one thing and does it well πŸŽ€

welcome to DUB-ADD(1), brought to you by The D Language Foundation (yes, the whole manual, bestie, buckle up) ✨


✨ SYNOPSIS ✨

dub add <package>[@<version-spec>] [<packages...>] OPTIONS...

like, you give her a package name (maybe with a version spec attached, cute), you can give her a few more packages after that, and then some OPTIONS... if you're feeling extra πŸ¦‹


🌸 DESCRIPTION 🌸

She adds <packages> as dependencies. full stop, no notes πŸ’…

Running dub add <package> is literally the same thing as going into your dub.json/dub.sdl and adding <package> to the "dependencies" section yourself. except now you don't have to, and you can tell everyone you didn't 🫢

and here's the part that's giving convenience: if you don't specify a version for one of the packages, dub will go query the registry for the latest version. she'll find it for you. main character energy fr ⭐


πŸ‘‘ OPTIONS πŸ‘‘

πŸ’– COMMON OPTIONS πŸ’–

See dub(1) β€” yeah bestie, the whole common-options situation lives over there, go peek 🌈

ngl this is the entire OPTIONS section. that's not me skipping anything, that's just what she wrote. iykyk 😭

πŸ”₯ EXIT STATUS πŸ”₯

  • 0 β€” DUB succeeded. slay. everything worked. we love to see it πŸ’–
  • 1 β€” usage errors, unknown command line flags. you typed something she didn't recognize, no cap πŸ’€
  • 2 β€” package not found, package failed to load, miscellaneous error. the "it's giving chaos" bucket πŸ™ˆ

πŸŽ€ FILES πŸŽ€

  • dub.sdl
  • dub.json

these two. these are the files she's messing with. iconic duo πŸ‘‘


🧚 AUTHOR 🧚

Copyright (c) 1999-2026 by The D Language Foundation πŸ’œ


🌟 ONLINE DOCUMENTATION 🌟

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

go read the docs, bestie, they're right there πŸ¦‹


⭐ SEE ALSO ⭐

the whole dub friend group, honestly πŸ’…βœ¨


okay that's the whole page!! go forth and add your dependencies πŸ’– this was DUB-ADD(1) from The D Language Foundation, dated 2026-08-16 β€” mwah, love u, bye πŸ“πŸ§šπŸ’œ

πŸ“¦ where this page comes from