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