1 ---
2 title: npm-repo
3 section: 1
4 description: Open package repository page in the browser
5 github_repo: npm/cli
6 github_branch: latest
7 github_path: docs/lib/content/commands/npm-repo.md
8 redirect_from:
9 - /cli-commands/npm-repo
10 - /cli-commands/repo
11 - /cli-documentation/cli-commands/npm-repo
12 - /cli-documentation/cli-commands/repo
13 - /cli-documentation/commands/npm-repo
14 - /cli-documentation/commands/repo
15 - /cli-documentation/npm-repo
16 - /cli-documentation/repo
17 - /cli-documentation/v11/cli-commands/npm-repo
18 - /cli-documentation/v11/cli-commands/repo
19 - /cli-documentation/v11/commands/npm-repo
20 - /cli-documentation/v11/commands/repo
21 - /cli-documentation/v11/npm-repo
22 - /cli-documentation/v11/repo
23 - /cli/cli-commands/npm-repo
24 - /cli/cli-commands/repo
25 - /cli/commands/npm-repo
26 - /cli/commands/repo
27 - /cli/npm-repo
28 - /cli/repo
29 - /cli/v11/cli-commands/npm-repo
30 - /cli/v11/cli-commands/repo
31 - /cli/v11/commands/repo
32 - /cli/v11/npm-repo
33 - /cli/v11/repo
34 - /commands/npm-repo
35 - /commands/repo
36 ---
37
38 ### Synopsis
39
40 ```bash
41 npm repo [<pkgname> [<pkgname> ...]]
42 ```
43
44 ### Description
45
46 This command tries to guess at the likely location of a package's repository URL, and then tries to open it using the [`--browser` config](/cli/v11/using-npm/config#browser) param. If no package name is provided, it will search for a `package.json` in the current folder and use the `repository` property.
47
48 ### Configuration
49
50 #### `browser`
51
52 - Default: macOS: `"open"`, Windows: `"start"`, Others: `"xdg-open"`
53 - Type: null, Boolean, or String
54
55 The browser that is called by npm commands to open websites.
56
57 Set to `false` to suppress browser behavior and instead print urls to terminal.
58
59 Set to `true` to use default system URL opener.
60
61 #### `registry`
62
63 - Default: "https://registry.npmjs.org/"
64 - Type: URL
65
66 The base URL of the npm registry.
67
68 #### `workspace`
69
70 - Default:
71 - Type: String (can be set multiple times)
72
73 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.
74
75 Valid values for the `workspace` config are either:
76
77 - Workspace names
78 - Path to a workspace directory
79 - Path to a parent workspace directory (will result in selecting all workspaces within that folder)
80
81 When 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.
82
83 This value is not exported to the environment for child processes.
84
85 #### `workspaces`
86
87 - Default: null
88 - Type: null or Boolean
89
90 Set to true to run the command in the context of **all** configured workspaces.
91
92 Explicitly setting this to false will cause commands like `install` to ignore workspaces altogether. When not set explicitly:
93
94 - 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.
95
96 This value is not exported to the environment for child processes.
97
98 #### `include-workspace-root`
99
100 - Default: false
101 - Type: Boolean
102
103 Include the workspace root when workspaces are enabled for a command.
104
105 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.
106
107 This value is not exported to the environment for child processes.
108
109 ### See Also
110
111 - [npm docs](/cli/v11/commands/npm-docs)
112 - [npm config](/cli/v11/commands/npm-config)