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">
9 <h1><a href="../cli/npm-config.html">npm-config</a></h1> <p>Manage the npm configuration files</p>
11 <h2 id="SYNOPSIS">SYNOPSIS</h2>
13 <pre><code>npm config set <key> <value> [--global]
14 npm config get <key>
15 npm config delete <key>
18 npm c [set|get|delete|list]
20 npm set <key> <value> [--global]</code></pre>
22 <h2 id="DESCRIPTION">DESCRIPTION</h2>
24 <p>npm gets its config settings from the command line, environment
25 variables, <code>npmrc</code> files, and in some cases, the <code>package.json</code> file.</p>
27 <p>See <a href="../files/npmrc.html">npmrc(5)</a> for more information about the npmrc files.</p>
29 <p>See <code><a href="../misc/npm-config.html">npm-config(7)</a></code> for a more thorough discussion of the mechanisms
32 <p>The <code>npm config</code> command can be used to update and edit the contents
33 of the user and global npmrc files.</p>
35 <h2 id="Sub-commands">Sub-commands</h2>
37 <p>Config supports the following sub-commands:</p>
41 <pre><code>npm config set key value</code></pre>
43 <p>Sets the config key to the value.</p>
45 <p>If value is omitted, then it sets it to "true".</p>
49 <pre><code>npm config get key</code></pre>
51 <p>Echo the config value to stdout.</p>
53 <h3 id="list">list</h3>
55 <pre><code>npm config list</code></pre>
57 <p>Show all the config settings.</p>
59 <h3 id="delete">delete</h3>
61 <pre><code>npm config delete key</code></pre>
63 <p>Deletes the key from all configuration files.</p>
65 <h3 id="edit">edit</h3>
67 <pre><code>npm config edit</code></pre>
69 <p>Opens the config file in an editor. Use the <code>--global</code> flag to edit the
72 <h2 id="SEE-ALSO">SEE ALSO</h2>
74 <ul><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../cli/npm.html">npm(1)</a></li></ul>
76 <p id="footer">npm-config — npm@1.3.19</p>
79 var wrapper = document.getElementById("wrapper")
80 var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0)
81 .filter(function (el) {
82 return el.parentNode === wrapper
83 && el.tagName.match(/H[1-6]/)
87 , toc = document.createElement("ul")
88 toc.innerHTML = els.map(function (el) {
89 var i = el.tagName.charAt(1)
99 out += "<li><a href='#" + el.id + "'>" +
100 ( el.innerText || el.text || el.innerHTML)
105 document.body.appendChild(toc)