1NPM-TEAM(1) NPM-TEAM(1)
2
3
4
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 prompted.
29
30 • create / destroy: Create a new team, or destroy an existing one.
31 Note: You cannot remove the developers team, <a
32 href="https://docs.npmjs.com/about-developers-team" tar‐
33 get="_blank">learn more.</a> Here's how to create a new team newteam
34 under the org org:
35
36 npm team create @org:newteam
37 You should see a confirming message such as: +@org:newteam once the new
38 team has been created.
39
40 • add: Add a user to an existing team. Adding a new user username to a
41 team named newteam under the org org:
42
43 npm team add @org:newteam username
44 On success, you should see a message: username added to @org:newteam
45
46 • rm: Using npm team rm you can also remove users from a team they be‐
47 long to. Here's an example removing user username from newteam team
48 in org organization:
49
50 npm team rm @org:newteam username
51 Once the user is removed a confirmation message is displayed: username
52 removed from @org:newteam
53
54 • ls: If performed on an organization name, will return a list of ex‐
55 isting teams under that organization. If performed on a team, it will
56 instead return a list of all users belonging to that particular team.
57 Here's an example of how to list all teams from an org named org:
58
59 npm team ls @org
60 Example listing all members of a team named newteam:
61
62 npm team ls @org:newteam
63
64
65 Details
66 npm team always operates directly on the current registry, configurable
67 from the command line using --registry=<registry url>.
68
69 You must be a team admin to create teams and manage team membership,
70 under the given organization. Listing teams and team memberships may be
71 done by any member of the organization.
72
73 Organization creation and management of team admins and organization
74 members is done through the website, not the npm CLI.
75
76 To use teams to manage permissions on packages belonging to your orga‐
77 nization, use the npm access command to grant or revoke the appropriate
78 permissions.
79
80 Configuration
81 registry
82 • Default: "https://registry.npmjs.org/"
83
84 • Type: URL
85
86
87 The base URL of the npm registry.
88
89 otp
90 • Default: null
91
92 • Type: null or String
93
94
95 This is a one-time password from a two-factor authenticator. It's
96 needed when publishing or changing package permissions with npm access.
97
98 If not set, and a registry response fails with a challenge for a
99 one-time password, npm will prompt on the command line for one.
100
101 parseable
102 • Default: false
103
104 • Type: Boolean
105
106
107 Output parseable results from commands that write to standard output.
108 For npm search, this will be tab-separated table format.
109
110 json
111 • Default: false
112
113 • Type: Boolean
114
115
116 Whether or not to output JSON data, rather than the normal output.
117
118 • In npm pkg set it enables parsing set values with JSON.parse() before
119 saving them to your package.json.
120
121
122 Not supported by all npm commands.
123
124 See Also
125 • npm help access
126
127 • npm help config
128
129 • npm help registry
130
131
132
133
134 September 2022 NPM-TEAM(1)