deno install command installs dependencies for a project or installs executable scripts globally.
Usage
Local Installation
Install all dependencies
Install all dependencies fromdeno.json and package.json:
Only update the lockfile without installing packages
Install specific entrypoints
Cache specific modules and their dependencies:Global Installation
Install executable scripts globally using the-g or --global flag.
Global Installation Flags
Install as a global executable script
Executable file name
Installation root directory (defaults to $HOME/.deno)
Forcefully overwrite existing installation
Compile the script into a standalone executable
Permission flags
When installing globally, you can specify permissions that will be embedded in the installed script:Allow file system read access
Allow file system write access
Allow network access
Allow environment access
Allow running subprocesses
Allow access to system information
Allow all permissions
Examples
Local installation examples
Install all dependencies
Install with lockfile update only
Install specific entrypoints
Global installation examples
Install a script globally
Install with custom name
Install from URL
Install with all permissions
Install to custom location
Force reinstall
Overwrite existing installation:Install as compiled executable
Create a standalone binary:Install with script arguments
Installation Directory
Global installations are placed in:- Default:
$HOME/.deno/bin - Custom: Specified by
--rootflag orDENO_INSTALL_ROOTenvironment variable
PATH:
Migration from Deno < 3.0
In Deno 3.0, thedeno install command behavior changed:
- Use
-gflag for global installation (previously the default) - Script arguments now require
--separator - Local installation is now the default when
-gis not specified