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: release/v9
7 github_path: docs/lib/content/commands/npm-repo.md
8 redirect_from:
9 - /cli-documentation/v9/cli-commands/npm-repo
10 - /cli-documentation/v9/cli-commands/repo
11 - /cli-documentation/v9/commands/npm-repo
12 - /cli-documentation/v9/commands/repo
13 - /cli-documentation/v9/npm-repo
14 - /cli-documentation/v9/repo
15 - /cli/v9/cli-commands/npm-repo
16 - /cli/v9/cli-commands/repo
17 - /cli/v9/commands/repo
18 - /cli/v9/npm-repo
19 - /cli/v9/repo
20 ---
21
22 ### Synopsis
23
24 ```bash
25 npm repo [<pkgname> [<pkgname> ...]]
26 ```
27
28 ### Description
29
30 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/v9/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.
31
32 ### Configuration
33
34 #### `browser`
35
36 - Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"`
37 - Type: null, Boolean, or String
38
39 The browser that is called by npm commands to open websites.
40
41 Set to `false` to suppress browser behavior and instead print urls to terminal.
42
43 Set to `true` to use default system URL opener.
44
45 #### `registry`
46
47 - Default: "https://registry.npmjs.org/"
48 - Type: URL
49
50 The base URL of the npm registry.
51
52 #### `workspace`
53
54 - Default:
55 - Type: String (can be set multiple times)
56
57 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.
58
59 Valid values for the `workspace` config are either:
60
61 - Workspace names
62 - Path to a workspace directory
63 - Path to a parent workspace directory (will result in selecting all workspaces within that folder)
64
65 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.
66
67 This value is not exported to the environment for child processes.
68
69 #### `workspaces`
70
71 - Default: null
72 - Type: null or Boolean
73
74 Set to true to run the command in the context of **all** configured workspaces.
75
76 Explicitly setting this to false will cause commands like `install` to ignore workspaces altogether. When not set explicitly:
77
78 - 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.
79
80 This value is not exported to the environment for child processes.
81
82 #### `include-workspace-root`
83
84 - Default: false
85 - Type: Boolean
86
87 Include the workspace root when workspaces are enabled for a command.
88
89 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.
90
91 This value is not exported to the environment for child processes.
92
93 ### See Also
94
95 - [npm docs](/cli/v9/commands/npm-docs)
96 - [npm config](/cli/v9/commands/npm-config)