npm-whoami.1 875 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. .TH "NPM-WHOAMI" "1" "March 2026" "NPM@11.12.0" ""
  2. .SH "NAME"
  3. \fBnpm-whoami\fR - Display npm username
  4. .SS "Synopsis"
  5. .P
  6. .RS 2
  7. .nf
  8. npm whoami
  9. .fi
  10. .RE
  11. .P
  12. Note: This command is unaware of workspaces.
  13. .SS "Description"
  14. .P
  15. Display the npm username of the currently logged-in user.
  16. .P
  17. 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.
  18. .P
  19. If logged into a registry that uses Basic Auth, then simply print the \fBusername\fR portion of the authentication string.
  20. .SS "Configuration"
  21. .SS "\fBregistry\fR"
  22. .RS 0
  23. .IP \(bu 4
  24. Default: "https://registry.npmjs.org/"
  25. .IP \(bu 4
  26. Type: URL
  27. .RE 0
  28. .P
  29. The base URL of the npm registry.
  30. .SS "See Also"
  31. .RS 0
  32. .IP \(bu 4
  33. npm help config
  34. .IP \(bu 4
  35. npm help npmrc
  36. .IP \(bu 4
  37. npm help adduser
  38. .RE 0