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