Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
npm-access.1106 linesDownload Raw Back to man1
1.TH "NPM-ACCESS" "1" "April 2026" "NPM@11.13.0" ""
2.SH "NAME"
3\fBnpm-access\fR - Set access level on published packages
4.SS "Synopsis"
5.P
6.RS 2
7.nf
8npm access list packages \[lB]<user>|<scope>|<scope:team>\[rB] \[lB]<package>\[rB]
9npm access list collaborators \[lB]<package> \[lB]<user>\[rB]\[rB]
10npm access get status \[lB]<package>\[rB]
11npm access set status=public|private \[lB]<package>\[rB]
12npm access set mfa=none|publish|automation \[lB]<package>\[rB]
13npm access grant <read-only|read-write> <scope:team> \[lB]<package>\[rB]
14npm access revoke <scope:team> \[lB]<package>\[rB]
15.fi
16.RE
17.P
18Note: This command is unaware of workspaces.
19.SS "Description"
20.P
21Used to set access controls on private packages.
22.P
23For all of the subcommands, \fBnpm access\fR will perform actions on the packages in the current working directory if no package name is passed to the subcommand.
24.RS 0
25.IP \(bu 4
26grant / revoke: Add or remove the ability of users and teams to have read-only or read-write access to a package.
27.RE 0
28
29.SS "Details"
30.P
31\fBnpm access\fR always operates directly on the current registry, configurable from the command line using \fB--registry=<registry url>\fR.
32.P
33Unscoped packages are \fIalways public\fR.
34.P
35Scoped packages \fIdefault to restricted\fR, but you can either publish them as public using \fBnpm publish --access=public\fR, or set their access as public using \fBnpm access set status=public\fR after the initial publish.
36.P
37You must have privileges to set the access of a package:
38.RS 0
39.IP \(bu 4
40You are an owner of an unscoped or scoped package.
41.IP \(bu 4
42You are a member of the team that owns a scope.
43.IP \(bu 4
44You have been given read-write privileges for a package, either as a member of a team or directly as an owner.
45.RE 0
46
47.P
48If you have two-factor authentication enabled then you'll be prompted to provide a second factor, or may use the \fB--otp=...\fR option to specify it on the command line.
49.P
50If your account is not paid, then attempts to publish scoped packages will fail with an HTTP 402 status code (logically enough), unless you use \fB--access=public\fR.
51.P
52Management of teams and team memberships is done with the \fBnpm team\fR command.
53.SS "Configuration"
54.SS "\fBjson\fR"
55.RS 0
56.IP \(bu 4
57Default: false
58.IP \(bu 4
59Type: Boolean
60.RE 0
61
62.P
63Whether or not to output JSON data, rather than the normal output.
64.RS 0
65.IP \(bu 4
66In \fBnpm pkg set\fR it enables parsing set values with JSON.parse() before saving them to your \fBpackage.json\fR.
67.RE 0
68
69.P
70Not supported by all npm commands.
71.SS "\fBotp\fR"
72.RS 0
73.IP \(bu 4
74Default: null
75.IP \(bu 4
76Type: null or String
77.RE 0
78
79.P
80This is a one-time password from a two-factor authenticator. It's needed when publishing or changing package permissions with \fBnpm access\fR.
81.P
82If not set, and a registry response fails with a challenge for a one-time password, npm will prompt on the command line for one.
83.SS "\fBregistry\fR"
84.RS 0
85.IP \(bu 4
86Default: "https://registry.npmjs.org/"
87.IP \(bu 4
88Type: URL
89.RE 0
90
91.P
92The base URL of the npm registry.
93.SS "See Also"
94.RS 0
95.IP \(bu 4
96\fB\[rs]fBlibnpmaccess\[rs]fR\fR \fI\(lahttps://npm.im/libnpmaccess\(ra\fR
97.IP \(bu 4
98npm help team
99.IP \(bu 4
100npm help publish
101.IP \(bu 4
102npm help config
103.IP \(bu 4
104npm help registry
105.RE 0
106 
codekingpro/portable-devtools · Team Ai