1 ---
2 title: npm-profile
3 section: 1
4 description: Change settings on your registry profile
5 github_repo: npm/cli
6 github_branch: release/v10
7 github_path: docs/lib/content/commands/npm-profile.md
8 redirect_from:
9 - /cli-documentation/v10/cli-commands/npm-profile
10 - /cli-documentation/v10/cli-commands/profile
11 - /cli-documentation/v10/commands/npm-profile
12 - /cli-documentation/v10/commands/profile
13 - /cli-documentation/v10/npm-profile
14 - /cli-documentation/v10/profile
15 - /cli/v10/cli-commands/npm-profile
16 - /cli/v10/cli-commands/profile
17 - /cli/v10/commands/profile
18 - /cli/v10/npm-profile
19 - /cli/v10/profile
20 ---
21
22 ### Synopsis
23
24 ```bash
25 npm profile enable-2fa [auth-only|auth-and-writes]
26 npm profile disable-2fa
27 npm profile get [<key>]
28 npm profile set <key> <value>
29 ```
30
31 Note: This command is unaware of workspaces.
32
33 ### Description
34
35 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.
36
37 - `npm profile get [<property>]`: Display all of the properties of your profile, or one or more specific properties. It looks like:
38
39 ```
40 name: example
41 email: e@example.com (verified)
42 two-factor auth: auth-and-writes
43 fullname: Example User
44 homepage:
45 freenode:
46 twitter:
47 github:
48 created: 2015-02-26T01:38:35.892Z
49 updated: 2017-10-02T21:29:45.922Z
50 ```
51
52 - `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
53
54 - `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.
55
56 - `npm profile enable-2fa [auth-and-writes|auth-only]`: Enables two-factor authentication. Defaults to `auth-and-writes` mode. Modes are:
57
58 - `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.
59 - `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`.
60
61 - `npm profile disable-2fa`: Disables two-factor authentication.
62
63 ### Details
64
65 Some of these commands may not be available on non npmjs.com registries.
66
67 ### Configuration
68
69 #### `registry`
70
71 - Default: "https://registry.npmjs.org/"
72 - Type: URL
73
74 The base URL of the npm registry.
75
76 #### `json`
77
78 - Default: false
79 - Type: Boolean
80
81 Whether or not to output JSON data, rather than the normal output.
82
83 - In `npm pkg set` it enables parsing set values with JSON.parse() before saving them to your `package.json`.
84
85 Not supported by all npm commands.
86
87 #### `parseable`
88
89 - Default: false
90 - Type: Boolean
91
92 Output parseable results from commands that write to standard output. For `npm search`, this will be tab-separated table format.
93
94 #### `otp`
95
96 - Default: null
97 - Type: null or String
98
99 This is a one-time password from a two-factor authenticator. It's needed when publishing or changing package permissions with `npm access`.
100
101 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.
102
103 ### See Also
104
105 - [npm adduser](/cli/v10/commands/npm-adduser)
106 - [npm registry](/cli/v10/using-npm/registry)
107 - [npm config](/cli/v10/commands/npm-config)
108 - [npmrc](/cli/v10/configuring-npm/npmrc)
109 - [npm owner](/cli/v10/commands/npm-owner)
110 - [npm whoami](/cli/v10/commands/npm-whoami)
111 - [npm token](/cli/v10/commands/npm-token)