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