3 <title>npm-config</title>
4 <meta http-equiv="content-type" value="text/html;utf-8">
5 <link rel="stylesheet" type="text/css" href="../../static/style.css">
6 <link rel="canonical" href="https://www.npmjs.org/doc/misc/npm-config.html">
7 <script async=true src="../../static/toc.js"></script>
12 <h1><a href="../misc/npm-config.html">npm-config</a></h1> <p>More than you probably want to know about npm configuration</p>
13 <h2 id="description">DESCRIPTION</h2>
14 <p>npm gets its configuration values from the following sources, sorted by priority:</p>
15 <h3 id="command-line-flags">Command Line Flags</h3>
16 <p>Putting <code>--foo bar</code> on the command line sets the <code>foo</code> configuration
17 parameter to <code>"bar"</code>. A <code>--</code> argument tells the cli parser to stop
18 reading flags. A <code>--flag</code> parameter that is at the <em>end</em> of the
19 command will be given the value of <code>true</code>.</p>
20 <h3 id="environment-variables">Environment Variables</h3>
21 <p>Any environment variables that start with <code>npm_config_</code> will be
22 interpreted as a configuration parameter. For example, putting
23 <code>npm_config_foo=bar</code> in your environment will set the <code>foo</code>
24 configuration parameter to <code>bar</code>. Any environment configurations that
25 are not given a value will be given the value of <code>true</code>. Config
26 values are case-insensitive, so <code>NPM_CONFIG_FOO=bar</code> will work the
28 <h3 id="npmrc-files">npmrc Files</h3>
29 <p>The four relevant files are:</p>
31 <li>per-project config file (/path/to/my/project/.npmrc)</li>
32 <li>per-user config file (~/.npmrc)</li>
33 <li>global config file ($PREFIX/npmrc)</li>
34 <li>npm builtin config file (/path/to/npm/npmrc)</li>
36 <p>See <a href="../files/npmrc.html">npmrc(5)</a> for more details.</p>
37 <h3 id="default-configs">Default Configs</h3>
38 <p>A set of configuration parameters that are internal to npm, and are
39 defaults if nothing else is specified.</p>
40 <h2 id="shorthands-and-other-cli-niceties">Shorthands and Other CLI Niceties</h2>
41 <p>The following shorthands are parsed on the command-line:</p>
43 <li><code>-v</code>: <code>--version</code></li>
44 <li><code>-h</code>, <code>-?</code>, <code>--help</code>, <code>-H</code>: <code>--usage</code></li>
45 <li><code>-s</code>, <code>--silent</code>: <code>--loglevel silent</code></li>
46 <li><code>-q</code>, <code>--quiet</code>: <code>--loglevel warn</code></li>
47 <li><code>-d</code>: <code>--loglevel info</code></li>
48 <li><code>-dd</code>, <code>--verbose</code>: <code>--loglevel verbose</code></li>
49 <li><code>-ddd</code>: <code>--loglevel silly</code></li>
50 <li><code>-g</code>: <code>--global</code></li>
51 <li><code>-C</code>: <code>--prefix</code></li>
52 <li><code>-l</code>: <code>--long</code></li>
53 <li><code>-m</code>: <code>--message</code></li>
54 <li><code>-p</code>, <code>--porcelain</code>: <code>--parseable</code></li>
55 <li><code>-reg</code>: <code>--registry</code></li>
56 <li><code>-f</code>: <code>--force</code></li>
57 <li><code>-desc</code>: <code>--description</code></li>
58 <li><code>-S</code>: <code>--save</code></li>
59 <li><code>-D</code>: <code>--save-dev</code></li>
60 <li><code>-O</code>: <code>--save-optional</code></li>
61 <li><code>-B</code>: <code>--save-bundle</code></li>
62 <li><code>-E</code>: <code>--save-exact</code></li>
63 <li><code>-y</code>: <code>--yes</code></li>
64 <li><code>-n</code>: <code>--yes false</code></li>
65 <li><code>ll</code> and <code>la</code> commands: <code>ls --long</code></li>
67 <p>If the specified configuration param resolves unambiguously to a known
68 configuration parameter, then it is expanded to that configuration
69 parameter. For example:</p>
70 <pre><code>npm ls --par
73 </code></pre><p>If multiple single-character shorthands are strung together, and the
74 resulting combination is unambiguously not some other configuration
75 param, then it is expanded to its various component pieces. For
77 <pre><code>npm ls -gpld
79 npm ls --global --parseable --long --loglevel info
80 </code></pre><h2 id="per-package-config-settings">Per-Package Config Settings</h2>
81 <p>When running scripts (see <code><a href="../misc/npm-scripts.html">npm-scripts(7)</a></code>) the package.json "config"
82 keys are overwritten in the environment if there is a config param of
83 <code><name>[@<version>]:<key></code>. For example, if the package.json has
85 <pre><code>{ "name" : "foo"
86 , "config" : { "port" : "8080" }
87 , "scripts" : { "start" : "node server.js" } }
88 </code></pre><p>and the server.js is this:</p>
89 <pre><code>http.createServer(...).listen(process.env.npm_package_config_port)
90 </code></pre><p>then the user could change the behavior by doing:</p>
91 <pre><code>npm config set foo:port 80
92 </code></pre><p>See <a href="../files/package.json.html">package.json(5)</a> for more information.</p>
93 <h2 id="config-settings">Config Settings</h2>
94 <h3 id="access">access</h3>
96 <li>Default: <code>restricted</code></li>
99 <p>When publishing scoped packages, the access level defaults to <code>restricted</code>. If
100 you want your scoped package to be publicly viewable (and installable) set
101 <code>--access=public</code>. The only valid values for <code>access</code> are <code>public</code> and
102 <code>restricted</code>. Unscoped packages <em>always</em> have an access level of <code>public</code>.</p>
103 <h3 id="always-auth">always-auth</h3>
105 <li>Default: false</li>
106 <li>Type: Boolean</li>
108 <p>Force npm to always require authentication when accessing the registry,
109 even for <code>GET</code> requests.</p>
110 <h3 id="bin-links">bin-links</h3>
112 <li>Default: <code>true</code></li>
113 <li>Type: Boolean</li>
115 <p>Tells npm to create symlinks (or <code>.cmd</code> shims on Windows) for package
117 <p>Set to false to have it not do this. This can be used to work around
118 the fact that some file systems don't support symlinks, even on
119 ostensibly Unix systems.</p>
120 <h3 id="browser">browser</h3>
122 <li>Default: OS X: <code>"open"</code>, Windows: <code>"start"</code>, Others: <code>"xdg-open"</code></li>
123 <li>Type: String</li>
125 <p>The browser that is called by the <code>npm docs</code> command to open websites.</p>
128 <li>Default: The npm CA certificate</li>
129 <li>Type: String, Array or null</li>
131 <p>The Certificate Authority signing certificate that is trusted for SSL
132 connections to the registry. Values should be in PEM format with newlines
133 replaced by the string "\n". For example:</p>
134 <pre><code>ca="-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----"
135 </code></pre><p>Set to <code>null</code> to only allow "known" registrars, or to a specific CA cert
136 to trust only that specific signing authority.</p>
137 <p>Multiple CAs can be trusted by specifying an array of certificates:</p>
138 <pre><code>ca[]="..."
140 </code></pre><p>See also the <code>strict-ssl</code> config.</p>
141 <h3 id="cafile">cafile</h3>
143 <li>Default: <code>null</code></li>
146 <p>A path to a file containing one or multiple Certificate Authority signing
147 certificates. Similar to the <code>ca</code> setting, but allows for multiple CA's, as
148 well as for the CA information to be stored in a file on disk.</p>
149 <h3 id="cache">cache</h3>
151 <li>Default: Windows: <code>%AppData%\npm-cache</code>, Posix: <code>~/.npm</code></li>
154 <p>The location of npm's cache directory. See <code><a href="../cli/npm-cache.html">npm-cache(1)</a></code></p>
155 <h3 id="cache-lock-stale">cache-lock-stale</h3>
157 <li>Default: 60000 (1 minute)</li>
158 <li>Type: Number</li>
160 <p>The number of ms before cache folder lockfiles are considered stale.</p>
161 <h3 id="cache-lock-retries">cache-lock-retries</h3>
164 <li>Type: Number</li>
166 <p>Number of times to retry to acquire a lock on cache folder lockfiles.</p>
167 <h3 id="cache-lock-wait">cache-lock-wait</h3>
169 <li>Default: 10000 (10 seconds)</li>
170 <li>Type: Number</li>
172 <p>Number of ms to wait for cache lock files to expire.</p>
173 <h3 id="cache-max">cache-max</h3>
175 <li>Default: Infinity</li>
176 <li>Type: Number</li>
178 <p>The maximum time (in seconds) to keep items in the registry cache before
179 re-checking against the registry.</p>
180 <p>Note that no purging is done unless the <code>npm cache clean</code> command is
181 explicitly used, and that only GET requests use the cache.</p>
182 <h3 id="cache-min">cache-min</h3>
185 <li>Type: Number</li>
187 <p>The minimum time (in seconds) to keep items in the registry cache before
188 re-checking against the registry.</p>
189 <p>Note that no purging is done unless the <code>npm cache clean</code> command is
190 explicitly used, and that only GET requests use the cache.</p>
191 <h3 id="cert">cert</h3>
193 <li>Default: <code>null</code></li>
194 <li>Type: String</li>
196 <p>A client certificate to pass when accessing the registry.</p>
197 <h3 id="color">color</h3>
199 <li>Default: true on Posix, false on Windows</li>
200 <li>Type: Boolean or <code>"always"</code></li>
202 <p>If false, never shows colors. If <code>"always"</code> then always shows colors.
203 If true, then only prints color codes for tty file descriptors.</p>
204 <h3 id="depth">depth</h3>
206 <li>Default: Infinity</li>
207 <li>Type: Number</li>
209 <p>The depth to go when recursing directories for <code>npm ls</code>,
210 <code>npm cache ls</code>, and <code>npm outdated</code>.</p>
211 <p>For <code>npm outdated</code>, a setting of <code>Infinity</code> will be treated as <code>0</code>
212 since that gives more useful information. To show the outdated status
213 of all packages and dependents, use a large integer value,
214 e.g., <code>npm outdated --depth 9999</code></p>
215 <h3 id="description">description</h3>
217 <li>Default: true</li>
218 <li>Type: Boolean</li>
220 <p>Show the description in <code>npm search</code></p>
221 <h3 id="dev">dev</h3>
223 <li>Default: false</li>
224 <li>Type: Boolean</li>
226 <p>Install <code>dev-dependencies</code> along with packages.</p>
227 <p>Note that <code>dev-dependencies</code> are also installed if the <code>npat</code> flag is
229 <h3 id="editor">editor</h3>
231 <li>Default: <code>EDITOR</code> environment variable if set, or <code>"vi"</code> on Posix,
232 or <code>"notepad"</code> on Windows.</li>
235 <p>The command to run for <code>npm edit</code> or <code>npm config edit</code>.</p>
236 <h3 id="engine-strict">engine-strict</h3>
238 <li>Default: false</li>
239 <li>Type: Boolean</li>
241 <p>If set to true, then npm will stubbornly refuse to install (or even
242 consider installing) any package that claims to not be compatible with
243 the current Node.js version.</p>
244 <h3 id="force">force</h3>
246 <li>Default: false</li>
247 <li>Type: Boolean</li>
249 <p>Makes various commands more forceful.</p>
251 <li>lifecycle script failure does not block progress.</li>
252 <li>publishing clobbers previously published versions.</li>
253 <li>skips cache when requesting from the registry.</li>
254 <li>prevents checks against clobbering non-npm files.</li>
256 <h3 id="fetch-retries">fetch-retries</h3>
259 <li>Type: Number</li>
261 <p>The "retries" config for the <code>retry</code> module to use when fetching
262 packages from the registry.</p>
263 <h3 id="fetch-retry-factor">fetch-retry-factor</h3>
266 <li>Type: Number</li>
268 <p>The "factor" config for the <code>retry</code> module to use when fetching
270 <h3 id="fetch-retry-mintimeout">fetch-retry-mintimeout</h3>
272 <li>Default: 10000 (10 seconds)</li>
273 <li>Type: Number</li>
275 <p>The "minTimeout" config for the <code>retry</code> module to use when fetching
277 <h3 id="fetch-retry-maxtimeout">fetch-retry-maxtimeout</h3>
279 <li>Default: 60000 (1 minute)</li>
280 <li>Type: Number</li>
282 <p>The "maxTimeout" config for the <code>retry</code> module to use when fetching
284 <h3 id="git">git</h3>
286 <li>Default: <code>"git"</code></li>
287 <li>Type: String</li>
289 <p>The command to use for git commands. If git is installed on the
290 computer, but is not in the <code>PATH</code>, then set this to the full path to
292 <h3 id="git-tag-version">git-tag-version</h3>
294 <li>Default: <code>true</code></li>
295 <li>Type: Boolean</li>
297 <p>Tag the commit when using the <code>npm version</code> command.</p>
298 <h3 id="global">global</h3>
300 <li>Default: false</li>
301 <li>Type: Boolean</li>
303 <p>Operates in "global" mode, so that packages are installed into the
304 <code>prefix</code> folder instead of the current working directory. See
305 <code><a href="../files/npm-folders.html">npm-folders(5)</a></code> for more on the differences in behavior.</p>
307 <li>packages are installed into the <code>{prefix}/lib/node_modules</code> folder, instead of the
308 current working directory.</li>
309 <li>bin files are linked to <code>{prefix}/bin</code></li>
310 <li>man pages are linked to <code>{prefix}/share/man</code></li>
312 <h3 id="globalconfig">globalconfig</h3>
314 <li>Default: {prefix}/etc/npmrc</li>
317 <p>The config file to read for global config options.</p>
318 <h3 id="group">group</h3>
320 <li>Default: GID of the current process</li>
321 <li>Type: String or Number</li>
323 <p>The group to use when running package scripts in global mode as the root
325 <h3 id="heading">heading</h3>
327 <li>Default: <code>"npm"</code></li>
328 <li>Type: String</li>
330 <p>The string that starts all the debugging log output.</p>
331 <h3 id="https-proxy">https-proxy</h3>
333 <li>Default: null</li>
336 <p>A proxy to use for outgoing https requests. If the <code>HTTPS_PROXY</code> or
337 <code>https_proxy</code> or <code>HTTP_PROXY</code> or <code>http_proxy</code> environment variables are set,
338 proxy settings will be honored by the underlying <code>request</code> library.</p>
339 <h3 id="if-present">if-present</h3>
341 <li>Default: false</li>
342 <li>Type: Boolean</li>
344 <p>If true, npm will not exit with an error code when <code>run-script</code> is invoked for
345 a script that isn't defined in the <code>scripts</code> section of <code>package.json</code>. This
346 option can be used when it's desirable to optionally run a script when it's
347 present and fail if the script fails. This is useful, for example, when running
348 scripts that may only apply for some builds in an otherwise generic CI setup.</p>
349 <h3 id="ignore-scripts">ignore-scripts</h3>
351 <li>Default: false</li>
352 <li>Type: Boolean</li>
354 <p>If true, npm does not run scripts specified in package.json files.</p>
355 <h3 id="init-module">init-module</h3>
357 <li>Default: ~/.npm-init.js</li>
360 <p>A module that will be loaded by the <code>npm init</code> command. See the
361 documentation for the
362 <a href="https://github.com/isaacs/init-package-json">init-package-json</a> module
363 for more information, or <a href="../cli/npm-init.html">npm-init(1)</a>.</p>
364 <h3 id="init-author-name">init-author-name</h3>
366 <li>Default: ""</li>
367 <li>Type: String</li>
369 <p>The value <code>npm init</code> should use by default for the package author's name.</p>
370 <h3 id="init-author-email">init-author-email</h3>
372 <li>Default: ""</li>
373 <li>Type: String</li>
375 <p>The value <code>npm init</code> should use by default for the package author's email.</p>
376 <h3 id="init-author-url">init-author-url</h3>
378 <li>Default: ""</li>
379 <li>Type: String</li>
381 <p>The value <code>npm init</code> should use by default for the package author's homepage.</p>
382 <h3 id="init-license">init-license</h3>
384 <li>Default: "ISC"</li>
385 <li>Type: String</li>
387 <p>The value <code>npm init</code> should use by default for the package license.</p>
388 <h3 id="init-version">init-version</h3>
390 <li>Default: "1.0.0"</li>
391 <li>Type: semver</li>
393 <p>The value that <code>npm init</code> should use by default for the package
394 version number, if not already set in package.json.</p>
395 <h3 id="json">json</h3>
397 <li>Default: false</li>
398 <li>Type: Boolean</li>
400 <p>Whether or not to output JSON data, rather than the normal output.</p>
401 <p>This feature is currently experimental, and the output data structures
402 for many commands is either not implemented in JSON yet, or subject to
403 change. Only the output from <code>npm ls --json</code> is currently valid.</p>
404 <h3 id="key">key</h3>
406 <li>Default: <code>null</code></li>
407 <li>Type: String</li>
409 <p>A client key to pass when accessing the registry.</p>
410 <h3 id="link">link</h3>
412 <li>Default: false</li>
413 <li>Type: Boolean</li>
415 <p>If true, then local installs will link if there is a suitable globally
416 installed package.</p>
417 <p>Note that this means that local installs can cause things to be
418 installed into the global space at the same time. The link is only done
419 if one of the two conditions are met:</p>
421 <li>The package is not already installed globally, or</li>
422 <li>the globally installed version is identical to the version that is
423 being installed locally.</li>
425 <h3 id="local-address">local-address</h3>
427 <li>Default: undefined</li>
428 <li>Type: IP Address</li>
430 <p>The IP address of the local interface to use when making connections
431 to the npm registry. Must be IPv4 in versions of Node prior to 0.12.</p>
432 <h3 id="loglevel">loglevel</h3>
434 <li>Default: "warn"</li>
435 <li>Type: String</li>
436 <li>Values: "silent", "error", "warn", "http", "info", "verbose", "silly"</li>
438 <p>What level of logs to report. On failure, <em>all</em> logs are written to
439 <code>npm-debug.log</code> in the current working directory.</p>
440 <p>Any logs of a higher level than the setting are shown.
441 The default is "warn", which shows warn and error output.</p>
442 <h3 id="logstream">logstream</h3>
444 <li>Default: process.stderr</li>
445 <li>Type: Stream</li>
447 <p>This is the stream that is passed to the
448 <a href="https://github.com/npm/npmlog">npmlog</a> module at run time.</p>
449 <p>It cannot be set from the command line, but if you are using npm
450 programmatically, you may wish to send logs to somewhere other than
452 <p>If the <code>color</code> config is set to true, then this stream will receive
453 colored output if it is a TTY.</p>
454 <h3 id="long">long</h3>
456 <li>Default: false</li>
457 <li>Type: Boolean</li>
459 <p>Show extended information in <code>npm ls</code> and <code>npm search</code>.</p>
460 <h3 id="message">message</h3>
462 <li>Default: "%s"</li>
463 <li>Type: String</li>
465 <p>Commit message which is used by <code>npm version</code> when creating version commit.</p>
466 <p>Any "%s" in the message will be replaced with the version number.</p>
467 <h3 id="node-version">node-version</h3>
469 <li>Default: process.version</li>
470 <li>Type: semver or false</li>
472 <p>The node version to use when checking a package's <code>engines</code> map.</p>
473 <h3 id="npat">npat</h3>
475 <li>Default: false</li>
476 <li>Type: Boolean</li>
478 <p>Run tests on installation.</p>
479 <h3 id="onload-script">onload-script</h3>
481 <li>Default: false</li>
484 <p>A node module to <code>require()</code> when npm loads. Useful for programmatic
486 <h3 id="optional">optional</h3>
488 <li>Default: true</li>
489 <li>Type: Boolean</li>
491 <p>Attempt to install packages in the <code>optionalDependencies</code> object. Note
492 that if these packages fail to install, the overall installation
493 process is not aborted.</p>
494 <h3 id="parseable">parseable</h3>
496 <li>Default: false</li>
497 <li>Type: Boolean</li>
499 <p>Output parseable results from commands that write to
501 <h3 id="prefix">prefix</h3>
503 <li>Default: see <a href="../files/npm-folders.html">npm-folders(5)</a></li>
506 <p>The location to install global items. If set on the command line, then
507 it forces non-global commands to run in the specified folder.</p>
508 <h3 id="production">production</h3>
510 <li>Default: false</li>
511 <li>Type: Boolean</li>
513 <p>Set to true to run in "production" mode.</p>
515 <li>devDependencies are not installed at the topmost level when running
516 local <code>npm install</code> without any arguments.</li>
517 <li>Set the NODE_ENV="production" for lifecycle scripts.</li>
519 <h3 id="proprietary-attribs">proprietary-attribs</h3>
521 <li>Default: true</li>
522 <li>Type: Boolean</li>
524 <p>Whether or not to include proprietary extended attributes in the
525 tarballs created by npm.</p>
526 <p>Unless you are expecting to unpack package tarballs with something other
527 than npm -- particularly a very outdated tar implementation -- leave
529 <h3 id="proxy">proxy</h3>
531 <li>Default: null</li>
534 <p>A proxy to use for outgoing http requests. If the <code>HTTP_PROXY</code> or
535 <code>http_proxy</code> environment variables are set, proxy settings will be
536 honored by the underlying <code>request</code> library.</p>
537 <h3 id="rebuild-bundle">rebuild-bundle</h3>
539 <li>Default: true</li>
540 <li>Type: Boolean</li>
542 <p>Rebuild bundled dependencies after installation.</p>
543 <h3 id="registry">registry</h3>
545 <li>Default: <a href="https://registry.npmjs.org/">https://registry.npmjs.org/</a></li>
548 <p>The base URL of the npm package registry.</p>
549 <h3 id="rollback">rollback</h3>
551 <li>Default: true</li>
552 <li>Type: Boolean</li>
554 <p>Remove failed installs.</p>
555 <h3 id="save">save</h3>
557 <li>Default: false</li>
558 <li>Type: Boolean</li>
560 <p>Save installed packages to a package.json file as dependencies.</p>
561 <p>When used with the <code>npm rm</code> command, it removes it from the <code>dependencies</code>
563 <p>Only works if there is already a package.json file present.</p>
564 <h3 id="save-bundle">save-bundle</h3>
566 <li>Default: false</li>
567 <li>Type: Boolean</li>
569 <p>If a package would be saved at install time by the use of <code>--save</code>,
570 <code>--save-dev</code>, or <code>--save-optional</code>, then also put it in the
571 <code>bundleDependencies</code> list.</p>
572 <p>When used with the <code>npm rm</code> command, it removes it from the
573 bundledDependencies list.</p>
574 <h3 id="save-dev">save-dev</h3>
576 <li>Default: false</li>
577 <li>Type: Boolean</li>
579 <p>Save installed packages to a package.json file as <code>devDependencies</code>.</p>
580 <p>When used with the <code>npm rm</code> command, it removes it from the
581 <code>devDependencies</code> object.</p>
582 <p>Only works if there is already a package.json file present.</p>
583 <h3 id="save-exact">save-exact</h3>
585 <li>Default: false</li>
586 <li>Type: Boolean</li>
588 <p>Dependencies saved to package.json using <code>--save</code>, <code>--save-dev</code> or
589 <code>--save-optional</code> will be configured with an exact version rather than
590 using npm's default semver range operator.</p>
591 <h3 id="save-optional">save-optional</h3>
593 <li>Default: false</li>
594 <li>Type: Boolean</li>
596 <p>Save installed packages to a package.json file as
597 optionalDependencies.</p>
598 <p>When used with the <code>npm rm</code> command, it removes it from the
599 <code>devDependencies</code> object.</p>
600 <p>Only works if there is already a package.json file present.</p>
601 <h3 id="save-prefix">save-prefix</h3>
603 <li>Default: '^'</li>
604 <li>Type: String</li>
606 <p>Configure how versions of packages installed to a package.json file via
607 <code>--save</code> or <code>--save-dev</code> get prefixed.</p>
608 <p>For example if a package has version <code>1.2.3</code>, by default its version is
609 set to <code>^1.2.3</code> which allows minor upgrades for that package, but after
610 <code>npm config set save-prefix='~'</code> it would be set to <code>~1.2.3</code> which only allows
612 <h3 id="scope">scope</h3>
614 <li>Default: ""</li>
615 <li>Type: String</li>
617 <p>Associate an operation with a scope for a scoped registry. Useful when logging
618 in to a private registry for the first time:
619 <code>npm login --scope=@organization --registry=registry.organization.com</code>, which
620 will cause <code>@organization</code> to be mapped to the registry for future installation
621 of packages specified according to the pattern <code>@organization/package</code>.</p>
622 <h3 id="searchopts">searchopts</h3>
624 <li>Default: ""</li>
625 <li>Type: String</li>
627 <p>Space-separated options that are always passed to search.</p>
628 <h3 id="searchexclude">searchexclude</h3>
630 <li>Default: ""</li>
631 <li>Type: String</li>
633 <p>Space-separated options that limit the results from search.</p>
634 <h3 id="searchsort">searchsort</h3>
636 <li>Default: "name"</li>
637 <li>Type: String</li>
638 <li>Values: "name", "-name", "date", "-date", "description",
639 "-description", "keywords", "-keywords"</li>
641 <p>Indication of which field to sort search results by. Prefix with a <code>-</code>
642 character to indicate reverse sort.</p>
643 <h3 id="shell">shell</h3>
645 <li>Default: SHELL environment variable, or "bash" on Posix, or "cmd" on
649 <p>The shell to run for the <code>npm explore</code> command.</p>
650 <h3 id="shrinkwrap">shrinkwrap</h3>
652 <li>Default: true</li>
653 <li>Type: Boolean</li>
655 <p>If set to false, then ignore <code>npm-shrinkwrap.json</code> files when
657 <h3 id="sign-git-tag">sign-git-tag</h3>
659 <li>Default: false</li>
660 <li>Type: Boolean</li>
662 <p>If set to true, then the <code>npm version</code> command will tag the version
663 using <code>-s</code> to add a signature.</p>
664 <p>Note that git requires you to have set up GPG keys in your git configs
665 for this to work properly.</p>
666 <h3 id="spin">spin</h3>
668 <li>Default: true</li>
669 <li>Type: Boolean or <code>"always"</code></li>
671 <p>When set to <code>true</code>, npm will display an ascii spinner while it is doing
672 things, if <code>process.stderr</code> is a TTY.</p>
673 <p>Set to <code>false</code> to suppress the spinner, or set to <code>always</code> to output
674 the spinner even for non-TTY outputs.</p>
675 <h3 id="strict-ssl">strict-ssl</h3>
677 <li>Default: true</li>
678 <li>Type: Boolean</li>
680 <p>Whether or not to do SSL key validation when making requests to the
681 registry via https.</p>
682 <p>See also the <code>ca</code> config.</p>
683 <h3 id="tag">tag</h3>
685 <li>Default: latest</li>
686 <li>Type: String</li>
688 <p>If you ask npm to install a package and don't tell it a specific version, then
689 it will install the specified tag.</p>
690 <p>Also the tag that is added to the package@version specified by the <code>npm
691 tag</code> command, if no explicit tag is given.</p>
692 <h3 id="tag-version-prefix">tag-version-prefix</h3>
694 <li>Default: <code>"v"</code></li>
695 <li>Type: String</li>
697 <p>If set, alters the prefix used when tagging a new version when performing a
698 version increment using <code>npm-version</code>. To remove the prefix altogether, set it
699 to the empty string: <code>""</code>.</p>
700 <p>Because other tools may rely on the convention that npm version tags look like
701 <code>v1.0.0</code>, <em>only use this property if it is absolutely necessary</em>. In
702 particular, use care when overriding this setting for public packages.</p>
703 <h3 id="tmp">tmp</h3>
705 <li>Default: TMPDIR environment variable, or "/tmp"</li>
708 <p>Where to store temporary files and folders. All temp files are deleted
709 on success, but left behind on failure for forensic purposes.</p>
710 <h3 id="unicode">unicode</h3>
712 <li>Default: true</li>
713 <li>Type: Boolean</li>
715 <p>When set to true, npm uses unicode characters in the tree output. When
716 false, it uses ascii characters to draw trees.</p>
717 <h3 id="unsafe-perm">unsafe-perm</h3>
719 <li>Default: false if running as root, true otherwise</li>
720 <li>Type: Boolean</li>
722 <p>Set to true to suppress the UID/GID switching when running package
723 scripts. If set explicitly to false, then installing as a non-root user
725 <h3 id="usage">usage</h3>
727 <li>Default: false</li>
728 <li>Type: Boolean</li>
730 <p>Set to show short usage output (like the -H output)
731 instead of complete help when doing <code><a href="../cli/npm-help.html">npm-help(1)</a></code>.</p>
732 <h3 id="user">user</h3>
734 <li>Default: "nobody"</li>
735 <li>Type: String or Number</li>
737 <p>The UID to set to when running package scripts as root.</p>
738 <h3 id="userconfig">userconfig</h3>
740 <li>Default: ~/.npmrc</li>
743 <p>The location of user-level configuration settings.</p>
744 <h3 id="umask">umask</h3>
746 <li>Default: 022</li>
747 <li>Type: Octal numeric string in range 0000..0777 (0..511)</li>
749 <p>The "umask" value to use when setting the file creation mode on files
751 <p>Folders and executables are given a mode which is <code>0777</code> masked against
752 this value. Other files are given a mode which is <code>0666</code> masked against
753 this value. Thus, the defaults are <code>0755</code> and <code>0644</code> respectively.</p>
754 <h3 id="user-agent">user-agent</h3>
756 <li>Default: node/{process.version} {process.platform} {process.arch}</li>
757 <li>Type: String</li>
759 <p>Sets a User-Agent to the request header</p>
760 <h3 id="version">version</h3>
762 <li>Default: false</li>
763 <li>Type: boolean</li>
765 <p>If true, output the npm version and exit successfully.</p>
766 <p>Only relevant when specified explicitly on the command line.</p>
767 <h3 id="versions">versions</h3>
769 <li>Default: false</li>
770 <li>Type: boolean</li>
772 <p>If true, output the npm version as well as node's <code>process.versions</code> map, and
773 exit successfully.</p>
774 <p>Only relevant when specified explicitly on the command line.</p>
775 <h3 id="viewer">viewer</h3>
777 <li>Default: "man" on Posix, "browser" on Windows</li>
780 <p>The program to use to view help content.</p>
781 <p>Set to <code>"browser"</code> to view html help content in the default web browser.</p>
782 <h2 id="see-also">SEE ALSO</h2>
784 <li><a href="../cli/npm-config.html">npm-config(1)</a></li>
785 <li><a href="../files/npmrc.html">npmrc(5)</a></li>
786 <li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li>
787 <li><a href="../files/npm-folders.html">npm-folders(5)</a></li>
788 <li><a href="../cli/npm.html">npm(1)</a></li>
793 <table border=0 cellspacing=0 cellpadding=0 id=npmlogo>
794 <tr><td style="width:180px;height:10px;background:rgb(237,127,127)" colspan=18> </td></tr>
795 <tr><td rowspan=4 style="width:10px;height:10px;background:rgb(237,127,127)"> </td><td style="width:40px;height:10px;background:#fff" colspan=4> </td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=4> </td><td style="width:40px;height:10px;background:#fff" colspan=4> </td><td rowspan=4 style="width:10px;height:10px;background:rgb(237,127,127)"> </td><td colspan=6 style="width:60px;height:10px;background:#fff"> </td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=4> </td></tr>
796 <tr><td colspan=2 style="width:20px;height:30px;background:#fff" rowspan=3> </td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3> </td><td style="width:10px;height:10px;background:#fff" rowspan=3> </td><td style="width:20px;height:10px;background:#fff" rowspan=4 colspan=2> </td><td style="width:10px;height:20px;background:rgb(237,127,127)" rowspan=2> </td><td style="width:10px;height:10px;background:#fff" rowspan=3> </td><td style="width:20px;height:10px;background:#fff" rowspan=3 colspan=2> </td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3> </td><td style="width:10px;height:10px;background:#fff" rowspan=3> </td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3> </td></tr>
797 <tr><td style="width:10px;height:10px;background:#fff" rowspan=2> </td></tr>
798 <tr><td style="width:10px;height:10px;background:#fff"> </td></tr>
799 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
800 <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
802 <p id="footer">npm-config — npm@2.14.4</p>