NPM-PROFILE(1)

πŸ’… npm-profile β€” NPM-PROFILE(1) ✨

okay so bestie, welcome to npm-profile β€” the little man page that lets you ~glow up~ your registry profile. this is NPM-PROFILE(1), and yes we're doing this properly, so buckle up πŸŽ€

🌸 SYNOPSIS 🌸

npm profile enable-2fa [auth-only|auth-and-writes]
npm profile disable-2fa
npm profile get [<key>]
npm profile set <key> <value>
πŸ’€ heads up bestie: this command is unaware of workspaces. like, it literally does not know they exist. no cap.

πŸ’– DESCRIPTION πŸ’–

so this whole thing is about changing your profile info on the registry. but here's the tea: it depends on the registry implementation, which means third-party registries might not support this interface at all. no shade to them, it's just how it is 🫢

  • npm profile get [<property>] β€” shows you all the properties on your profile, or just one or more specific ones you ask for. it looks like this, iconic:
name: example
email: e@example.com (verified)
two-factor auth: auth-and-writes
fullname: Example User
homepage:
github:
created: 2015-02-26T01:38:35.892Z
updated: 2017-10-02T21:29:45.922Z
  • npm profile set <property> <value> β€” sets the value of a profile property. the ones you can set this way are: email, fullname, homepage, github. that's the whole list, don't try to be creative πŸ’…
  • npm profile set password β€” changes your password. it's interactive, so you'll be prompted for your current password and then a new password. and if you have two-factor authentication enabled, you'll also get prompted for an OTP. three prompts, one slay πŸ”₯
  • npm profile enable-2fa [auth-and-writes|auth-only] β€” turns on two-factor authentication. defaults to auth-and-writes mode. the modes are:
    • auth-only: requires an OTP when you log in or when you make changes to your account's authentication. the OTP is required on both the website and the command line.
    • auth-and-writes: requires an OTP at all the times auth-only does, and also requires one when you publish a module, set the latest dist-tag, or change access via npm access and npm owner. it's giving maximum security main character energy πŸ‘‘
  • npm profile disable-2fa β€” disables two-factor authentication. bye bye OTP πŸ¦‹

🧚 DETAILS 🧚

some of these commands may not be available on non npmjs.com registries. just so you know πŸ‘€


⭐ CONFIGURATION ⭐

🌈 registry

the base URL of the npm registry. that's it, that's the whole vibe.

πŸ“ 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, fyi.

πŸ’œ parseable

  • Default: false
  • Type: Boolean

outputs parseable results from commands that write to standard output. for npm search, this will be tab-separated table format. very spreadsheet of it.

πŸ”‘ otp

  • Default: null
  • Type: null or String

this is a one-time password from a two-factor authenticator. it's needed when publishing or changing package permissions with npm access.

if it's not set, and a registry response fails with a challenge for a one-time password, npm will prompt on the command line for one. so like, it's got your back 😌


πŸ‘‘ SEE ALSO πŸ‘‘

  • npm help login
  • npm help registry
  • npm help config
  • npm help npmrc
  • npm help owner
  • npm help whoami
  • npm help token

and that's the whole page bestie, you ate that πŸ’…βœ¨ this was NPM@12.2.1, October 2026 β€” NPM-PROFILE(1), signing off πŸŽ€πŸ«Ά

πŸ“¦ where this page comes from