1 ---
2 title: npm-explore
3 section: 1
4 description: Browse an installed package
5 github_repo: npm/cli
6 github_branch: latest
7 github_path: docs/lib/content/commands/npm-explore.md
8 redirect_from:
9 - /cli-commands/explore
10 - /cli-commands/npm-explore
11 - /cli-documentation/cli-commands/explore
12 - /cli-documentation/cli-commands/npm-explore
13 - /cli-documentation/commands/explore
14 - /cli-documentation/commands/npm-explore
15 - /cli-documentation/explore
16 - /cli-documentation/npm-explore
17 - /cli-documentation/v11/cli-commands/explore
18 - /cli-documentation/v11/cli-commands/npm-explore
19 - /cli-documentation/v11/commands/explore
20 - /cli-documentation/v11/commands/npm-explore
21 - /cli-documentation/v11/explore
22 - /cli-documentation/v11/npm-explore
23 - /cli/cli-commands/explore
24 - /cli/cli-commands/npm-explore
25 - /cli/commands/explore
26 - /cli/commands/npm-explore
27 - /cli/explore
28 - /cli/npm-explore
29 - /cli/v11/cli-commands/explore
30 - /cli/v11/cli-commands/npm-explore
31 - /cli/v11/commands/explore
32 - /cli/v11/explore
33 - /cli/v11/npm-explore
34 - /commands/explore
35 - /commands/npm-explore
36 ---
37
38 ### Synopsis
39
40 ```bash
41 npm explore <pkg> [ -- <command>]
42 ```
43
44 Note: This command is unaware of workspaces.
45
46 ### Description
47
48 Spawn a subshell in the directory of the installed package specified.
49
50 If a command is specified, then it is run in the subshell, which then immediately terminates.
51
52 This is particularly handy in the case of git submodules in the `node_modules` folder:
53
54 ```bash
55 npm explore some-dependency -- git pull origin master
56 ```
57
58 Note that the package is _not_ automatically rebuilt afterwards, so be sure to use `npm rebuild <pkg>` if you make any changes.
59
60 ### Configuration
61
62 #### `shell`
63
64 - Default: SHELL environment variable, or "bash" on Posix, or "cmd.exe" on Windows
65 - Type: String
66
67 The shell to run for the `npm explore` command.
68
69 ### See Also
70
71 - [npm folders](/cli/v11/configuring-npm/folders)
72 - [npm edit](/cli/v11/commands/npm-edit)
73 - [npm rebuild](/cli/v11/commands/npm-rebuild)
74 - [npm install](/cli/v11/commands/npm-install)