Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 419 lines (418 sloc) 9.473 kb
f2ccd17 @isaacs Use ronnjs instead of the ronn rubygem to build docs
isaacs authored
1 .\" Generated with Ronnjs/v0.1
2 .\" http://github.com/kapouer/ronnjs/
b70b2a0 @isaacs Add built documentation to project, so that the install doesn't require ...
isaacs authored
3 .
2881227 @isaacs make doc
isaacs authored
4 .TH "NPM\-CONFIG" "1" "November 2010" "" ""
b70b2a0 @isaacs Add built documentation to project, so that the install doesn't require ...
isaacs authored
5 .
6 .SH "NAME"
f2ccd17 @isaacs Use ronnjs instead of the ronn rubygem to build docs
isaacs authored
7 \fBnpm-config\fR \-\- Manage the npm configuration file
b70b2a0 @isaacs Add built documentation to project, so that the install doesn't require ...
isaacs authored
8 .
9 .SH "SYNOPSIS"
10 .
11 .nf
5e36298 @isaacs make doc
isaacs authored
12 npm config set <key> <value> [\-\-global]
b70b2a0 @isaacs Add built documentation to project, so that the install doesn't require ...
isaacs authored
13 npm config get <key>
14 npm config delete <key>
15 npm config list
8a5eaa6 @isaacs document config edit
isaacs authored
16 npm config edit
b70b2a0 @isaacs Add built documentation to project, so that the install doesn't require ...
isaacs authored
17 .
18 .fi
19 .
20 .SH "DESCRIPTION"
5e36298 @isaacs make doc
isaacs authored
21 npm gets its configuration values from 5 sources, in this priority:
b70b2a0 @isaacs Add built documentation to project, so that the install doesn't require ...
isaacs authored
22 .
f2ccd17 @isaacs Use ronnjs instead of the ronn rubygem to build docs
isaacs authored
23 .IP "\(bu" 4
24 cli:
25 The command line flags\. Putting \fB\-\-foo bar\fR on the command line sets the \fBfoo\fR configuration parameter to \fB"bar"\fR\|\. A \fB\-\-\fR argument tells the cli
26 parser to stop reading flags\. A \fB\-\-flag\fR parameter that is at the \fIend\fR of
27 the command will be given the value of \fBtrue\fR\|\.
28 .
29 .IP "\(bu" 4
30 env:
31 Any environment variables that start with \fBnpm_config_\fR will be interpreted
32 as a configuration parameter\. For example, putting \fBnpm_config_foo=bar\fR in
33 your environment will set the \fBfoo\fR configuration parameter to \fBbar\fR\|\. Any
34 environment configurations that are not given a value will be given the value
35 of \fBtrue\fR\|\. Config values are case\-insensitive, so \fBNPM_CONFIG_FOO=bar\fR will
36 work the same\.
37 .
38 .IP "\(bu" 4
39 $HOME/\.npmrc (or the \fBuserconfig\fR param, if set above):
5e36298 @isaacs make doc
isaacs authored
40 This file is an ini\-file formatted list of \fBkey = value\fR parameters\.
41 .
f2ccd17 @isaacs Use ronnjs instead of the ronn rubygem to build docs
isaacs authored
42 .IP "\(bu" 4
43 $PREFIX/etc/npmrc (or the \fBglobalconfig\fR param, if set above):
5e36298 @isaacs make doc
isaacs authored
44 This file is an ini\-file formatted list of \fBkey = value\fR parameters
45 .
f2ccd17 @isaacs Use ronnjs instead of the ronn rubygem to build docs
isaacs authored
46 .IP "\(bu" 4
47 default configs:
48 This is a set of configuration parameters that are internal to npm, and are
49 defaults if nothing else is specified\.
50 .
51 .IP "" 0
b70b2a0 @isaacs Add built documentation to project, so that the install doesn't require ...
isaacs authored
52 .
53 .SH "Sub\-commands"
54 Config supports the following sub\-commands:
55 .
56 .SS "set"
57 .
58 .nf
59 npm config set key value
60 .
61 .fi
62 .
63 .P
e937a72 @isaacs Update all man pages using new version of ronn
isaacs authored
64 Sets the config key to the value\.
b70b2a0 @isaacs Add built documentation to project, so that the install doesn't require ...
isaacs authored
65 .
66 .SS "get"
67 .
68 .nf
69 npm config get key
70 .
71 .fi
72 .
73 .P
f2ccd17 @isaacs Use ronnjs instead of the ronn rubygem to build docs
isaacs authored
74 Echo the config value to stdout\. (NOTE: All the other npm logging is done to
75 stderr, so pipes should work properly, and you can do \fBnpm get key 2>/dev/null\fR
76 to print out JUST the config value\.)
b70b2a0 @isaacs Add built documentation to project, so that the install doesn't require ...
isaacs authored
77 .
78 .SS "list"
79 .
80 .nf
81 npm config list
82 .
83 .fi
84 .
85 .P
e937a72 @isaacs Update all man pages using new version of ronn
isaacs authored
86 Show all the config settings\.
b70b2a0 @isaacs Add built documentation to project, so that the install doesn't require ...
isaacs authored
87 .
88 .SS "delete"
89 .
90 .nf
91 npm config delete key
92 .
93 .fi
94 .
95 .P
5e36298 @isaacs make doc
isaacs authored
96 Deletes the key from all configuration files\.
b70b2a0 @isaacs Add built documentation to project, so that the install doesn't require ...
isaacs authored
97 .
8a5eaa6 @isaacs document config edit
isaacs authored
98 .SS "edit"
99 .
100 .nf
101 npm config edit
102 .
103 .fi
104 .
105 .P
106 Opens the config file in an editor\. Use the \fB\-\-global\fR flag to edit the global config\.
107 .
57729b7 @isaacs Documentation updates
isaacs authored
108 .SH "Config Settings"
f2ccd17 @isaacs Use ronnjs instead of the ronn rubygem to build docs
isaacs authored
109 npm supports a very basic argument parser\. For any of the settings
110 in npm\-config(1), you can set them explicitly for a single command by
111 doing:
57729b7 @isaacs Documentation updates
isaacs authored
112 .
113 .IP "" 4
114 .
115 .nf
116 npm \-\-key val <command>
117 .
118 .fi
119 .
120 .IP "" 0
121 .
122 .P
e937a72 @isaacs Update all man pages using new version of ronn
isaacs authored
123 Configurations defined on the command line are not saved to the \.npmrc file\.
b70b2a0 @isaacs Add built documentation to project, so that the install doesn't require ...
isaacs authored
124 .
2881227 @isaacs make doc
isaacs authored
125 .SS "recursive"
126 Default: false
127 .
128 .P
129 Set to some truish value to recursively remove dependent packages\. For
130 example if foo depends on bar, and bar depends on baz, then:
131 .
132 .IP "" 4
133 .
134 .nf
135 npm uninstall baz \-\-recursive
136 .
137 .fi
138 .
139 .IP "" 0
140 .
141 .P
142 will remove baz, bar, and foo\.
143 .
4ff3ddf @isaacs Docs for loglevel conf setting.
isaacs authored
144 .SS "loglevel"
145 Default: "info"
146 .
147 .P
329a996 @isaacs Make doc (new version of ronn)
isaacs authored
148 The log level to show\.
149 .
150 .P
151 Each level maps to a numeric value, above which all logs must pass to be
152 seen\. So, setting it to "warn" shows "win", "error" and "warn" messages\.
153 .
154 .P
155 The log levels:
156 .
157 .IP "\(bu" 4
158 silent: Show no output\. Nothing\. If there is output on stderr, it\'s
159 because something is broken\.
160 .
161 .IP "\(bu" 4
162 win: Show the "npm ok" or "npm not ok", but that\'s all\.
163 .
164 .IP "\(bu" 4
165 error: Errors, usually with a stack trace\.
166 .
167 .IP "\(bu" 4
168 warn: Things that you should probably be aware of\.
169 .
170 .IP "\(bu" 4
171 info: Helpful info\.
172 .
173 .IP "\(bu" 4
174 silly: Not\-helpful info\. (Lots of dumping whole objects and such\.)
175 .
176 .IP "" 0
177 .
178 .P
179 Note that output to stdout is always printed\. This setting just modifies
180 what\'s logged to stderr\.
4ff3ddf @isaacs Docs for loglevel conf setting.
isaacs authored
181 .
b70b2a0 @isaacs Add built documentation to project, so that the install doesn't require ...
isaacs authored
182 .SS "auto\-activate"
183 Default: true
184 .
185 .P
f2ccd17 @isaacs Use ronnjs instead of the ronn rubygem to build docs
isaacs authored
186 Automatically activate a package after installation, if there is not an active
187 version already\. Set to "always" to always activate when installing\.
b70b2a0 @isaacs Add built documentation to project, so that the install doesn't require ...
isaacs authored
188 .
a0eb2fa @isaacs Rename auto-update to update-dependents, and update docs to reflect this
isaacs authored
189 .SS "update\-dependents"
190 Default: true
191 .
192 .P
f2ccd17 @isaacs Use ronnjs instead of the ronn rubygem to build docs
isaacs authored
193 Automatically update a package\'s dependencies after installation, if it is the
194 newest version installed\. Set to "always" to update dependents when a new
195 version is installed, even if it\'s not the newest\.
a0eb2fa @isaacs Rename auto-update to update-dependents, and update docs to reflect this
isaacs authored
196 .
b70b2a0 @isaacs Add built documentation to project, so that the install doesn't require ...
isaacs authored
197 .SS "root"
5e36298 @isaacs make doc
isaacs authored
198 Default: \fB$INSTALL_PREFIX/lib/node\fR
b70b2a0 @isaacs Add built documentation to project, so that the install doesn't require ...
isaacs authored
199 .
200 .P
e937a72 @isaacs Update all man pages using new version of ronn
isaacs authored
201 The root folder where packages are installed and npm keeps its data\.
b70b2a0 @isaacs Add built documentation to project, so that the install doesn't require ...
isaacs authored
202 .
57729b7 @isaacs Documentation updates
isaacs authored
203 .SS "binroot"
204 Default: \fB$INSTALL_PREFIX/bin\fR
205 .
206 .P
e937a72 @isaacs Update all man pages using new version of ronn
isaacs authored
207 The folder where executable programs are installed\.
57729b7 @isaacs Documentation updates
isaacs authored
208 .
c1cc130 @isaacs make doc
isaacs authored
209 .P
210 Set to "false" to not install executables
211 .
212 .SS "manroot"
213 Default: $INSTALL_PREFIX/share/man
214 .
215 .P
216 The folder where man pages are installed\.
217 .
218 .P
219 Set to "false" to not install man pages\.
220 .
b70b2a0 @isaacs Add built documentation to project, so that the install doesn't require ...
isaacs authored
221 .SS "registry"
e937a72 @isaacs Update all man pages using new version of ronn
isaacs authored
222 Default: https://registry\.npmjs\.org/
b70b2a0 @isaacs Add built documentation to project, so that the install doesn't require ...
isaacs authored
223 .
224 .P
e937a72 @isaacs Update all man pages using new version of ronn
isaacs authored
225 The base URL of the npm package registry\.
b70b2a0 @isaacs Add built documentation to project, so that the install doesn't require ...
isaacs authored
226 .
4ad295c @isaacs make doc
isaacs authored
227 .SS "_auth"
f2ccd17 @isaacs Use ronnjs instead of the ronn rubygem to build docs
isaacs authored
228 A base\-64 encoded "user:pass" pair\. This is created by npm\-adduser(1)\.
b70b2a0 @isaacs Add built documentation to project, so that the install doesn't require ...
isaacs authored
229 .
230 .P
57729b7 @isaacs Documentation updates
isaacs authored
231 If your config file is ever corrupted, you can set this manually by doing:
232 .
233 .IP "" 4
234 .
235 .nf
4ad295c @isaacs make doc
isaacs authored
236 npm adduser
57729b7 @isaacs Documentation updates
isaacs authored
237 .
238 .fi
239 .
240 .IP "" 0
241 .
4ad295c @isaacs make doc
isaacs authored
242 .SS "_authCrypt"
f2ccd17 @isaacs Use ronnjs instead of the ronn rubygem to build docs
isaacs authored
243 If crypto\.Cipher is available, and you have some private keys in \fB$HOME/\.ssh\fR,
244 then npm will encrypt your "\fIauth" config before saving to the \.npmrc file,
245 and will decrypt the "\fRauthCrypt" config when it reads the \.npmrc file\.
57729b7 @isaacs Documentation updates
isaacs authored
246 .
247 .SS "tag"
5e36298 @isaacs make doc
isaacs authored
248 Default: latest
57729b7 @isaacs Documentation updates
isaacs authored
249 .
250 .P
f2ccd17 @isaacs Use ronnjs instead of the ronn rubygem to build docs
isaacs authored
251 If you ask npm to install a package and don\'t tell it a specific version, then
252 it will install the specified tag\.
57729b7 @isaacs Documentation updates
isaacs authored
253 .
254 .P
e937a72 @isaacs Update all man pages using new version of ronn
isaacs authored
255 Note: this has no effect on the npm\-tag(1) command\.
c42fe61 @cliffano Add proxy support
cliffano authored
256 .
257 .SS "proxy"
f2ccd17 @isaacs Use ronnjs instead of the ronn rubygem to build docs
isaacs authored
258 If proxy is available, then npm will fetch the modules from the registry via
259 the proxy server\.
c42fe61 @cliffano Add proxy support
cliffano authored
260 .
261 .P
262 Example:
263 .
9dd1d79 @isaacs make doc
isaacs authored
264 .IP "" 4
265 .
266 .nf
267 proxy = http://proxy\-server:8080
268 .
269 .fi
270 .
271 .IP "" 0
5e36298 @isaacs make doc
isaacs authored
272 .
273 .SS "userconfig"
274 The default user configuration file is process\.env\.HOME+"/\.npmrc"\.
275 .
276 .P
f2ccd17 @isaacs Use ronnjs instead of the ronn rubygem to build docs
isaacs authored
277 Note that this must be provided either in the cli or env settings\. Once the
278 userconfig is read, it is irrelevant\.
5e36298 @isaacs make doc
isaacs authored
279 .
280 .SS "globalconfig"
f2ccd17 @isaacs Use ronnjs instead of the ronn rubygem to build docs
isaacs authored
281 The default global configuration file is resolved based on the location of the
282 node executable\. It is process\.execPath+"/\.\./\.\./etc/npmrc"\. In the canonical
283 NodeJS installation with \fBmake install\fR, this is \fB/usr/local/etc/npmrc\fR\|\. If you
284 put the node binary somewhere else (for instance, if you are using nvm or
285 nave), then it would be resolved relative to that location\.
5e36298 @isaacs make doc
isaacs authored
286 .
287 .P
f2ccd17 @isaacs Use ronnjs instead of the ronn rubygem to build docs
isaacs authored
288 Note that this must be provided in the cli, env, or userconfig settings\. Once
289 the globalconfig is read, this parameter is irrelevant\.
5e36298 @isaacs make doc
isaacs authored
290 .
291 .SS "global"
f2ccd17 @isaacs Use ronnjs instead of the ronn rubygem to build docs
isaacs authored
292 If set to some truish value (for instance, by being the last cli flag or being
293 passed a literal \fBtrue\fR or \fB1\fR), and the \fBnpm config set\fR param is being
294 called, then the new configuration paramater is written global config file\.
295 Otherwise, they are saved to the user config file\.
6f7987b @isaacs Document the 'dev' config
isaacs authored
296 .
297 .SS "dev"
f2ccd17 @isaacs Use ronnjs instead of the ronn rubygem to build docs
isaacs authored
298 If set to a truish value, then it\'ll install the "devDependencies" as well as
299 "dependencies" when installing a package\.
6f7987b @isaacs Document the 'dev' config
isaacs authored
300 .
301 .P
302 Note that devDependencies are \fIalways\fR installed when linking a package\.
bef47ee @isaacs document "tar" conf
isaacs authored
303 .
304 .SS "tar"
305 Default: env\.TAR or "tar"
306 .
307 .P
308 The name of a GNU\-compatible tar program on your system\.
fcd9f2b @isaacs Document "gzip" config
isaacs authored
309 .
310 .SS "gzip"
3cb1bc0 @isaacs Fix #203. Use the env.GZIPBIN env instead of env.GZIP
isaacs authored
311 Default: env\.GZIPBIN or "gzip"
fcd9f2b @isaacs Document "gzip" config
isaacs authored
312 .
313 .P
314 The name of a GNU\-compatible gzip program on your system\.
8f3ee0c @isaacs document the 'usage' config
isaacs authored
315 .
316 .SS "usage"
317 If set to \fBtrue\fR, then this will tell help to print out the short usage statement
318 instead of the long manpage type thing\.
319 .
320 .P
321 This is set automatically if you invoke help like \fBnpm command \-?\fR\|\.
42b4afa @isaacs make doc
isaacs authored
322 .
323 .SS "viewer"
324 Default: "man"
325 .
326 .P
327 The program to use to view help content\. Set to "woman" to use the emacs troff viewer
328 by that name\.
2881227 @isaacs make doc
isaacs authored
329 .
330 .SS "exit"
331 Default: true
332 .
333 .P
334 Whether or not to exit the process when the command is finished\. When
335 using npm programmatically, it\'s a good idea to set this to \fBfalse\fR
336 explicitly\.
337 .
338 .SS "logfd"
339 Default: Standard Error FD (2)
340 .
341 .P
342 The file descriptor (integer) or stream object where npm will write log
343 messages\.
344 .
345 .P
346 When using npm programmatically, you may want to provide a
347 FileWriteStream, or some other form of WritableStream\.
348 .
349 .SS "outfd"
350 Default: Standard Output FD (1)
351 .
352 .P
353 The file descriptor (integer) or stream object where npm will write
354 "normal" output\. For instance, the \fBls\fR and \fBview\fR commands write their
355 output here\.
356 .
357 .P
358 When using npm programmatically, you may want to provide a
359 FileWriteStream, or some other form of WritableStream\.
360 .
361 .SS "color"
362 Default: true
363 .
364 .P
365 Set to false to disable colorized output\.
366 .
367 .P
368 In versions of node that expose the \fBisatty\fR function, npm will never
369 write colorized output to a non\-terminal file descriptor\.
370 .
371 .SS "tmproot"
372 Default: env\.TMPDIR or "/tmp"
373 .
374 .P
375 The folder where temporary files should be placed\.
376 .
377 .P
378 npm creates a subfolder whenever it is run, and attempts to delete it
379 afterwards\.
380 .
381 .SS "force"
382 Default: false
383 .
384 .P
385 Set to a truish value to force uninstalling packages, even if they have
386 dependents\.
387 .
388 .P
389 Note that setting \fBrecursive\fR is safer, because forcing uninstall can
390 create orphan packages that no longer function properly\.
391 .
392 .SS "editor"
393 Default: env\.EDITOR
394 .
395 .P
396 The program to use to edit files\.
c1791f4 @isaacs make doc
isaacs authored
397 .
398 .SS "listopts"
399 Default: ""
400 .
401 .P
402 A whitespace\-separated list of extra args that are always passed to npm ls
403 .
404 .P
405 For example: \fBlistopts = remote\fR
406 .
407 .P
408 \fBnpm ls\fR
409 .
410 .P
411 The output here will always filter by remote
df152ab @isaacs Add the 'must-install' config, and use it in bundling
isaacs authored
412 .
413 .SS "must\-install"
414 Default: true
415 .
416 .P
417 Set to false to not install over packages that already exist\. By
418 default, \fBnpm install foo\fR will fetch and install the latest version of \fBfoo\fR, even if it matches a version already installed\.
Something went wrong with that request. Please try again.