1---
2title: npm-docs
3section: 1
4description: Open documentation for a package in a web browser
5---
6
7### Synopsis
8
9```bash
10npm docs [<pkgname> [<pkgname> ...]]
11
12alias: home
13```
14
15### Description
16
17This command tries to guess at the likely location of a package's
18documentation URL, and then tries to open it using the
19[`--browser` config](/using-npm/config#browser) param. You can pass multiple
20package names at once. If no package name is provided, it will search for a
21`package.json` in the current folder and use the `name` property.
22
23### Configuration
24
25#### `browser`
26
27* Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"`
28* Type: null, Boolean, or String
29
30The browser that is called by npm commands to open websites.
31
32Set to `false` to suppress browser behavior and instead print urls to
33terminal.
34
35Set to `true` to use default system URL opener.
36
37
38
39#### `registry`
40
41* Default: "https://registry.npmjs.org/"
42* Type: URL
43
44The base URL of the npm registry.
45
46
47
48#### `workspace`
49
50* Default:
51* Type: String (can be set multiple times)
52
53Enable running a command in the context of the configured workspaces of the
54current project while filtering by running only the workspaces defined by
55this configuration option.
56
57Valid values for the `workspace` config are either:
58
59* Workspace names
60* Path to a workspace directory
61* Path to a parent workspace directory (will result in selecting all
62  workspaces within that folder)
63
64When set for the `npm init` command, this may be set to the folder of a
65workspace which does not yet exist, to create the folder and set it up as a
66brand new workspace within the project.
67
68This value is not exported to the environment for child processes.
69
70#### `workspaces`
71
72* Default: null
73* Type: null or Boolean
74
75Set to true to run the command in the context of **all** configured
76workspaces.
77
78Explicitly setting this to false will cause commands like `install` to
79ignore workspaces altogether. When not set explicitly:
80
81- Commands that operate on the `node_modules` tree (install, update, etc.)
82will link workspaces into the `node_modules` folder. - Commands that do
83other things (test, exec, publish, etc.) will operate on the root project,
84_unless_ one or more workspaces are specified in the `workspace` config.
85
86This value is not exported to the environment for child processes.
87
88#### `include-workspace-root`
89
90* Default: false
91* Type: Boolean
92
93Include the workspace root when workspaces are enabled for a command.
94
95When false, specifying individual workspaces via the `workspace` config, or
96all workspaces via the `workspaces` flag, will cause npm to operate only on
97the specified workspaces, and not on the root project.
98
99This value is not exported to the environment for child processes.
100
101### See Also
102
103* [npm view](/commands/npm-view)
104* [npm publish](/commands/npm-publish)
105* [npm registry](/using-npm/registry)
106* [npm config](/commands/npm-config)
107* [npmrc](/configuring-npm/npmrc)
108* [package.json](/configuring-npm/package-json)
109