1 npm-publish(1) -- Publish a package
2 ===================================
7 npm publish <tarball> [--tag <tag>] [--access <public|restricted>]
8 npm publish <folder> [--tag <tag>] [--access <public|restricted>]
12 Publishes a package to the registry so that it can be installed by name. All
13 files in the package directory are included if no local `.gitignore` or
14 `.npmignore` file is present. See `npm-developers(7)` for full details on
15 what's included in the published package, as well as details on how the package
18 By default npm will publish to the public registry. This can be overridden by
19 specifying a different default registry or using a `npm-scope(7)` in the name
20 (see `package.json(5)`).
23 A folder containing a package.json file
26 A url or file path to a gzipped tar archive containing a single folder
27 with a package.json file inside.
30 Registers the published package with the given tag, such that `npm install
31 <name>@<tag>` will install this version. By default, `npm publish` updates
32 and `npm install` installs the `latest` tag. See `npm-dist-tag(1)` for
35 * `[--access <public|restricted>]`
36 Tells the registry whether this package should be published as public or
37 restricted. Only applies to scoped packages, which default to `restricted`.
38 If you don't have a paid account, you must publish with `--access public`
39 to publish scoped packages.
41 Fails if the package name and version combination already exists in
42 the specified registry.
44 Once a package is published with a given name and version, that
45 specific name and version combination can never be used again, even if
46 it is removed with npm-unpublish(1).