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