2025-04-10 14:36:22 -07:00
.TH "NPM-ORG" "1" "April 2025" "NPM@11.3.0" ""
2019-01-29 14:43:00 -08:00
.SH "NAME"
2022-12-06 22:18:33 -05:00
\fB npm-org\fR - Manage orgs
.SS "Synopsis"
2019-01-29 14:43:00 -08:00
.P
.RS 2
.nf
2022-12-06 22:18:33 -05:00
npm org set orgname username \[ lB]developer | admin | owner\[ rB]
2022-02-24 21:41:49 +00:00
npm org rm orgname username
2022-12-06 22:18:33 -05:00
npm org ls orgname \[ lB]<username>\[ rB]
2022-02-24 21:41:49 +00:00
alias: ogr
2019-01-29 14:43:00 -08:00
.fi
.RE
2021-03-23 14:58:11 -04:00
.P
2022-12-06 22:18:33 -05:00
Note: This command is unaware of workspaces.
.SS "Example"
2019-01-29 14:43:00 -08:00
.P
Add a new developer to an org:
.P
.RS 2
.nf
2022-12-06 22:18:33 -05:00
$ npm org set my-org @mx-smith
2019-01-29 14:43:00 -08:00
.fi
.RE
.P
Add a new admin to an org (or change a developer to an admin):
.P
.RS 2
.nf
2022-12-06 22:18:33 -05:00
$ npm org set my-org @mx-santos admin
2019-01-29 14:43:00 -08:00
.fi
.RE
.P
Remove a user from an org:
.P
.RS 2
.nf
2022-12-06 22:18:33 -05:00
$ npm org rm my-org mx-santos
2019-01-29 14:43:00 -08:00
.fi
.RE
.P
List all users in an org:
.P
.RS 2
.nf
2022-12-06 22:18:33 -05:00
$ npm org ls my-org
2019-01-29 14:43:00 -08:00
.fi
.RE
.P
List all users in JSON format:
.P
.RS 2
.nf
2022-12-06 22:18:33 -05:00
$ npm org ls my-org --json
2019-01-29 14:43:00 -08:00
.fi
.RE
.P
See what role a user has in an org:
.P
.RS 2
.nf
2022-12-06 22:18:33 -05:00
$ npm org ls my-org @mx-santos
2019-01-29 14:43:00 -08:00
.fi
.RE
2022-12-06 22:18:33 -05:00
.SS "Description"
2019-01-29 14:43:00 -08:00
.P
2022-12-06 22:18:33 -05:00
You can use the \fB npm org\fR commands to manage and view users of an organization. It supports adding and removing users, changing their roles, listing them, and finding specific ones and their roles.
.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 "\fBjson\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: false
2022-12-06 22:18:33 -05:00
.IP \(bu 4
2021-05-20 15:54:50 -04:00
Type: Boolean
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
Whether or not to output JSON data, rather than the normal output.
2021-07-15 20:09:18 +00:00
.RS 0
2022-12-06 22:18:33 -05:00
.IP \(bu 4
In \fB npm pkg set\fR it enables parsing set values with JSON.parse() before saving them to your \fB package.json\fR .
.RE 0
2021-07-15 20:09:18 +00:00
2021-05-20 15:54:50 -04:00
.P
2022-12-06 22:18:33 -05:00
Not supported by all npm commands.
.SS "\fBparseable\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: false
2022-12-06 22:18:33 -05:00
.IP \(bu 4
2021-05-20 15:54:50 -04:00
Type: Boolean
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
Output parseable results from commands that write to standard output. For \fB npm search\fR , this will be tab-separated table format.
.SS "See Also"
2019-01-29 14:43:00 -08:00
.RS 0
2022-12-06 22:18:33 -05:00
.IP \(bu 4
2022-11-07 13:02:05 -05:00
npm help "using orgs"
2022-12-06 22:18:33 -05:00
.IP \(bu 4
\fB Documentation on npm Orgs\fR \fI \(la https://docs.npmjs.com/orgs/\(ra \fR
.RE 0