• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1---
2title: npm-owner
3section: 1
4description: Manage package owners
5---
6
7### Synopsis
8
9```bash
10npm owner add <user> <package-spec>
11npm owner rm <user> <package-spec>
12npm owner ls <package-spec>
13
14alias: author
15```
16
17### Description
18
19Manage ownership of published packages.
20
21* ls: List all the users who have access to modify a package and push new
22  versions.  Handy when you need to know who to bug for help.
23* add: Add a new user as a maintainer of a package.  This user is enabled
24  to modify metadata, publish new versions, and add other owners.
25* rm: Remove a user from the package owner list.  This immediately revokes
26  their privileges.
27
28Note that there is only one level of access.  Either you can modify a package,
29or you can't.  Future versions may contain more fine-grained access levels, but
30that is not implemented at this time.
31
32If you have two-factor authentication enabled with `auth-and-writes` (see
33[`npm-profile`](/commands/npm-profile)) then you'll need to go through a second factor
34flow when changing ownership or include an otp on the command line with `--otp`.
35
36### Configuration
37
38#### `registry`
39
40* Default: "https://registry.npmjs.org/"
41* Type: URL
42
43The base URL of the npm registry.
44
45
46
47#### `otp`
48
49* Default: null
50* Type: null or String
51
52This is a one-time password from a two-factor authenticator. It's needed
53when publishing or changing package permissions with `npm access`.
54
55If not set, and a registry response fails with a challenge for a one-time
56password, npm will prompt on the command line for one.
57
58
59
60#### `workspace`
61
62* Default:
63* Type: String (can be set multiple times)
64
65Enable running a command in the context of the configured workspaces of the
66current project while filtering by running only the workspaces defined by
67this configuration option.
68
69Valid values for the `workspace` config are either:
70
71* Workspace names
72* Path to a workspace directory
73* Path to a parent workspace directory (will result in selecting all
74  workspaces within that folder)
75
76When set for the `npm init` command, this may be set to the folder of a
77workspace which does not yet exist, to create the folder and set it up as a
78brand new workspace within the project.
79
80This value is not exported to the environment for child processes.
81
82#### `workspaces`
83
84* Default: null
85* Type: null or Boolean
86
87Set to true to run the command in the context of **all** configured
88workspaces.
89
90Explicitly setting this to false will cause commands like `install` to
91ignore workspaces altogether. When not set explicitly:
92
93- Commands that operate on the `node_modules` tree (install, update, etc.)
94will link workspaces into the `node_modules` folder. - Commands that do
95other things (test, exec, publish, etc.) will operate on the root project,
96_unless_ one or more workspaces are specified in the `workspace` config.
97
98This value is not exported to the environment for child processes.
99
100### See Also
101
102* [package spec](/using-npm/package-spec)
103* [npm profile](/commands/npm-profile)
104* [npm publish](/commands/npm-publish)
105* [npm registry](/using-npm/registry)
106* [npm adduser](/commands/npm-adduser)
107