NPM-EXPLORE(1)

✨ NAME ✨

okay so this is npm-explore(1), aka the manual page for browsing an installed package, and it’s giving β€œlet me just peek inside node_modules real quick” energy πŸ’…βœ¨

🌸 Synopsis 🌸

npm explore <pkg> [ -- <command>]
⚠️ Note: This command is unaware of workspaces.

πŸ¦‹ Description πŸ¦‹

Bestie, what this does is spawn a subshell in the directory of the installed package you specified. Literally just drops you in there. 🫢

If you also give it a command, then that command is run in the subshell, and the subshell immediately terminates afterward. In and out, no lingering, no cap. πŸ’¨

This is particularly handy in the case of git submodules in the node_modules folder:

npm explore some-dependency -- git pull origin master
πŸ’€ Important: the package is not automatically rebuilt afterwards. So if you make any changes, be sure to use npm rebuild <pkg>. Do not skip this part, iykyk.

πŸŽ€ Configuration πŸŽ€

🐚 shell

  • shell β€” the shell to run for the npm explore command.
    • Default: SHELL environment variable, or "bash" on Posix, or "cmd.exe" on Windows
    • Type: String

πŸ‘‘ See Also πŸ‘‘

  • npm help folders
  • npm help edit
  • npm help rebuild
  • npm help install

πŸ’– That’s the whole page, bestie β€” brought to you by NPM@12.2.1, October 2026. Now go explore (responsibly) 🌈✨

πŸ“¦ where this page comes from