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