11cb0ef41Sopenharmony_ci--- 21cb0ef41Sopenharmony_cititle: npm-profile 31cb0ef41Sopenharmony_cisection: 1 41cb0ef41Sopenharmony_cidescription: Change settings on your registry profile 51cb0ef41Sopenharmony_ci--- 61cb0ef41Sopenharmony_ci 71cb0ef41Sopenharmony_ci### Synopsis 81cb0ef41Sopenharmony_ci 91cb0ef41Sopenharmony_ci```bash 101cb0ef41Sopenharmony_cinpm profile enable-2fa [auth-only|auth-and-writes] 111cb0ef41Sopenharmony_cinpm profile disable-2fa 121cb0ef41Sopenharmony_cinpm profile get [<key>] 131cb0ef41Sopenharmony_cinpm profile set <key> <value> 141cb0ef41Sopenharmony_ci``` 151cb0ef41Sopenharmony_ci 161cb0ef41Sopenharmony_ciNote: This command is unaware of workspaces. 171cb0ef41Sopenharmony_ci 181cb0ef41Sopenharmony_ci### Description 191cb0ef41Sopenharmony_ci 201cb0ef41Sopenharmony_ciChange your profile information on the registry. Note that this command 211cb0ef41Sopenharmony_cidepends on the registry implementation, so third-party registries may not 221cb0ef41Sopenharmony_cisupport this interface. 231cb0ef41Sopenharmony_ci 241cb0ef41Sopenharmony_ci* `npm profile get [<property>]`: Display all of the properties of your 251cb0ef41Sopenharmony_ci profile, or one or more specific properties. It looks like: 261cb0ef41Sopenharmony_ci 271cb0ef41Sopenharmony_ci```bash 281cb0ef41Sopenharmony_ci+-----------------+---------------------------+ 291cb0ef41Sopenharmony_ci| name | example | 301cb0ef41Sopenharmony_ci+-----------------+---------------------------+ 311cb0ef41Sopenharmony_ci| email | me@example.com (verified) | 321cb0ef41Sopenharmony_ci+-----------------+---------------------------+ 331cb0ef41Sopenharmony_ci| two factor auth | auth-and-writes | 341cb0ef41Sopenharmony_ci+-----------------+---------------------------+ 351cb0ef41Sopenharmony_ci| fullname | Example User | 361cb0ef41Sopenharmony_ci+-----------------+---------------------------+ 371cb0ef41Sopenharmony_ci| homepage | | 381cb0ef41Sopenharmony_ci+-----------------+---------------------------+ 391cb0ef41Sopenharmony_ci| freenode | | 401cb0ef41Sopenharmony_ci+-----------------+---------------------------+ 411cb0ef41Sopenharmony_ci| twitter | | 421cb0ef41Sopenharmony_ci+-----------------+---------------------------+ 431cb0ef41Sopenharmony_ci| github | | 441cb0ef41Sopenharmony_ci+-----------------+---------------------------+ 451cb0ef41Sopenharmony_ci| created | 2015-02-26T01:38:35.892Z | 461cb0ef41Sopenharmony_ci+-----------------+---------------------------+ 471cb0ef41Sopenharmony_ci| updated | 2017-10-02T21:29:45.922Z | 481cb0ef41Sopenharmony_ci+-----------------+---------------------------+ 491cb0ef41Sopenharmony_ci``` 501cb0ef41Sopenharmony_ci 511cb0ef41Sopenharmony_ci* `npm profile set <property> <value>`: Set the value of a profile 521cb0ef41Sopenharmony_ci property. You can set the following properties this way: email, fullname, 531cb0ef41Sopenharmony_ci homepage, freenode, twitter, github 541cb0ef41Sopenharmony_ci 551cb0ef41Sopenharmony_ci* `npm profile set password`: Change your password. This is interactive, 561cb0ef41Sopenharmony_ci you'll be prompted for your current password and a new password. You'll 571cb0ef41Sopenharmony_ci also be prompted for an OTP if you have two-factor authentication 581cb0ef41Sopenharmony_ci enabled. 591cb0ef41Sopenharmony_ci 601cb0ef41Sopenharmony_ci* `npm profile enable-2fa [auth-and-writes|auth-only]`: Enables two-factor 611cb0ef41Sopenharmony_ci authentication. Defaults to `auth-and-writes` mode. Modes are: 621cb0ef41Sopenharmony_ci * `auth-only`: Require an OTP when logging in or making changes to your 631cb0ef41Sopenharmony_ci account's authentication. The OTP will be required on both the website 641cb0ef41Sopenharmony_ci and the command line. 651cb0ef41Sopenharmony_ci * `auth-and-writes`: Requires an OTP at all the times `auth-only` does, 661cb0ef41Sopenharmony_ci and also requires one when publishing a module, setting the `latest` 671cb0ef41Sopenharmony_ci dist-tag, or changing access via `npm access` and `npm owner`. 681cb0ef41Sopenharmony_ci 691cb0ef41Sopenharmony_ci* `npm profile disable-2fa`: Disables two-factor authentication. 701cb0ef41Sopenharmony_ci 711cb0ef41Sopenharmony_ci### Details 721cb0ef41Sopenharmony_ci 731cb0ef41Sopenharmony_ciSome of these commands may not be available on non npmjs.com registries. 741cb0ef41Sopenharmony_ci 751cb0ef41Sopenharmony_ci### Configuration 761cb0ef41Sopenharmony_ci 771cb0ef41Sopenharmony_ci#### `registry` 781cb0ef41Sopenharmony_ci 791cb0ef41Sopenharmony_ci* Default: "https://registry.npmjs.org/" 801cb0ef41Sopenharmony_ci* Type: URL 811cb0ef41Sopenharmony_ci 821cb0ef41Sopenharmony_ciThe base URL of the npm registry. 831cb0ef41Sopenharmony_ci 841cb0ef41Sopenharmony_ci 851cb0ef41Sopenharmony_ci 861cb0ef41Sopenharmony_ci#### `json` 871cb0ef41Sopenharmony_ci 881cb0ef41Sopenharmony_ci* Default: false 891cb0ef41Sopenharmony_ci* Type: Boolean 901cb0ef41Sopenharmony_ci 911cb0ef41Sopenharmony_ciWhether or not to output JSON data, rather than the normal output. 921cb0ef41Sopenharmony_ci 931cb0ef41Sopenharmony_ci* In `npm pkg set` it enables parsing set values with JSON.parse() before 941cb0ef41Sopenharmony_ci saving them to your `package.json`. 951cb0ef41Sopenharmony_ci 961cb0ef41Sopenharmony_ciNot supported by all npm commands. 971cb0ef41Sopenharmony_ci 981cb0ef41Sopenharmony_ci 991cb0ef41Sopenharmony_ci 1001cb0ef41Sopenharmony_ci#### `parseable` 1011cb0ef41Sopenharmony_ci 1021cb0ef41Sopenharmony_ci* Default: false 1031cb0ef41Sopenharmony_ci* Type: Boolean 1041cb0ef41Sopenharmony_ci 1051cb0ef41Sopenharmony_ciOutput parseable results from commands that write to standard output. For 1061cb0ef41Sopenharmony_ci`npm search`, this will be tab-separated table format. 1071cb0ef41Sopenharmony_ci 1081cb0ef41Sopenharmony_ci 1091cb0ef41Sopenharmony_ci 1101cb0ef41Sopenharmony_ci#### `otp` 1111cb0ef41Sopenharmony_ci 1121cb0ef41Sopenharmony_ci* Default: null 1131cb0ef41Sopenharmony_ci* Type: null or String 1141cb0ef41Sopenharmony_ci 1151cb0ef41Sopenharmony_ciThis is a one-time password from a two-factor authenticator. It's needed 1161cb0ef41Sopenharmony_ciwhen publishing or changing package permissions with `npm access`. 1171cb0ef41Sopenharmony_ci 1181cb0ef41Sopenharmony_ciIf not set, and a registry response fails with a challenge for a one-time 1191cb0ef41Sopenharmony_cipassword, npm will prompt on the command line for one. 1201cb0ef41Sopenharmony_ci 1211cb0ef41Sopenharmony_ci 1221cb0ef41Sopenharmony_ci 1231cb0ef41Sopenharmony_ci### See Also 1241cb0ef41Sopenharmony_ci 1251cb0ef41Sopenharmony_ci* [npm adduser](/commands/npm-adduser) 1261cb0ef41Sopenharmony_ci* [npm registry](/using-npm/registry) 1271cb0ef41Sopenharmony_ci* [npm config](/commands/npm-config) 1281cb0ef41Sopenharmony_ci* [npmrc](/configuring-npm/npmrc) 1291cb0ef41Sopenharmony_ci* [npm owner](/commands/npm-owner) 1301cb0ef41Sopenharmony_ci* [npm whoami](/commands/npm-whoami) 1311cb0ef41Sopenharmony_ci* [npm token](/commands/npm-token) 132