runtime/reference/cli/add.md
The deno add command adds dependencies to your project's configuration file.
It is an alias for
deno install [PACKAGES].
Add packages from JSR and npm:
deno add @std/path npm:express
By default, dependencies are added with a caret (^) version range. Use
--save-exact to pin to an exact version:
deno add --save-exact @std/path
This saves the dependency without the ^ prefix (e.g., 1.0.0 instead of
^1.0.0).
Treat unprefixed package names as npm packages:
deno add --npm express
If your project has a package.json, npm packages will be added to
dependencies in package.json. Otherwise, all packages are added to the
imports field in deno.json.