1NPM-TEAM(1)                                                        NPM-TEAM(1)
2
3
4

NAME

6       npm-team - Manage organization teams and team memberships
7
8   Synopsis
9         npm team create <scope:team> [--otp <otpcode>]
10         npm team destroy <scope:team> [--otp <otpcode>]
11         npm team add <scope:team> <user> [--otp <otpcode>]
12         npm team rm <scope:team> <user> [--otp <otpcode>]
13         npm team ls <scope>|<scope:team>
14
15       Note: This command is unaware of workspaces.
16
17   Description
18       Used  to  manage  teams  in organizations, and change team memberships.
19       Does not handle permissions for packages.
20
21       Teams must always be fully qualified with the  organization/scope  they
22       belong to when operating on them, separated by a colon (:). That is, if
23       you have a newteam team in an org organization, you must  always  refer
24       to that team as @org:newteam in these commands.
25
26       If  you have two-factor authentication enabled in auth-and-writes mode,
27       then you can provide a code from your authenticator with  [--otp  <otp‐
28       code>]. If you don't include this then you will be taken through a sec‐
29       ond factor flow based on your authtype.
30
31       •   create / destroy: Create a new team, or destroy  an  existing  one.
32           Note:   You   cannot   remove  the  developers  team,  learn  more.
33           https://docs.npmjs.com/about-developers-team
34
35       Here's how to create a new team newteam under the org org:
36
37         npm team create @org:newteam
38
39       You should see a confirming message such as: +@org:newteam once the new
40       team has been created.
41
42       •   add: Add a user to an existing team.
43
44       Adding a new user username to a team named newteam under the org org:
45
46         npm team add @org:newteam username
47
48       On success, you should see a message: username added to @org:newteam
49
50       •   rm:  Using  npm  team rm you can also remove users from a team they
51           belong to.
52
53       Here's an example removing user username from newteam team in org orga‐
54       nization:
55
56         npm team rm @org:newteam username
57
58       Once  the user is removed a confirmation message is displayed: username
59       removed from @org:newteam
60
61       •   ls: If performed on an organization name, will return a list of ex‐
62           isting  teams  under  that organization. If performed on a team, it
63           will instead return a list of all users belonging to that  particu‐
64           lar team.
65
66       Here's an example of how to list all teams from an org named org:
67
68         npm team ls @org
69
70       Example listing all members of a team named newteam:
71
72         npm team ls @org:newteam
73
74
75   Details
76       npm team always operates directly on the current registry, configurable
77       from the command line using --registry=<registry url>.
78
79       You must be a team admin to create teams and  manage  team  membership,
80       under the given organization. Listing teams and team memberships may be
81       done by any member of the organization.
82
83       Organization creation and management of team  admins  and  organization
84       members is done through the website, not the npm CLI.
85
86       To  use teams to manage permissions on packages belonging to your orga‐
87       nization, use the npm access command to grant or revoke the appropriate
88       permissions.
89
90   Configuration
91   registry
92       •   Default: "https://registry.npmjs.org/"
93
94       •   Type: URL
95
96
97       The base URL of the npm registry.
98
99   otp
100       •   Default: null
101
102       •   Type: null or String
103
104
105       This  is  a  one-time  password  from  a two-factor authenticator. It's
106       needed when publishing or changing package permissions with npm access.
107
108       If not set, and a registry response fails with a challenge for  a  one-
109       time password, npm will prompt on the command line for one.
110
111   parseable
112       •   Default: false
113
114       •   Type: Boolean
115
116
117       Output  parseable  results from commands that write to standard output.
118       For npm search, this will be tab-separated table format.
119
120   json
121       •   Default: false
122
123       •   Type: Boolean
124
125
126       Whether or not to output JSON data, rather than the normal output.
127
128       •   In npm pkg set it enables parsing set values with JSON.parse()  be‐
129           fore saving them to your package.json.
130
131
132       Not supported by all npm commands.
133
134   See Also
135       •   npm help access
136
137       •   npm help config
138
139       •   npm help registry
140
141
142
143                                 November 2023                     NPM-TEAM(1)
Impressum