You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: deps/npm/docs/content/commands/npm-team.md
+56-12
Original file line number
Diff line number
Diff line change
@@ -14,8 +14,6 @@ npm team add <scope:team> <user>
14
14
npm team rm <scope:team><user>
15
15
16
16
npm team ls <scope>|<scope:team>
17
-
18
-
npm team edit <scope:team>
19
17
```
20
18
21
19
### Description
@@ -24,31 +22,76 @@ Used to manage teams in organizations, and change team memberships. Does not
24
22
handle permissions for packages.
25
23
26
24
Teams must always be fully qualified with the organization/scope they belong to
27
-
when operating on them, separated by a colon (`:`). That is, if you have a `wombats` team in a `wisdom` organization, you must always refer to that team as `wisdom:wombats` in these commands.
25
+
when operating on them, separated by a colon (`:`). That is, if you have a
26
+
`newteam` team in an `org` organization, you must always refer to that team
27
+
as `@org:newteam` in these commands.
28
28
29
-
If you have two-factor authentication enabled in `auth-and-writes` mode, then you can provide a code from your authenticator with `[--otp <otpcode>]`. If you don't include this then you will be prompted.
29
+
If you have two-factor authentication enabled in `auth-and-writes` mode, then
30
+
you can provide a code from your authenticator with `[--otp <otpcode>]`.
31
+
If you don't include this then you will be prompted.
30
32
31
33
* create / destroy:
32
-
Create a new team, or destroy an existing one. Note: You cannot remove the `developers` team, <ahref="https://docs.npmjs.com/about-developers-team"target="_blank">learn more.</a>
33
-
* add / rm:
34
-
Add a user to an existing team, or remove a user from a team they belong to.
34
+
Create a new team, or destroy an existing one. Note: You cannot remove the
Copy file name to clipboardexpand all lines: deps/npm/docs/output/commands/npm-team.html
+39-14
Original file line number
Diff line number
Diff line change
@@ -152,48 +152,73 @@ <h2 id="table-of-contents">Table of contents</h2>
152
152
npm team rm <scope:team> <user>
153
153
154
154
npm team ls <scope>|<scope:team>
155
-
156
-
npm team edit <scope:team>
157
155
</code></pre>
158
156
<h3id="description">Description</h3>
159
157
<p>Used to manage teams in organizations, and change team memberships. Does not
160
158
handle permissions for packages.</p>
161
159
<p>Teams must always be fully qualified with the organization/scope they belong to
162
-
when operating on them, separated by a colon (<code>:</code>). That is, if you have a <code>wombats</code> team in a <code>wisdom</code> organization, you must always refer to that team as <code>wisdom:wombats</code> in these commands.</p>
163
-
<p>If you have two-factor authentication enabled in <code>auth-and-writes</code> mode, then you can provide a code from your authenticator with <code>[--otp <otpcode>]</code>. If you don’t include this then you will be prompted.</p>
160
+
when operating on them, separated by a colon (<code>:</code>). That is, if you have a
161
+
<code>newteam</code> team in an <code>org</code> organization, you must always refer to that team
162
+
as <code>@org:newteam</code> in these commands.</p>
163
+
<p>If you have two-factor authentication enabled in <code>auth-and-writes</code> mode, then
164
+
you can provide a code from your authenticator with <code>[--otp <otpcode>]</code>.
165
+
If you don’t include this then you will be prompted.</p>
164
166
<ul>
165
167
<li>
166
168
<p>create / destroy:
167
-
Create a new team, or destroy an existing one. Note: You cannot remove the <code>developers</code> team, <!-- raw HTML omitted -->learn more.<!-- raw HTML omitted --></p>
169
+
Create a new team, or destroy an existing one. Note: You cannot remove the
170
+
<code>developers</code> team, <!-- raw HTML omitted -->learn more.<!-- raw HTML omitted --></p>
171
+
<p>Here’s how to create a new team <code>newteam</code> under the <code>org</code> org:</p>
172
+
<prelang="bash"><code>npm team create @org:newteam
173
+
</code></pre>
174
+
<p>You should see a confirming message such as: <code>+@org:newteam</code> once the new
175
+
team has been created.</p>
176
+
</li>
177
+
<li>
178
+
<p>add:
179
+
Add a user to an existing team.</p>
180
+
<p>Adding a new user <code>username</code> to a team named <code>newteam</code> under the <code>org</code> org:</p>
181
+
<prelang="bash"><code>npm team add @org:newteam username
182
+
</code></pre>
183
+
<p>On success, you should see a message: <code>username added to @org:newteam</code></p>
168
184
</li>
169
185
<li>
170
-
<p>add / rm:
171
-
Add a user to an existing team, or remove a user from a team they belong to.</p>
186
+
<p>rm:
187
+
Using <code>npm team rm</code> you can also remove users from a team they belong to.</p>
188
+
<p>Here’s an example removing user <code>username</code> from <code>newteam</code> team
189
+
in <code>org</code> organization:</p>
190
+
<prelang="bash"><code>npm team rm @org:newteam username
191
+
</code></pre>
192
+
<p>Once the user is removed a confirmation message is displayed:
193
+
<code>username removed from @org:newteam</code></p>
172
194
</li>
173
195
<li>
174
196
<p>ls:
175
197
If performed on an organization name, will return a list of existing teams
176
198
under that organization. If performed on a team, it will instead return a list
177
199
of all users belonging to that particular team.</p>
178
-
</li>
179
-
<li>
180
-
<p>edit:
181
-
Edit a current team.</p>
200
+
<p>Here’s an example of how to list all teams from an org named <code>org</code>:</p>
201
+
<prelang="bash"><code>npm team ls @org
202
+
</code></pre>
203
+
<p>Example listing all members of a team named <code>newteam</code>:</p>
204
+
<prelang="bash"><code>npm team ls @org:newteam
205
+
</code></pre>
182
206
</li>
183
207
</ul>
184
208
<h3id="details">Details</h3>
185
209
<p><code>npm team</code> always operates directly on the current registry, configurable from
186
210
the command line using <code>--registry=<registry url></code>.</p>
187
-
<p>In order to create teams and manage team membership, you must be a <em>team admin</em>
188
-
under the given organization. Listing teams and team memberships may be done by
189
-
any member of the organizations.</p>
211
+
<p>You must be a <em>team admin</em> to create teams and manage team membership, under
212
+
the given organization. Listing teams and team memberships may be done by
213
+
any member of the organization.</p>
190
214
<p>Organization creation and management of team admins and <em>organization</em> members
191
215
is done through the website, not the npm CLI.</p>
192
216
<p>To use teams to manage permissions on packages belonging to your organization,
193
217
use the <code>npm access</code> command to grant or revoke the appropriate permissions.</p>
0 commit comments