codekingpro/portable-devtools
114k
1---
2title: npm-org
3section: 1
4description: Manage orgs
5---
6
7### Synopsis
8
9```bash
10npm org set orgname username [developer | admin | owner]
11npm org rm orgname username
12npm org ls orgname [<username>]
13
14alias: ogr
15```
16
17Note: This command is unaware of workspaces.
18
19### Example
20
21Add a new developer to an org:
22
23```bash
24$ npm org set my-org @mx-smith
25```
26
27Add a new admin to an org (or change a developer to an admin):
28
29```bash
30$ npm org set my-org @mx-santos admin
31```
32
33Remove a user from an org:
34
35```bash
36$ npm org rm my-org mx-santos
37```
38
39List all users in an org:
40
41```bash
42$ npm org ls my-org
43```
44
45List all users in JSON format:
46
47```bash
48$ npm org ls my-org --json
49```
50
51See what role a user has in an org:
52
53```bash
54$ npm org ls my-org @mx-santos
55```
56
57### Description
58
59You can use the `npm org` commands to manage and view users of an organization.
60It supports adding and removing users, changing their roles, listing them, and finding specific ones and their roles.
61
62### Configuration
63
64#### `registry`
65
66* Default: "https://registry.npmjs.org/"
67* Type: URL
68
69The base URL of the npm registry.
70
71
72
73#### `otp`
74
75* Default: null
76* Type: null or String
77
78This is a one-time password from a two-factor authenticator. It's needed
79when publishing or changing package permissions with `npm access`.
80
81If not set, and a registry response fails with a challenge for a one-time
82password, npm will prompt on the command line for one.
83
84
85
86#### `json`
87
88* Default: false
89* Type: Boolean
90
91Whether or not to output JSON data, rather than the normal output.
92
93* In `npm pkg set` it enables parsing set values with JSON.parse() before
94 saving them to your `package.json`.
95
96Not supported by all npm commands.
97
98
99
100#### `parseable`
101
102* Default: false
103* Type: Boolean
104
105Output parseable results from commands that write to standard output. For
106`npm search`, this will be tab-separated table format.
107
108
109
110### See Also
111
112* [using orgs](/using-npm/orgs)
113* [Documentation on npm Orgs](https://docs.npmjs.com/orgs/)
114 