11cb0ef41Sopenharmony_ci--- 21cb0ef41Sopenharmony_cititle: npm-repo 31cb0ef41Sopenharmony_cisection: 1 41cb0ef41Sopenharmony_cidescription: Open package repository page in the browser 51cb0ef41Sopenharmony_ci--- 61cb0ef41Sopenharmony_ci 71cb0ef41Sopenharmony_ci### Synopsis 81cb0ef41Sopenharmony_ci 91cb0ef41Sopenharmony_ci```bash 101cb0ef41Sopenharmony_cinpm repo [<pkgname> [<pkgname> ...]] 111cb0ef41Sopenharmony_ci``` 121cb0ef41Sopenharmony_ci 131cb0ef41Sopenharmony_ci### Description 141cb0ef41Sopenharmony_ci 151cb0ef41Sopenharmony_ciThis command tries to guess at the likely location of a package's 161cb0ef41Sopenharmony_cirepository URL, and then tries to open it using the 171cb0ef41Sopenharmony_ci[`--browser` config](/using-npm/config#browser) param. If no package name is 181cb0ef41Sopenharmony_ciprovided, it will search for a `package.json` in the current folder and use the 191cb0ef41Sopenharmony_ci`repository` property. 201cb0ef41Sopenharmony_ci 211cb0ef41Sopenharmony_ci### Configuration 221cb0ef41Sopenharmony_ci 231cb0ef41Sopenharmony_ci#### `browser` 241cb0ef41Sopenharmony_ci 251cb0ef41Sopenharmony_ci* Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"` 261cb0ef41Sopenharmony_ci* Type: null, Boolean, or String 271cb0ef41Sopenharmony_ci 281cb0ef41Sopenharmony_ciThe browser that is called by npm commands to open websites. 291cb0ef41Sopenharmony_ci 301cb0ef41Sopenharmony_ciSet to `false` to suppress browser behavior and instead print urls to 311cb0ef41Sopenharmony_citerminal. 321cb0ef41Sopenharmony_ci 331cb0ef41Sopenharmony_ciSet to `true` to use default system URL opener. 341cb0ef41Sopenharmony_ci 351cb0ef41Sopenharmony_ci 361cb0ef41Sopenharmony_ci 371cb0ef41Sopenharmony_ci#### `registry` 381cb0ef41Sopenharmony_ci 391cb0ef41Sopenharmony_ci* Default: "https://registry.npmjs.org/" 401cb0ef41Sopenharmony_ci* Type: URL 411cb0ef41Sopenharmony_ci 421cb0ef41Sopenharmony_ciThe base URL of the npm registry. 431cb0ef41Sopenharmony_ci 441cb0ef41Sopenharmony_ci 451cb0ef41Sopenharmony_ci 461cb0ef41Sopenharmony_ci#### `workspace` 471cb0ef41Sopenharmony_ci 481cb0ef41Sopenharmony_ci* Default: 491cb0ef41Sopenharmony_ci* Type: String (can be set multiple times) 501cb0ef41Sopenharmony_ci 511cb0ef41Sopenharmony_ciEnable running a command in the context of the configured workspaces of the 521cb0ef41Sopenharmony_cicurrent project while filtering by running only the workspaces defined by 531cb0ef41Sopenharmony_cithis configuration option. 541cb0ef41Sopenharmony_ci 551cb0ef41Sopenharmony_ciValid values for the `workspace` config are either: 561cb0ef41Sopenharmony_ci 571cb0ef41Sopenharmony_ci* Workspace names 581cb0ef41Sopenharmony_ci* Path to a workspace directory 591cb0ef41Sopenharmony_ci* Path to a parent workspace directory (will result in selecting all 601cb0ef41Sopenharmony_ci workspaces within that folder) 611cb0ef41Sopenharmony_ci 621cb0ef41Sopenharmony_ciWhen set for the `npm init` command, this may be set to the folder of a 631cb0ef41Sopenharmony_ciworkspace which does not yet exist, to create the folder and set it up as a 641cb0ef41Sopenharmony_cibrand new workspace within the project. 651cb0ef41Sopenharmony_ci 661cb0ef41Sopenharmony_ciThis value is not exported to the environment for child processes. 671cb0ef41Sopenharmony_ci 681cb0ef41Sopenharmony_ci#### `workspaces` 691cb0ef41Sopenharmony_ci 701cb0ef41Sopenharmony_ci* Default: null 711cb0ef41Sopenharmony_ci* Type: null or Boolean 721cb0ef41Sopenharmony_ci 731cb0ef41Sopenharmony_ciSet to true to run the command in the context of **all** configured 741cb0ef41Sopenharmony_ciworkspaces. 751cb0ef41Sopenharmony_ci 761cb0ef41Sopenharmony_ciExplicitly setting this to false will cause commands like `install` to 771cb0ef41Sopenharmony_ciignore workspaces altogether. When not set explicitly: 781cb0ef41Sopenharmony_ci 791cb0ef41Sopenharmony_ci- Commands that operate on the `node_modules` tree (install, update, etc.) 801cb0ef41Sopenharmony_ciwill link workspaces into the `node_modules` folder. - Commands that do 811cb0ef41Sopenharmony_ciother things (test, exec, publish, etc.) will operate on the root project, 821cb0ef41Sopenharmony_ci_unless_ one or more workspaces are specified in the `workspace` config. 831cb0ef41Sopenharmony_ci 841cb0ef41Sopenharmony_ciThis value is not exported to the environment for child processes. 851cb0ef41Sopenharmony_ci 861cb0ef41Sopenharmony_ci#### `include-workspace-root` 871cb0ef41Sopenharmony_ci 881cb0ef41Sopenharmony_ci* Default: false 891cb0ef41Sopenharmony_ci* Type: Boolean 901cb0ef41Sopenharmony_ci 911cb0ef41Sopenharmony_ciInclude the workspace root when workspaces are enabled for a command. 921cb0ef41Sopenharmony_ci 931cb0ef41Sopenharmony_ciWhen false, specifying individual workspaces via the `workspace` config, or 941cb0ef41Sopenharmony_ciall workspaces via the `workspaces` flag, will cause npm to operate only on 951cb0ef41Sopenharmony_cithe specified workspaces, and not on the root project. 961cb0ef41Sopenharmony_ci 971cb0ef41Sopenharmony_ciThis value is not exported to the environment for child processes. 981cb0ef41Sopenharmony_ci 991cb0ef41Sopenharmony_ci### See Also 1001cb0ef41Sopenharmony_ci 1011cb0ef41Sopenharmony_ci* [npm docs](/commands/npm-docs) 1021cb0ef41Sopenharmony_ci* [npm config](/commands/npm-config) 103