NPM-REPO(1)

πŸ’»βœ¨ NPM-REPO(1) βœ¨πŸ’»

okay so this is straight out of the npm manual, bestie β€” <bold>npm-repo</bold> is the page, and it's genuinely the easiest glow-up in the whole npm fam. no cap.


🌸 NAME 🌸

npm-repo β€” open a package's repository page in the browser πŸ¦‹


✨ SYNOPSIS ✨

npm repo [<pkgname> [<pkgname> ...]]

πŸ’– DESCRIPTION πŸ’–

okay so here's the tea: this command lowkey guesses where a package's repository URL probably lives, and then it tries to pop that bad boy open using the --browser config param (go peek at ⟨/using-npm/config#browser⟩ if you're nosy).

and if you don't hand it a package name? no stress β€” it goes looking for a package.json in whatever folder you're standing in, and uses the repository property from there. main character energy honestly. πŸŽ€


πŸ‘‘ CONFIGURATION πŸ‘‘

🧚 browser

  • Default: macOS: "open", Windows: "start", Others: "xdg-open"
  • Type: null, Boolean, or String

this is the browser that npm commands call when they need to open websites, periodt.

set it to false to suppress browser behavior entirely and instead print urls to the terminal (for the introverts among us πŸ’…).

set it to true to use the default system URL opener.

πŸ“ registry

the base URL of the npm registry. that's it, that's the whole vibe. ✨

🌈 workspace

  • Default: (empty)
  • Type: String (can be set multiple times)

this one lets you run a command in the context of the configured workspaces of the current project, while filtering so it only runs on the workspaces you actually named in this config option. iconic filtering behavior fr fr.

valid values for the workspace config are either:

  • Workspace names
  • Path to a workspace directory
  • Path to a parent workspace directory (will result in selecting all workspaces within that folder)

when it's set for the npm init 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. so it's giving manifesting 🫢

heads up bestie: this value is not exported to the environment for child processes.

πŸ’œ workspaces

  • Default: null
  • Type: null or Boolean

set it to true to run the command in the context of all configured workspaces. all of them. every last one. 😭

explicitly setting this to false will cause commands like install to ignore workspaces altogether. and when it's not set explicitly:

  • Commands that operate on the node_modules tree (install, update, etc.) will link workspaces into the node_modules folder.
  • Commands that do other things (test, exec, publish, etc.) will operate on the root project, unless one or more workspaces are specified in the workspace config.
again: this value is not exported to the environment for child processes.

⭐ include-workspace-root

  • Default: false
  • Type: Boolean

include the workspace root when workspaces are enabled for a command. simple as that. πŸŽ€

when false, specifying individual workspaces via the workspace config, or all workspaces via the workspaces flag, will cause npm to operate only on the specified workspaces, and not on the root project. so the root gets left on read, lowkey πŸ’€

one more time for the people in the back: this value is not exported to the environment for child processes.

πŸ”₯ SEE ALSO πŸ”₯

  • npm help docs
  • npm help config

and that's the whole page, bestie β€” go open some repos and slay πŸ’…βœ¨

with love from the npm manual, version NPM@12.2.1, dated October 2026 πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from