2025-04-10 14:36:22 -07:00
.TH "NPM-WHOAMI" "1" "April 2025" "NPM@11.3.0" ""
2011-11-26 09:21:03 -08:00
.SH "NAME"
2022-12-06 22:18:33 -05:00
\fB npm-whoami\fR - Display npm username
.SS "Synopsis"
2014-09-24 14:41:07 -07:00
.P
.RS 2
2014-11-04 15:08:12 -08:00
.nf
2022-02-24 21:41:49 +00:00
npm whoami
2014-11-04 15:08:12 -08:00
.fi
2014-09-24 14:41:07 -07:00
.RE
2021-03-23 14:58:11 -04:00
.P
2022-12-06 22:18:33 -05:00
Note: This command is unaware of workspaces.
.SS "Description"
2014-09-24 14:41:07 -07:00
.P
2022-12-06 22:18:33 -05:00
Display the npm username of the currently logged-in user.
2021-05-20 15:54:50 -04:00
.P
2022-12-06 22:18:33 -05:00
If logged into a registry that provides token-based authentication, then connect to the \fB /-/whoami\fR registry endpoint to find the username associated with the token, and print to standard output.
2021-05-20 15:54:50 -04:00
.P
2022-12-06 22:18:33 -05:00
If logged into a registry that uses Basic Auth, then simply print the \fB username\fR portion of the authentication string.
.SS "Configuration"
.SS "\fBregistry\fR"
2021-05-20 15:54:50 -04:00
.RS 0
2022-12-06 22:18:33 -05:00
.IP \(bu 4
Default: "https://registry.npmjs.org/"
.IP \(bu 4
2021-05-20 15:54:50 -04:00
Type: URL
2022-12-06 22:18:33 -05:00
.RE 0
2021-05-20 15:54:50 -04:00
.P
2022-12-06 22:18:33 -05:00
The base URL of the npm registry.
.SS "See Also"
2014-09-24 14:41:07 -07:00
.RS 0
2022-12-06 22:18:33 -05:00
.IP \(bu 4
2019-11-18 21:01:39 +02:00
npm help config
2022-12-06 22:18:33 -05:00
.IP \(bu 4
2019-11-05 14:55:08 -05:00
npm help npmrc
2022-12-06 22:18:33 -05:00
.IP \(bu 4
2019-11-18 21:01:39 +02:00
npm help adduser
2022-12-06 22:18:33 -05:00
.RE 0