2021-05-10 17:31:02 -04:00
|
|
|
.TH "NPM\-CONFIG" "1" "May 2021" "" ""
|
2013-07-12 08:55:57 -07:00
|
|
|
.SH "NAME"
|
2019-11-18 21:01:39 +02:00
|
|
|
\fBnpm-config\fR \- Manage the npm configuration files
|
2019-11-05 14:55:08 -05:00
|
|
|
.SS Synopsis
|
2014-09-24 14:41:07 -07:00
|
|
|
.P
|
|
|
|
.RS 2
|
2014-11-04 15:08:12 -08:00
|
|
|
.nf
|
2020-12-18 15:39:05 -05:00
|
|
|
npm config set <key>=<value> [<key>=<value> \.\.\.]
|
|
|
|
npm config get [<key> [<key> \.\.\.]]
|
|
|
|
npm config delete <key> [<key> \.\.\.]
|
|
|
|
npm config list [\-\-json]
|
2013-07-12 08:55:57 -07:00
|
|
|
npm config edit
|
2020-12-18 15:39:05 -05:00
|
|
|
npm set <key>=<value> [<key>=<value> \.\.\.]
|
|
|
|
npm get [<key> [<key> \.\.\.]]
|
2016-03-29 23:30:51 -07:00
|
|
|
|
2020-12-18 15:39:05 -05:00
|
|
|
alias: c
|
2014-11-04 15:08:12 -08:00
|
|
|
.fi
|
2014-09-24 14:41:07 -07:00
|
|
|
.RE
|
2021-03-23 14:58:11 -04:00
|
|
|
.P
|
|
|
|
Note: This command is unaware of workspaces\.
|
2019-11-05 14:55:08 -05:00
|
|
|
.SS Description
|
2014-09-24 14:41:07 -07:00
|
|
|
.P
|
2013-07-12 08:55:57 -07:00
|
|
|
npm gets its config settings from the command line, environment
|
2015-07-24 15:09:52 -07:00
|
|
|
variables, \fBnpmrc\fP files, and in some cases, the \fBpackage\.json\fP file\.
|
2013-07-12 08:55:57 -07:00
|
|
|
.P
|
2020-10-20 17:02:27 -04:00
|
|
|
See npm help npmrc for more information about the npmrc
|
|
|
|
files\.
|
2013-07-12 08:55:57 -07:00
|
|
|
.P
|
2020-10-20 17:02:27 -04:00
|
|
|
See npm help config(7) for a more thorough explanation of the
|
|
|
|
mechanisms involved, and a full list of config options available\.
|
2013-07-12 08:55:57 -07:00
|
|
|
.P
|
2015-07-24 15:09:52 -07:00
|
|
|
The \fBnpm config\fP command can be used to update and edit the contents
|
2013-07-12 08:55:57 -07:00
|
|
|
of the user and global npmrc files\.
|
2019-11-05 14:55:08 -05:00
|
|
|
.SS Sub\-commands
|
2014-09-24 14:41:07 -07:00
|
|
|
.P
|
2013-07-12 08:55:57 -07:00
|
|
|
Config supports the following sub\-commands:
|
2014-09-24 14:41:07 -07:00
|
|
|
.SS set
|
|
|
|
.P
|
|
|
|
.RS 2
|
2014-11-04 15:08:12 -08:00
|
|
|
.nf
|
2020-12-18 15:39:05 -05:00
|
|
|
npm config set key=value [key=value\.\.\.]
|
|
|
|
npm set key=value [key=value\.\.\.]
|
2014-11-04 15:08:12 -08:00
|
|
|
.fi
|
2014-09-24 14:41:07 -07:00
|
|
|
.RE
|
2013-07-12 08:55:57 -07:00
|
|
|
.P
|
2020-12-18 15:39:05 -05:00
|
|
|
Sets each of the config keys to the value provided\.
|
2013-07-12 08:55:57 -07:00
|
|
|
.P
|
2020-12-18 15:39:05 -05:00
|
|
|
If value is omitted, then it sets it to an empty string\.
|
|
|
|
.P
|
|
|
|
Note: for backwards compatibility, \fBnpm config set key value\fP is supported
|
|
|
|
as an alias for \fBnpm config set key=value\fP\|\.
|
2014-09-24 14:41:07 -07:00
|
|
|
.SS get
|
|
|
|
.P
|
|
|
|
.RS 2
|
2014-11-04 15:08:12 -08:00
|
|
|
.nf
|
2020-12-18 15:39:05 -05:00
|
|
|
npm config get [key \.\.\.]
|
|
|
|
npm get [key \.\.\.]
|
2014-11-04 15:08:12 -08:00
|
|
|
.fi
|
2014-09-24 14:41:07 -07:00
|
|
|
.RE
|
2013-07-12 08:55:57 -07:00
|
|
|
.P
|
2020-12-18 15:39:05 -05:00
|
|
|
Echo the config value(s) to stdout\.
|
|
|
|
.P
|
|
|
|
If multiple keys are provided, then the values will be prefixed with the
|
|
|
|
key names\.
|
|
|
|
.P
|
|
|
|
If no keys are provided, then this command behaves the same as \fBnpm config
|
|
|
|
list\fP\|\.
|
2014-09-24 14:41:07 -07:00
|
|
|
.SS list
|
|
|
|
.P
|
|
|
|
.RS 2
|
2014-11-04 15:08:12 -08:00
|
|
|
.nf
|
2013-07-12 08:55:57 -07:00
|
|
|
npm config list
|
2014-11-04 15:08:12 -08:00
|
|
|
.fi
|
2014-09-24 14:41:07 -07:00
|
|
|
.RE
|
2013-07-12 08:55:57 -07:00
|
|
|
.P
|
2017-10-26 22:35:25 -04:00
|
|
|
Show all the config settings\. Use \fB\-l\fP to also show defaults\. Use \fB\-\-json\fP
|
|
|
|
to show the settings in json format\.
|
2014-09-24 14:41:07 -07:00
|
|
|
.SS delete
|
|
|
|
.P
|
|
|
|
.RS 2
|
2014-11-04 15:08:12 -08:00
|
|
|
.nf
|
2020-12-18 15:39:05 -05:00
|
|
|
npm config delete key [key \.\.\.]
|
2014-11-04 15:08:12 -08:00
|
|
|
.fi
|
2014-09-24 14:41:07 -07:00
|
|
|
.RE
|
2013-07-12 08:55:57 -07:00
|
|
|
.P
|
2020-12-18 15:39:05 -05:00
|
|
|
Deletes the specified keys from all configuration files\.
|
2014-09-24 14:41:07 -07:00
|
|
|
.SS edit
|
|
|
|
.P
|
|
|
|
.RS 2
|
2014-11-04 15:08:12 -08:00
|
|
|
.nf
|
2013-07-12 08:55:57 -07:00
|
|
|
npm config edit
|
2014-11-04 15:08:12 -08:00
|
|
|
.fi
|
2014-09-24 14:41:07 -07:00
|
|
|
.RE
|
2013-07-12 08:55:57 -07:00
|
|
|
.P
|
2015-07-24 15:09:52 -07:00
|
|
|
Opens the config file in an editor\. Use the \fB\-\-global\fP flag to edit the
|
2013-07-12 08:55:57 -07:00
|
|
|
global config\.
|
2019-11-05 14:55:08 -05:00
|
|
|
.SS See Also
|
2014-09-24 14:41:07 -07:00
|
|
|
.RS 0
|
|
|
|
.IP \(bu 2
|
2019-11-05 14:55:08 -05:00
|
|
|
npm help folders
|
2014-09-24 14:41:07 -07:00
|
|
|
.IP \(bu 2
|
2019-11-18 21:01:39 +02:00
|
|
|
npm help config
|
2014-09-24 14:41:07 -07:00
|
|
|
.IP \(bu 2
|
2019-11-18 21:01:39 +02:00
|
|
|
npm help package\.json
|
2014-09-24 14:41:07 -07:00
|
|
|
.IP \(bu 2
|
2019-11-05 14:55:08 -05:00
|
|
|
npm help npmrc
|
2014-09-24 14:41:07 -07:00
|
|
|
.IP \(bu 2
|
2013-07-12 08:55:57 -07:00
|
|
|
npm help npm
|
2014-09-24 14:41:07 -07:00
|
|
|
|
|
|
|
.RE
|