npm-repo.1 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. .TH "NPM-REPO" "1" "March 2026" "NPM@11.12.0" ""
  2. .SH "NAME"
  3. \fBnpm-repo\fR - Open package repository page in the browser
  4. .SS "Synopsis"
  5. .P
  6. .RS 2
  7. .nf
  8. npm repo \[lB]<pkgname> \[lB]<pkgname> ...\[rB]\[rB]
  9. .fi
  10. .RE
  11. .SS "Description"
  12. .P
  13. This command tries to guess at the likely location of a package's repository URL, and then tries to open it using the \fB\[rs]fB--browser\[rs]fR config\fR \fI\(la/using-npm/config#browser\(ra\fR param. If no package name is provided, it will search for a \fBpackage.json\fR in the current folder and use the \fBrepository\fR property.
  14. .SS "Configuration"
  15. .SS "\fBbrowser\fR"
  16. .RS 0
  17. .IP \(bu 4
  18. Default: macOS: \fB"open"\fR, Windows: \fB"start"\fR, Others: \fB"xdg-open"\fR
  19. .IP \(bu 4
  20. Type: null, Boolean, or String
  21. .RE 0
  22. .P
  23. The browser that is called by npm commands to open websites.
  24. .P
  25. Set to \fBfalse\fR to suppress browser behavior and instead print urls to terminal.
  26. .P
  27. Set to \fBtrue\fR to use default system URL opener.
  28. .SS "\fBregistry\fR"
  29. .RS 0
  30. .IP \(bu 4
  31. Default: "https://registry.npmjs.org/"
  32. .IP \(bu 4
  33. Type: URL
  34. .RE 0
  35. .P
  36. The base URL of the npm registry.
  37. .SS "\fBworkspace\fR"
  38. .RS 0
  39. .IP \(bu 4
  40. Default:
  41. .IP \(bu 4
  42. Type: String (can be set multiple times)
  43. .RE 0
  44. .P
  45. Enable running a command in the context of the configured workspaces of the current project while filtering by running only the workspaces defined by this configuration option.
  46. .P
  47. Valid values for the \fBworkspace\fR config are either:
  48. .RS 0
  49. .IP \(bu 4
  50. Workspace names
  51. .IP \(bu 4
  52. Path to a workspace directory
  53. .IP \(bu 4
  54. Path to a parent workspace directory (will result in selecting all workspaces within that folder)
  55. .RE 0
  56. .P
  57. When set for the \fBnpm init\fR 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.
  58. .P
  59. This value is not exported to the environment for child processes.
  60. .SS "\fBworkspaces\fR"
  61. .RS 0
  62. .IP \(bu 4
  63. Default: null
  64. .IP \(bu 4
  65. Type: null or Boolean
  66. .RE 0
  67. .P
  68. Set to true to run the command in the context of \fBall\fR configured workspaces.
  69. .P
  70. Explicitly setting this to false will cause commands like \fBinstall\fR to ignore workspaces altogether. When not set explicitly:
  71. .RS 0
  72. .IP \(bu 4
  73. Commands that operate on the \fBnode_modules\fR tree (install, update, etc.) will link workspaces into the \fBnode_modules\fR folder. - Commands that do other things (test, exec, publish, etc.) will operate on the root project, \fIunless\fR one or more workspaces are specified in the \fBworkspace\fR config.
  74. .RE 0
  75. .P
  76. This value is not exported to the environment for child processes.
  77. .SS "\fBinclude-workspace-root\fR"
  78. .RS 0
  79. .IP \(bu 4
  80. Default: false
  81. .IP \(bu 4
  82. Type: Boolean
  83. .RE 0
  84. .P
  85. Include the workspace root when workspaces are enabled for a command.
  86. .P
  87. When false, specifying individual workspaces via the \fBworkspace\fR config, or all workspaces via the \fBworkspaces\fR flag, will cause npm to operate only on the specified workspaces, and not on the root project.
  88. .P
  89. This value is not exported to the environment for child processes.
  90. .SS "See Also"
  91. .RS 0
  92. .IP \(bu 4
  93. npm help docs
  94. .IP \(bu 4
  95. npm help config
  96. .RE 0