Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
npm-config.1187 linesDownload Raw Back to man1
1.TH "NPM-CONFIG" "1" "April 2026" "NPM@11.13.0" ""
2.SH "NAME"
3\fBnpm-config\fR - Manage the npm configuration files
4.SS "Synopsis"
5.P
6.RS 2
7.nf
8npm config set <key>=<value> \[lB]<key>=<value> ...\[rB]
9npm config get \[lB]<key> \[lB]<key> ...\[rB]\[rB]
10npm config delete <key> \[lB]<key> ...\[rB]
11npm config list \[lB]--json\[rB]
12npm config edit
13npm config fix
14
15alias: c
16.fi
17.RE
18.P
19Note: This command is unaware of workspaces.
20.SS "Description"
21.P
22npm gets its config settings from the command line, environment variables, \fBnpmrc\fR files, and in some cases, the \fBpackage.json\fR file.
23.P
24See npm help npmrc for more information about the npmrc files.
25.P
26See npm help config for a more thorough explanation of the mechanisms involved, and a full list of config options available.
27.P
28The \fBnpm config\fR command can be used to update and edit the contents of the user and global npmrc files.
29.SS "Sub-commands"
30.P
31Config supports the following sub-commands:
32.SS "set"
33.P
34.RS 2
35.nf
36npm config set key=value \[lB]key=value...\[rB]
37npm set key=value \[lB]key=value...\[rB]
38.fi
39.RE
40.P
41Sets each of the config keys to the value provided. Modifies the user configuration file unless \fB\[rs]fBlocation\[rs]fR\fR \fI\(la/commands/npm-config#location\(ra\fR is passed.
42.P
43If value is omitted, the key will be removed from your config file entirely.
44.P
45Note: for backwards compatibility, \fBnpm config set key value\fR is supported as an alias for \fBnpm config set key=value\fR.
46.SS "get"
47.P
48.RS 2
49.nf
50npm config get \[lB]key ...\[rB]
51npm get \[lB]key ...\[rB]
52.fi
53.RE
54.P
55Echo the config value(s) to stdout.
56.P
57If multiple keys are provided, then the values will be prefixed with the key names.
58.P
59If no keys are provided, then this command behaves the same as \fBnpm config list\fR.
60.SS "list"
61.P
62.RS 2
63.nf
64npm config list
65.fi
66.RE
67.P
68Show all the config settings. Use \fB-l\fR to also show defaults. Use \fB--json\fR to show the settings in json format.
69.SS "delete"
70.P
71.RS 2
72.nf
73npm config delete key \[lB]key ...\[rB]
74.fi
75.RE
76.P
77Deletes the specified keys from all configuration files.
78.SS "edit"
79.P
80.RS 2
81.nf
82npm config edit
83.fi
84.RE
85.P
86Opens the config file in an editor. Use the \fB--global\fR flag to edit the global config.
87.SS "fix"
88.P
89.RS 2
90.nf
91npm config fix
92.fi
93.RE
94.P
95Attempts to repair invalid configuration items. Usually this means attaching authentication config (i.e. \fB_auth\fR, \fB_authToken\fR) to the configured \fBregistry\fR.
96.SS "Configuration"
97.SS "\fBjson\fR"
98.RS 0
99.IP \(bu 4
100Default: false
101.IP \(bu 4
102Type: Boolean
103.RE 0
104
105.P
106Whether or not to output JSON data, rather than the normal output.
107.RS 0
108.IP \(bu 4
109In \fBnpm pkg set\fR it enables parsing set values with JSON.parse() before saving them to your \fBpackage.json\fR.
110.RE 0
111
112.P
113Not supported by all npm commands.
114.SS "\fBglobal\fR"
115.RS 0
116.IP \(bu 4
117Default: false
118.IP \(bu 4
119Type: Boolean
120.RE 0
121
122.P
123Operates in "global" mode, so that packages are installed into the \fBprefix\fR folder instead of the current working directory. See npm help folders for more on the differences in behavior.
124.RS 0
125.IP \(bu 4
126packages are installed into the \fB{prefix}/lib/node_modules\fR folder, instead of the current working directory.
127.IP \(bu 4
128bin files are linked to \fB{prefix}/bin\fR
129.IP \(bu 4
130man pages are linked to \fB{prefix}/share/man\fR
131.RE 0
132
133.SS "\fBeditor\fR"
134.RS 0
135.IP \(bu 4
136Default: The EDITOR or VISUAL environment variables, or '%SYSTEMROOT%\[rs]notepad.exe' on Windows, or 'vi' on Unix systems
137.IP \(bu 4
138Type: String
139.RE 0
140
141.P
142The command to run for \fBnpm edit\fR and \fBnpm config edit\fR.
143.SS "\fBlocation\fR"
144.RS 0
145.IP \(bu 4
146Default: "user" unless \fB--global\fR is passed, which will also set this value to "global"
147.IP \(bu 4
148Type: "global", "user", or "project"
149.RE 0
150
151.P
152When passed to \fBnpm config\fR this refers to which config file to use.
153.P
154When set to "global" mode, packages are installed into the \fBprefix\fR folder instead of the current working directory. See npm help folders for more on the differences in behavior.
155.RS 0
156.IP \(bu 4
157packages are installed into the \fB{prefix}/lib/node_modules\fR folder, instead of the current working directory.
158.IP \(bu 4
159bin files are linked to \fB{prefix}/bin\fR
160.IP \(bu 4
161man pages are linked to \fB{prefix}/share/man\fR
162.RE 0
163
164.SS "\fBlong\fR"
165.RS 0
166.IP \(bu 4
167Default: false
168.IP \(bu 4
169Type: Boolean
170.RE 0
171
172.P
173Show extended information in \fBls\fR, \fBsearch\fR, and \fBhelp-search\fR.
174.SS "See Also"
175.RS 0
176.IP \(bu 4
177npm help folders
178.IP \(bu 4
179npm help config
180.IP \(bu 4
181\fBpackage.json\fR \fI\(la/configuring-npm/package-json\(ra\fR
182.IP \(bu 4
183npm help npmrc
184.IP \(bu 4
185npm help npm
186.RE 0
187 
codekingpro/portable-devtools · Team Ai