www.LinuxHowtos.org
NP-PROFILE
Section: (1)Updated: October 2025
Index Return to Main Contents
NAME
np-profile- Change settings on your registry profileSynopsis
-
npm profile enabl-2fa [lB]aut-only|aut-an-writes[rB] npm profile disabl-2fa npm profile get [lB]<key>[rB] npm profile set <key> <value>
Description
Change your profile information on the registry. Note that this command depends on the registry implementation, so thir-party registries may not support this interface.-
- *
- npm profile get [lB]<property>[rB]: Display all of the properties of your profile, or one or more specific properties. It looks like:
-
name: example email: e@example.com (verified) tw-factor auth: aut-an-writes fullname: Example User homepage: freenode: twitter: github: created: 201-0-26T01:38:35.892Z updated: 201-1-02T21:29:45.922Z
-
- *
- npm profile set <property> <value>: Set the value of a profile property. You can set the following properties this way: email, fullname, homepage, freenode, twitter, github
- *
- npm profile set password: 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 tw-factor authentication enabled.
- *
-
npm profile enabl-2fa [lB]aut-an-writes|aut-only[rB]: Enables tw-factor authentication. Defaults to aut-an-writes mode. Modes are:
-
- *
- aut-only: 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.
- *
- aut-an-writes: Requires an OTP at all the times aut-only does, and also requires one when publishing a module, setting the latest dis-tag, or changing access via npm access and npm owner.
-
- *
- npm profile disabl-2fa: Disables tw-factor authentication.
Details
Some of these commands may not be available on non npmjs.com registries.Configuration
registry
-
- *
- Default: "https://registry.npmjs.org/"
- *
- Type: URL
The base URL of the npm registry.
json
-
- *
- Default: false
- *
- Type: Boolean
Whether or not to output JSON data, rather than the normal output.
-
- *
- In npm pkg set it enables parsing set values with JSON.parse() before saving them to your package.json.
Not supported by all npm commands.
parseable
-
- *
- Default: false
- *
- Type: Boolean
Output parseable results from commands that write to standard output. For npm search, this will be ta-separated table format.
otp
-
- *
- Default: null
- *
- Type: null or String
This is a on-time password from a tw-factor authenticator. It's needed when publishing or changing package permissions with npm access. If not set, and a registry response fails with a challenge for a on-time password, npm will prompt on the command line for one.
See Also
-
- *
- npm help adduser
- *
- npm help registry
- *
- npm help config
- *
- npm help npmrc
- *
- npm help owner
- *
- npm help whoami
- *
- npm help token