npm-set(1) npm-set(1)
NAME
npm-set - Set a value in the npm configuration
Synopsis
npm set <key>=<value> [<key>=<value> ...] (See `npm config`)
Note: This command is unaware of workspaces.
Description
Set a value in the npm configuration
Configuration
global
o Default: false
o Type: Boolean
Operates in "global" mode, so that packages are installed into the
prefix folder instead of the current working directory. See npm help
folders for more on the differences in behavior.
o packages are installed into the {prefix}/lib/node_modules folder,
instead of the current working directory.
o bin files are linked to {prefix}/bin
o man pages are linked to {prefix}/share/man
location
o Default: "user" unless --global is passed, which will also set this
value to "global"
o Type: "global", "user", or "project"
When passed to npm config this refers to which config file to use.
When set to "global" mode, packages are installed into the prefix
folder instead of the current working directory. See npm help folders
for more on the differences in behavior.
o packages are installed into the {prefix}/lib/node_modules folder,
instead of the current working directory.
o bin files are linked to {prefix}/bin
o man pages are linked to {prefix}/share/man
See Also
o npm help "help config"
NPM@11.11.0 February 2026 npm-set(1)
npm 11.11.0 - Generated Mon Mar 2 07:21:13 CST 2026
