Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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