1NPM-ACCESS(1)                                                    NPM-ACCESS(1)
2
3
4

NAME

6       npm-access - Set access level on published packages
7
8   Synopsis
9         npm access public [<package>]
10         npm access restricted [<package>]
11         npm access grant <read-only|read-write> <scope:team> [<package>]
12         npm access revoke <scope:team> [<package>]
13         npm access 2fa-required [<package>]
14         npm access 2fa-not-required [<package>]
15         npm access ls-packages [<user>|<scope>|<scope:team>]
16         npm access ls-collaborators [<package> [<user>]]
17         npm access edit [<package>]
18
19   Description
20       Used to set access controls on private packages.
21
22       For  all  of  the  subcommands,  npm access will perform actions on the
23       packages in the current working directory if no package name is  passed
24       to the subcommand.
25
26       • public / restricted (deprecated): Set a package to be either publicly
27         accessible or restricted.
28
29       • grant / revoke (deprecated): Add or remove the ability of  users  and
30         teams to have read-only or read-write access to a package.
31
32       • 2fa-required  /  2fa-not-required  (deprecated):  Configure whether a
33         package requires that anyone publishing it have two-factor  authenti‐
34         cation enabled on their account.
35
36       • ls-packages  (deprecated):  Show all of the packages a user or a team
37         is able to access, along with the access level, except for  read-only
38         public packages (it won't print the whole registry listing)
39
40       • ls-collaborators  (deprecated): Show all of the access privileges for
41         a package. Will only show permissions for packages to which you  have
42         at  least  read  access. If <user> is passed in, the list is filtered
43         only to teams that user happens to belong to.
44
45       • edit (not implemented)
46
47
48   Details
49       npm access always operates directly on the  current  registry,  config‐
50       urable from the command line using --registry=<registry url>.
51
52       Unscoped packages are always public.
53
54       Scoped  packages default to restricted, but you can either publish them
55       as public using npm publish --access=public, or  set  their  access  as
56       public using npm access public after the initial publish.
57
58       You must have privileges to set the access of a package:
59
60       • You are an owner of an unscoped or scoped package.
61
62       • You are a member of the team that owns a scope.
63
64       • You  have been given read-write privileges for a package, either as a
65         member of a team or directly as an owner.
66
67
68       If you have two-factor authentication enabled then you'll  be  prompted
69       to  provide an otp token, or may use the --otp=... option to specify it
70       on the command line.
71
72       If your account is not paid, then attempts to publish  scoped  packages
73       will  fail  with an HTTP 402 status code (logically enough), unless you
74       use --access=public.
75
76       Management of teams and team memberships is done with the npm team com‐
77       mand.
78
79   Configuration
80   registry
81       • Default: "https://registry.npmjs.org/"
82
83       • Type: URL
84
85
86       The base URL of the npm registry.
87
88   otp
89       • Default: null
90
91       • Type: null or String
92
93
94       This  is  a  one-time  password  from  a two-factor authenticator. It's
95       needed when publishing or changing package permissions with npm access.
96
97       If not set, and a registry  response  fails  with  a  challenge  for  a
98       one-time password, npm will prompt on the command line for one.
99
100   See Also
101libnpmaccess https://npm.im/libnpmaccess
102
103       • npm help team
104
105       • npm help publish
106
107       • npm help config
108
109       • npm help registry
110
111
112
113
114                                September 2022                   NPM-ACCESS(1)
Impressum