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-ls.html">npm-ls</a></h1> <p>List installed packages</p>
11 <h2 id="SYNOPSIS">SYNOPSIS</h2>
13 <pre><code>npm list [<pkg> ...]
14 npm ls [<pkg> ...]
15 npm la [<pkg> ...]
16 npm ll [<pkg> ...]</code></pre>
18 <h2 id="DESCRIPTION">DESCRIPTION</h2>
20 <p>This command will print to stdout all the versions of packages that are
21 installed, as well as their dependencies, in a tree-structure.</p>
23 <p>Positional arguments are <code>name@version-range</code> identifiers, which will
24 limit the results to only the paths to the packages named. Note that
25 nested packages will <em>also</em> show the paths to the specified packages.
26 For example, running <code>npm ls promzard</code> in npm's source tree will show:</p>
28 <pre><code>npm@1.4.3 /path/to/npm
29 └─┬ init-package-json@0.0.4
30 └── promzard@0.1.5</code></pre>
32 <p>It will print out extraneous, missing, and invalid packages.</p>
34 <p>If a project specifies git urls for dependencies these are shown
35 in parentheses after the name@version to make it easier for users to
36 recognize potential forks of a project.</p>
38 <p>When run as <code>ll</code> or <code>la</code>, it shows extended information by default.</p>
40 <h2 id="CONFIGURATION">CONFIGURATION</h2>
42 <h3 id="json">json</h3>
44 <ul><li>Default: false</li><li>Type: Boolean</li></ul>
46 <p>Show information in JSON format.</p>
48 <h3 id="long">long</h3>
50 <ul><li>Default: false</li><li>Type: Boolean</li></ul>
52 <p>Show extended information.</p>
54 <h3 id="parseable">parseable</h3>
56 <ul><li>Default: false</li><li>Type: Boolean</li></ul>
58 <p>Show parseable output instead of tree view.</p>
60 <h3 id="global">global</h3>
62 <ul><li>Default: false</li><li>Type: Boolean</li></ul>
64 <p>List packages in the global install prefix instead of in the current
67 <h3 id="depth">depth</h3>
69 <ul><li>Type: Int</li></ul>
71 <p>Max display depth of the dependency tree.</p>
73 <h2 id="SEE-ALSO">SEE ALSO</h2>
75 <ul><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../cli/npm-link.html">npm-link(1)</a></li><li><a href="../cli/npm-prune.html">npm-prune(1)</a></li><li><a href="../cli/npm-outdated.html">npm-outdated(1)</a></li><li><a href="../cli/npm-update.html">npm-update(1)</a></li></ul>
77 <p id="footer">npm-ls — npm@1.4.3</p>
80 var wrapper = document.getElementById("wrapper")
81 var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0)
82 .filter(function (el) {
83 return el.parentNode === wrapper
84 && el.tagName.match(/H[1-6]/)
88 , toc = document.createElement("ul")
89 toc.innerHTML = els.map(function (el) {
90 var i = el.tagName.charAt(1)
100 out += "<li><a href='#" + el.id + "'>" +
101 ( el.innerText || el.text || el.innerHTML)
106 document.body.appendChild(toc)