2025-04-10 14:36:22 -07:00
.TH "NPM-PROFILE" "1" "April 2025" "NPM@11.3.0" ""
2020-01-28 17:14:59 -05:00
.SH "NAME"
2022-12-06 22:18:33 -05:00
\fB npm-profile\fR - Change settings on your registry profile
.SS "Synopsis"
2017-10-26 22:35:25 -04:00
.P
2020-01-28 17:14:59 -05:00
.RS 2
.nf
2022-12-06 22:18:33 -05:00
npm profile enable-2fa \[ lB]auth-only|auth-and-writes\[ rB]
npm profile disable-2fa
npm profile get \[ lB]<key>\[ rB]
2022-02-24 21:41:49 +00:00
npm profile set <key> <value>
2020-01-28 17:14:59 -05:00
.fi
.RE
2021-03-23 14:58:11 -04:00
.P
2022-12-06 22:18:33 -05:00
Note: This command is unaware of workspaces.
.SS "Description"
2020-01-28 17:14:59 -05:00
.P
2022-12-06 22:18:33 -05:00
Change your profile information on the registry. Note that this command depends on the registry implementation, so third-party registries may not support this interface.
2020-01-28 17:14:59 -05:00
.RS 0
2022-12-06 22:18:33 -05:00
.IP \(bu 4
\fB npm profile get \[ lB]<property>\[ rB]\fR : Display all of the properties of your profile, or one or more specific properties. It looks like:
.RE 0
2020-01-28 17:14:59 -05:00
.P
.RS 2
.nf
2024-04-30 23:53:22 -07:00
name: example
email: e@example.com (verified)
two-factor auth: auth-and-writes
fullname: Example User
homepage:
freenode:
twitter:
github:
created: 2015-02-26T01:38:35.892Z
updated: 2017-10-02T21:29:45.922Z
2020-01-28 17:14:59 -05:00
.fi
.RE
2017-10-26 22:35:25 -04:00
.RS 0
2022-12-06 22:18:33 -05:00
.IP \(bu 4
\fB npm profile set <property> <value>\fR : Set the value of a profile property. You can set the following properties this way: email, fullname, homepage, freenode, twitter, github
.IP \(bu 4
\fB npm profile set password\fR : Change your password. This is interactive, you'll be prompted for your current password and a new password. You'll also be prompted for an OTP if you have two-factor authentication enabled.
.IP \(bu 4
\fB npm profile enable-2fa \[ lB]auth-and-writes|auth-only\[ rB]\fR : Enables two-factor authentication. Defaults to \fB auth-and-writes\fR mode. Modes are:
.RS 4
.IP \(bu 4
\fB auth-only\fR : Require an OTP when logging in or making changes to your account's authentication. The OTP will be required on both the website and the command line.
.IP \(bu 4
\fB auth-and-writes\fR : Requires an OTP at all the times \fB auth-only\fR does, and also requires one when publishing a module, setting the \fB latest\fR dist-tag, or changing access via \fB npm access\fR and \fB npm owner\fR .
.RE 0
2017-10-26 22:35:25 -04:00
2022-12-06 22:18:33 -05:00
.IP \(bu 4
\fB npm profile disable-2fa\fR : Disables two-factor authentication.
.RE 0
2017-10-26 22:35:25 -04:00
2022-12-06 22:18:33 -05:00
.SS "Details"
2017-10-26 22:35:25 -04:00
.P
2022-12-06 22:18:33 -05:00
Some of these commands may not be available on non npmjs.com registries.
.SS "Configuration"
.SS "\fBregistry\fR"
2021-05-20 15:54:50 -04:00
.RS 0
2022-12-06 22:18:33 -05:00
.IP \(bu 4
Default: "https://registry.npmjs.org/"
.IP \(bu 4
2021-05-20 15:54:50 -04:00
Type: URL
2022-12-06 22:18:33 -05:00
.RE 0
2021-05-20 15:54:50 -04:00
.P
2022-12-06 22:18:33 -05:00
The base URL of the npm registry.
.SS "\fBjson\fR"
2021-05-20 15:54:50 -04:00
.RS 0
2022-12-06 22:18:33 -05:00
.IP \(bu 4
2021-05-20 15:54:50 -04:00
Default: false
2022-12-06 22:18:33 -05:00
.IP \(bu 4
2021-05-20 15:54:50 -04:00
Type: Boolean
2022-12-06 22:18:33 -05:00
.RE 0
2021-05-20 15:54:50 -04:00
.P
2022-12-06 22:18:33 -05:00
Whether or not to output JSON data, rather than the normal output.
2021-07-15 20:09:18 +00:00
.RS 0
2022-12-06 22:18:33 -05:00
.IP \(bu 4
In \fB npm pkg set\fR it enables parsing set values with JSON.parse() before saving them to your \fB package.json\fR .
.RE 0
2021-07-15 20:09:18 +00:00
2021-05-20 15:54:50 -04:00
.P
2022-12-06 22:18:33 -05:00
Not supported by all npm commands.
.SS "\fBparseable\fR"
2021-05-20 15:54:50 -04:00
.RS 0
2022-12-06 22:18:33 -05:00
.IP \(bu 4
2021-05-20 15:54:50 -04:00
Default: false
2022-12-06 22:18:33 -05:00
.IP \(bu 4
2021-05-20 15:54:50 -04:00
Type: Boolean
2022-12-06 22:18:33 -05:00
.RE 0
2021-05-20 15:54:50 -04:00
.P
2022-12-06 22:18:33 -05:00
Output parseable results from commands that write to standard output. For \fB npm search\fR , this will be tab-separated table format.
.SS "\fBotp\fR"
2021-05-20 15:54:50 -04:00
.RS 0
2022-12-06 22:18:33 -05:00
.IP \(bu 4
2021-05-20 15:54:50 -04:00
Default: null
2022-12-06 22:18:33 -05:00
.IP \(bu 4
2021-05-20 15:54:50 -04:00
Type: null or String
2022-12-06 22:18:33 -05:00
.RE 0
2021-05-20 15:54:50 -04:00
.P
2022-12-06 22:18:33 -05:00
This is a one-time password from a two-factor authenticator. It's needed when publishing or changing package permissions with \fB npm access\fR .
2021-05-20 15:54:50 -04:00
.P
2022-12-06 22:18:33 -05:00
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.
.SS "See Also"
2017-10-26 22:35:25 -04:00
.RS 0
2022-12-06 22:18:33 -05:00
.IP \(bu 4
2020-12-11 18:54:56 -05:00
npm help adduser
2022-12-06 22:18:33 -05:00
.IP \(bu 4
2021-05-20 15:54:50 -04:00
npm help registry
2022-12-06 22:18:33 -05:00
.IP \(bu 4
2019-11-18 21:01:39 +02:00
npm help config
2022-12-06 22:18:33 -05:00
.IP \(bu 4
2021-05-20 15:54:50 -04:00
npm help npmrc
2022-12-06 22:18:33 -05:00
.IP \(bu 4
2021-05-20 15:54:50 -04:00
npm help owner
2022-12-06 22:18:33 -05:00
.IP \(bu 4
2021-05-20 15:54:50 -04:00
npm help whoami
2022-12-06 22:18:33 -05:00
.IP \(bu 4
2021-05-20 15:54:50 -04:00
npm help token
2022-12-06 22:18:33 -05:00
.RE 0