codekingpro/portable-devtools
114k
1---
2title: npm-profile
3section: 1
4description: Change settings on your registry profile
5---
6
7### Synopsis
8
9```bash
10npm profile enable-2fa [auth-only|auth-and-writes]
11npm profile disable-2fa
12npm profile get [<key>]
13npm profile set <key> <value>
14```
15
16Note: This command is unaware of workspaces.
17
18### Description
19
20Change your profile information on the registry.
21Note that this command depends on the registry implementation, so third-party registries may not support this interface.
22
23* `npm profile get [<property>]`: Display all of the properties of your profile, or one or more specific properties.
24It looks like:
25
26```
27name: example
28email: e@example.com (verified)
29two-factor auth: auth-and-writes
30fullname: Example User
31homepage:
32freenode:
33twitter:
34github:
35created: 2015-02-26T01:38:35.892Z
36updated: 2017-10-02T21:29:45.922Z
37```
38
39* `npm profile set <property> <value>`: Set the value of a profile property.
40You can set the following properties this way: email, fullname, homepage, freenode, twitter, github
41
42* `npm profile set password`: Change your password.
43This is interactive, you'll be prompted for your current password and a new password.
44You'll also be prompted for an OTP if you have two-factor authentication enabled.
45
46* `npm profile enable-2fa [auth-and-writes|auth-only]`: Enables two-factor authentication.
47Defaults to `auth-and-writes` mode.
48Modes are:
49 * `auth-only`: Require an OTP when logging in or making changes to your account's authentication.
50The OTP will be required on both the website and the command line.
51 * `auth-and-writes`: Requires an OTP at all the times `auth-only` does, and also requires one when publishing a module, setting the `latest` dist-tag, or changing access via `npm access` and `npm owner`.
52
53* `npm profile disable-2fa`: Disables two-factor authentication.
54
55### Details
56
57Some of these commands may not be available on non npmjs.com registries.
58
59### Configuration
60
61#### `registry`
62
63* Default: "https://registry.npmjs.org/"
64* Type: URL
65
66The base URL of the npm registry.
67
68
69
70#### `json`
71
72* Default: false
73* Type: Boolean
74
75Whether or not to output JSON data, rather than the normal output.
76
77* In `npm pkg set` it enables parsing set values with JSON.parse() before
78 saving them to your `package.json`.
79
80Not supported by all npm commands.
81
82
83
84#### `parseable`
85
86* Default: false
87* Type: Boolean
88
89Output parseable results from commands that write to standard output. For
90`npm search`, this will be tab-separated table format.
91
92
93
94#### `otp`
95
96* Default: null
97* Type: null or String
98
99This is a one-time password from a two-factor authenticator. It's needed
100when publishing or changing package permissions with `npm access`.
101
102If not set, and a registry response fails with a challenge for a one-time
103password, npm will prompt on the command line for one.
104
105
106
107### See Also
108
109* [npm adduser](/commands/npm-adduser)
110* [npm registry](/using-npm/registry)
111* [npm config](/commands/npm-config)
112* [npmrc](/configuring-npm/npmrc)
113* [npm owner](/commands/npm-owner)
114* [npm whoami](/commands/npm-whoami)
115* [npm token](/commands/npm-token)
116 