deno add [OPTIONS] [packages]...Add dependencies to your configuration file.
deno add jsr:@std/path
You can also add npm packages:
deno add npm:react
Or multiple dependencies at once:
deno add jsr:@std/path jsr:@std/assert npm:chalk
--allow-scripts Allow running npm lifecycle scripts for the given packages Note: Scripts will only be executed when using a node_modules directory (--node-modules-dir).
--dev Short flag: -D
Add the package as a dev dependency. Note: This only applies when adding to a package.json file.
--jsr assume unprefixed package names are jsr packages.
--npm assume unprefixed package names are npm packages.
--frozen Error out if lockfile is out of date.
--lock Check the specified lock file. (If value is not provided, defaults to "./deno.lock").
--no-lock Disable auto discovery of the lock file.
© 2018–2025 the Deno authors
Licensed under the MIT License.
https://docs.deno.com/runtime/reference/cli/add