codekingpro/portable-devtools
114k
1.TH "NPM-EXPLORE" "1" "April 2026" "NPM@11.13.0" ""
2.SH "NAME"
3\fBnpm-explore\fR - Browse an installed package
4.SS "Synopsis"
5.P
6.RS 2
7.nf
8npm explore <pkg> \[lB] -- <command>\[rB]
9.fi
10.RE
11.P
12Note: This command is unaware of workspaces.
13.SS "Description"
14.P
15Spawn a subshell in the directory of the installed package specified.
16.P
17If a command is specified, then it is run in the subshell, which then immediately terminates.
18.P
19This is particularly handy in the case of git submodules in the \fBnode_modules\fR folder:
20.P
21.RS 2
22.nf
23npm explore some-dependency -- git pull origin master
24.fi
25.RE
26.P
27Note that the package is \fInot\fR automatically rebuilt afterwards, so be sure to use \fBnpm rebuild <pkg>\fR if you make any changes.
28.SS "Configuration"
29.SS "\fBshell\fR"
30.RS 0
31.IP \(bu 4
32Default: SHELL environment variable, or "bash" on Posix, or "cmd.exe" on Windows
33.IP \(bu 4
34Type: String
35.RE 0
36
37.P
38The shell to run for the \fBnpm explore\fR command.
39.SS "See Also"
40.RS 0
41.IP \(bu 4
42npm help folders
43.IP \(bu 4
44npm help edit
45.IP \(bu 4
46npm help rebuild
47.IP \(bu 4
48npm help install
49.RE 0
50 