2025-04-10 14:36:22 -07:00
.TH "NPM-OWNER" "1" "April 2025" "NPM@11.3.0" ""
2011-11-26 09:21:03 -08:00
.SH "NAME"
2022-12-06 22:18:33 -05:00
\fB npm-owner\fR - Manage package owners
.SS "Synopsis"
2014-09-24 14:41:07 -07:00
.P
.RS 2
2014-11-04 15:08:12 -08:00
.nf
2022-12-06 22:18:33 -05:00
npm owner add <user> <package-spec>
npm owner rm <user> <package-spec>
npm owner ls <package-spec>
2016-03-29 23:30:51 -07:00
2022-02-24 21:41:49 +00:00
alias: author
2014-11-04 15:08:12 -08:00
.fi
2014-09-24 14:41:07 -07:00
.RE
2022-12-06 22:18:33 -05:00
.SS "Description"
2014-09-24 14:41:07 -07:00
.P
2022-12-06 22:18:33 -05:00
Manage ownership of published packages.
2014-09-24 14:41:07 -07:00
.RS 0
2022-12-06 22:18:33 -05:00
.IP \(bu 4
ls: List all the users who have access to modify a package and push new versions. Handy when you need to know who to bug for help.
.IP \(bu 4
add: Add a new user as a maintainer of a package. This user is enabled to modify metadata, publish new versions, and add other owners.
.IP \(bu 4
rm: Remove a user from the package owner list. This immediately revokes their privileges.
.RE 0
2014-09-24 14:41:07 -07:00
2011-11-26 09:21:03 -08:00
.P
2022-12-06 22:18:33 -05:00
Note that there is only one level of access. Either you can modify a package, or you can't. Future versions may contain more fine-grained access levels, but that is not implemented at this time.
2017-10-26 22:35:25 -04:00
.P
2023-02-18 17:09:39 -05:00
If you have two-factor authentication enabled with \fB auth-and-writes\fR (see npm help npm-profile) then you'll need to go through a second factor flow when changing ownership or include an otp on the command line with \fB --otp\fR .
2022-12-06 22:18:33 -05:00
.SS "Configuration"
.SS "\fBregistry\fR"
2021-05-20 15:54:50 -04:00
.RS 0
2022-12-06 22:18:33 -05:00
.IP \(bu 4
Default: "https://registry.npmjs.org/"
.IP \(bu 4
2021-05-20 15:54:50 -04:00
Type: URL
2022-12-06 22:18:33 -05:00
.RE 0
2021-05-20 15:54:50 -04:00
.P
2022-12-06 22:18:33 -05:00
The base URL of the npm registry.
.SS "\fBotp\fR"
2021-05-20 15:54:50 -04:00
.RS 0
2022-12-06 22:18:33 -05:00
.IP \(bu 4
2021-05-20 15:54:50 -04:00
Default: null
2022-12-06 22:18:33 -05:00
.IP \(bu 4
2021-05-20 15:54:50 -04:00
Type: null or String
2022-12-06 22:18:33 -05:00
.RE 0
2021-05-20 15:54:50 -04:00
.P
2022-12-06 22:18:33 -05:00
This is a one-time password from a two-factor authenticator. It's needed when publishing or changing package permissions with \fB npm access\fR .
2021-05-20 15:54:50 -04:00
.P
2022-12-06 22:18:33 -05:00
If not set, and a registry response fails with a challenge for a one-time password, npm will prompt on the command line for one.
.SS "\fBworkspace\fR"
2022-05-05 15:25:34 +05:30
.RS 0
2022-12-06 22:18:33 -05:00
.IP \(bu 4
2022-05-05 15:25:34 +05:30
Default:
2022-12-06 22:18:33 -05:00
.IP \(bu 4
2022-05-05 15:25:34 +05:30
Type: String (can be set multiple times)
2022-12-06 22:18:33 -05:00
.RE 0
2022-05-05 15:25:34 +05:30
.P
2022-12-06 22:18:33 -05:00
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.
2022-05-05 15:25:34 +05:30
.P
2022-12-06 22:18:33 -05:00
Valid values for the \fB workspace\fR config are either:
2022-05-05 15:25:34 +05:30
.RS 0
2022-12-06 22:18:33 -05:00
.IP \(bu 4
2022-05-05 15:25:34 +05:30
Workspace names
2022-12-06 22:18:33 -05:00
.IP \(bu 4
2022-05-05 15:25:34 +05:30
Path to a workspace directory
2022-12-06 22:18:33 -05:00
.IP \(bu 4
Path to a parent workspace directory (will result in selecting all workspaces within that folder)
.RE 0
2022-05-05 15:25:34 +05:30
.P
2022-12-06 22:18:33 -05:00
When set for the \fB npm init\fR 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.
2022-05-05 15:25:34 +05:30
.P
2022-12-06 22:18:33 -05:00
This value is not exported to the environment for child processes.
.SS "\fBworkspaces\fR"
2022-05-05 15:25:34 +05:30
.RS 0
2022-12-06 22:18:33 -05:00
.IP \(bu 4
2022-05-05 15:25:34 +05:30
Default: null
2022-12-06 22:18:33 -05:00
.IP \(bu 4
2022-05-05 15:25:34 +05:30
Type: null or Boolean
2022-12-06 22:18:33 -05:00
.RE 0
2022-05-05 15:25:34 +05:30
.P
2022-12-06 22:18:33 -05:00
Set to true to run the command in the context of \fB all\fR configured workspaces.
2022-05-05 15:25:34 +05:30
.P
2022-12-06 22:18:33 -05:00
Explicitly setting this to false will cause commands like \fB install\fR to ignore workspaces altogether. When not set explicitly:
2022-05-05 15:25:34 +05:30
.RS 0
2022-12-06 22:18:33 -05:00
.IP \(bu 4
Commands that operate on the \fB node_modules\fR tree (install, update, etc.) will link workspaces into the \fB node_modules\fR folder. - Commands that do other things (test, exec, publish, etc.) will operate on the root project, \fI unless\fR one or more workspaces are specified in the \fB workspace\fR config.
.RE 0
2022-05-05 15:25:34 +05:30
.P
2022-12-06 22:18:33 -05:00
This value is not exported to the environment for child processes.
.SS "See Also"
2014-09-24 14:41:07 -07:00
.RS 0
2022-12-06 22:18:33 -05:00
.IP \(bu 4
2022-11-07 13:02:05 -05:00
npm help "package spec"
2022-12-06 22:18:33 -05:00
.IP \(bu 4
2020-12-11 18:54:56 -05:00
npm help profile
2022-12-06 22:18:33 -05:00
.IP \(bu 4
2019-11-18 21:01:39 +02:00
npm help publish
2022-12-06 22:18:33 -05:00
.IP \(bu 4
2019-11-05 14:55:08 -05:00
npm help registry
2022-12-06 22:18:33 -05:00
.IP \(bu 4
2019-11-18 21:01:39 +02:00
npm help adduser
2022-12-06 22:18:33 -05:00
.RE 0