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 toauth-and-writesmode. 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 timesauth-onlydoes, and also requires one when you publish a module, set the latest dist-tag, or change access vianpm accessandnpm 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
- Default:
"https://registry.npmjs.org/" - Type: URL
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 setit enables parsing set values withJSON.parse()before saving them to yourpackage.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 loginnpm help registrynpm help confignpm help npmrcnpm help ownernpm help whoaminpm 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
- arch rolling: npm 12.2.1-1 Β· Artistic-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms