Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
npm-ls.1272 linesDownload Raw Back to man1
1.TH "NPM-LS" "1" "April 2026" "NPM@11.13.0" ""
2.SH "NAME"
3\fBnpm-ls\fR - List installed packages
4.SS "Synopsis"
5.P
6.RS 2
7.nf
8npm ls <package-spec>
9
10alias: list
11.fi
12.RE
13.SS "Description"
14.P
15This command will print to stdout all the versions of packages that are installed, as well as their dependencies when \fB--all\fR is specified, in a tree structure.
16.P
17Note: to get a "bottoms up" view of why a given package is included in the tree at all, use npm help explain.
18.P
19Positional arguments are \fBname@version-range\fR identifiers, which will limit the results to only the paths to the packages named. Note that nested packages will \fIalso\fR show the paths to the specified packages. For example, running \fBnpm ls promzard\fR in npm's source tree will show:
20.P
21.RS 2
22.nf
23npm@11.13.0 /path/to/npm
24└─┬ init-package-json@0.0.4
25  └── promzard@0.1.5
26.fi
27.RE
28.P
29It will print out extraneous, missing, and invalid packages.
30.P
31If a project specifies git urls for dependencies these are shown in parentheses after the \fBname@version\fR to make it easier for users to recognize potential forks of a project.
32.P
33The tree shown is the logical dependency tree, based on package dependencies, not the physical layout of your \fBnode_modules\fR folder.
34.P
35When run as \fBll\fR or \fBla\fR, it shows extended information by default.
36.SS "Configuration"
37.SS "\fBall\fR"
38.RS 0
39.IP \(bu 4
40Default: false
41.IP \(bu 4
42Type: Boolean
43.RE 0
44
45.P
46When running \fBnpm outdated\fR and \fBnpm ls\fR, setting \fB--all\fR will show all outdated or installed packages, rather than only those directly depended upon by the current project.
47.SS "\fBjson\fR"
48.RS 0
49.IP \(bu 4
50Default: false
51.IP \(bu 4
52Type: Boolean
53.RE 0
54
55.P
56Whether or not to output JSON data, rather than the normal output.
57.RS 0
58.IP \(bu 4
59In \fBnpm pkg set\fR it enables parsing set values with JSON.parse() before saving them to your \fBpackage.json\fR.
60.RE 0
61
62.P
63Not supported by all npm commands.
64.SS "\fBlong\fR"
65.RS 0
66.IP \(bu 4
67Default: false
68.IP \(bu 4
69Type: Boolean
70.RE 0
71
72.P
73Show extended information in \fBls\fR, \fBsearch\fR, and \fBhelp-search\fR.
74.SS "\fBparseable\fR"
75.RS 0
76.IP \(bu 4
77Default: false
78.IP \(bu 4
79Type: Boolean
80.RE 0
81
82.P
83Output parseable results from commands that write to standard output. For \fBnpm search\fR, this will be tab-separated table format.
84.SS "\fBglobal\fR"
85.RS 0
86.IP \(bu 4
87Default: false
88.IP \(bu 4
89Type: Boolean
90.RE 0
91
92.P
93Operates in "global" mode, so that packages are installed into the \fBprefix\fR folder instead of the current working directory. See npm help folders for more on the differences in behavior.
94.RS 0
95.IP \(bu 4
96packages are installed into the \fB{prefix}/lib/node_modules\fR folder, instead of the current working directory.
97.IP \(bu 4
98bin files are linked to \fB{prefix}/bin\fR
99.IP \(bu 4
100man pages are linked to \fB{prefix}/share/man\fR
101.RE 0
102
103.SS "\fBdepth\fR"
104.RS 0
105.IP \(bu 4
106Default: \fBInfinity\fR if \fB--all\fR is set; otherwise, \fB0\fR
107.IP \(bu 4
108Type: null or Number
109.RE 0
110
111.P
112The depth to go when recursing packages for \fBnpm ls\fR.
113.P
114If not set, \fBnpm ls\fR will show only the immediate dependencies of the root project. If \fB--all\fR is set, then npm will show all dependencies by default.
115.SS "\fBomit\fR"
116.RS 0
117.IP \(bu 4
118Default: 'dev' if the \fBNODE_ENV\fR environment variable is set to 'production'; otherwise, empty.
119.IP \(bu 4
120Type: "dev", "optional", or "peer" (can be set multiple times)
121.RE 0
122
123.P
124Dependency types to omit from the installation tree on disk.
125.P
126Note that these dependencies \fIare\fR still resolved and added to the \fBpackage-lock.json\fR or \fBnpm-shrinkwrap.json\fR file. They are just not physically installed on disk.
127.P
128If a package type appears in both the \fB--include\fR and \fB--omit\fR lists, then it will be included.
129.P
130If the resulting omit list includes \fB'dev'\fR, then the \fBNODE_ENV\fR environment variable will be set to \fB'production'\fR for all lifecycle scripts.
131.SS "\fBinclude\fR"
132.RS 0
133.IP \(bu 4
134Default:
135.IP \(bu 4
136Type: "prod", "dev", "optional", or "peer" (can be set multiple times)
137.RE 0
138
139.P
140Option that allows for defining which types of dependencies to install.
141.P
142This is the inverse of \fB--omit=<type>\fR.
143.P
144Dependency types specified in \fB--include\fR will not be omitted, regardless of the order in which omit/include are specified on the command-line.
145.SS "\fBlink\fR"
146.RS 0
147.IP \(bu 4
148Default: false
149.IP \(bu 4
150Type: Boolean
151.RE 0
152
153.P
154Used with \fBnpm ls\fR, limiting output to only those packages that are linked.
155.SS "\fBpackage-lock-only\fR"
156.RS 0
157.IP \(bu 4
158Default: false
159.IP \(bu 4
160Type: Boolean
161.RE 0
162
163.P
164If set to true, the current operation will only use the \fBpackage-lock.json\fR, ignoring \fBnode_modules\fR.
165.P
166For \fBupdate\fR this means only the \fBpackage-lock.json\fR will be updated, instead of checking \fBnode_modules\fR and downloading dependencies.
167.P
168For \fBlist\fR this means the output will be based on the tree described by the \fBpackage-lock.json\fR, rather than the contents of \fBnode_modules\fR.
169.SS "\fBunicode\fR"
170.RS 0
171.IP \(bu 4
172Default: false on windows, true on mac/unix systems with a unicode locale, as defined by the \fBLC_ALL\fR, \fBLC_CTYPE\fR, or \fBLANG\fR environment variables.
173.IP \(bu 4
174Type: Boolean
175.RE 0
176
177.P
178When set to true, npm uses unicode characters in the tree output. When false, it uses ascii characters instead of unicode glyphs.
179.SS "\fBworkspace\fR"
180.RS 0
181.IP \(bu 4
182Default:
183.IP \(bu 4
184Type: String (can be set multiple times)
185.RE 0
186
187.P
188Enable running a command in the context of the configured workspaces of the current project while filtering by running only the workspaces defined by this configuration option.
189.P
190Valid values for the \fBworkspace\fR config are either:
191.RS 0
192.IP \(bu 4
193Workspace names
194.IP \(bu 4
195Path to a workspace directory
196.IP \(bu 4
197Path to a parent workspace directory (will result in selecting all workspaces within that folder)
198.RE 0
199
200.P
201When set for the \fBnpm init\fR command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a brand new workspace within the project.
202.P
203This value is not exported to the environment for child processes.
204.SS "\fBworkspaces\fR"
205.RS 0
206.IP \(bu 4
207Default: null
208.IP \(bu 4
209Type: null or Boolean
210.RE 0
211
212.P
213Set to true to run the command in the context of \fBall\fR configured workspaces.
214.P
215Explicitly setting this to false will cause commands like \fBinstall\fR to ignore workspaces altogether. When not set explicitly:
216.RS 0
217.IP \(bu 4
218Commands that operate on the \fBnode_modules\fR tree (install, update, etc.) will link workspaces into the \fBnode_modules\fR folder. - Commands that do other things (test, exec, publish, etc.) will operate on the root project, \fIunless\fR one or more workspaces are specified in the \fBworkspace\fR config.
219.RE 0
220
221.P
222This value is not exported to the environment for child processes.
223.SS "\fBinclude-workspace-root\fR"
224.RS 0
225.IP \(bu 4
226Default: false
227.IP \(bu 4
228Type: Boolean
229.RE 0
230
231.P
232Include the workspace root when workspaces are enabled for a command.
233.P
234When false, specifying individual workspaces via the \fBworkspace\fR config, or all workspaces via the \fBworkspaces\fR flag, will cause npm to operate only on the specified workspaces, and not on the root project.
235.P
236This value is not exported to the environment for child processes.
237.SS "\fBinstall-links\fR"
238.RS 0
239.IP \(bu 4
240Default: false
241.IP \(bu 4
242Type: Boolean
243.RE 0
244
245.P
246When set file: protocol dependencies will be packed and installed as regular dependencies instead of creating a symlink. This option has no effect on workspaces.
247.SS "See Also"
248.RS 0
249.IP \(bu 4
250npm help "package spec"
251.IP \(bu 4
252npm help explain
253.IP \(bu 4
254npm help config
255.IP \(bu 4
256npm help npmrc
257.IP \(bu 4
258npm help folders
259.IP \(bu 4
260npm help explain
261.IP \(bu 4
262npm help install
263.IP \(bu 4
264npm help link
265.IP \(bu 4
266npm help prune
267.IP \(bu 4
268npm help outdated
269.IP \(bu 4
270npm help update
271.RE 0
272 
codekingpro/portable-devtools · Team Ai