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