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/v11/cli-commands/npm-profile
18 - /cli-documentation/v11/cli-commands/profile
19 - /cli-documentation/v11/commands/npm-profile
20 - /cli-documentation/v11/commands/profile
21 - /cli-documentation/v11/npm-profile
22 - /cli-documentation/v11/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/v11/cli-commands/npm-profile
30 - /cli/v11/cli-commands/profile
31 - /cli/v11/commands/profile
32 - /cli/v11/npm-profile
33 - /cli/v11/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 - `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.
74 - `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`.
75
76 - `npm profile disable-2fa`: Disables two-factor authentication.
77
78 ### Details
79
80 Some of these commands may not be available on non npmjs.com registries.
81
82 ### Configuration
83
84 #### `registry`
85
86 - Default: "https://registry.npmjs.org/"
87 - Type: URL
88
89 The base URL of the npm registry.
90
91 #### `json`
92
93 - Default: false
94 - Type: Boolean
95
96 Whether or not to output JSON data, rather than the normal output.
97
98 - In `npm pkg set` it enables parsing set values with JSON.parse() before saving them to your `package.json`.
99
100 Not supported by all npm commands.
101
102 #### `parseable`
103
104 - Default: false
105 - Type: Boolean
106
107 Output parseable results from commands that write to standard output. For `npm search`, this will be tab-separated table format.
108
109 #### `otp`
110
111 - Default: null
112 - Type: null or String
113
114 This is a one-time password from a two-factor authenticator. It's 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 one-time password, npm will prompt on the command line for one.
117
118 ### See Also
119
120 - [npm adduser](/cli/v11/commands/npm-adduser)
121 - [npm registry](/cli/v11/using-npm/registry)
122 - [npm config](/cli/v11/commands/npm-config)
123 - [npmrc](/cli/v11/configuring-npm/npmrc)
124 - [npm owner](/cli/v11/commands/npm-owner)
125 - [npm whoami](/cli/v11/commands/npm-whoami)
126 - [npm token](/cli/v11/commands/npm-token)