Files
tldr/pages/common/npm-adduser.md
T
1b6873e4eb *: remove usage of "foobar" (#19242)
* *: remove usage of "foobar"

* mlr: update example

* Apply suggestions from code review

Co-authored-by: Dylan <145150333+dmmqz@users.noreply.github.com>

* Update pages/common/npm-adduser.md

Co-authored-by: Managor <42655600+Managor@users.noreply.github.com>

---------

Co-authored-by: Dylan <145150333+dmmqz@users.noreply.github.com>
Co-authored-by: Managor <42655600+Managor@users.noreply.github.com>
2025-11-09 10:31:27 +02:00

573 B

npm adduser

Add a registry user account. More information: https://docs.npmjs.com/cli/npm-adduser.

  • Create a new user in the specified registry and save credentials to .npmrc:

npm adduser --registry {{registry_url}}

  • Log in to a private registry with a specific scope:

npm login --scope {{@organization}} --registry {{https://registry.example.com}}

  • Log out from a specific scope and remove the auth token:

npm logout --scope {{@organization}}

  • Create a scoped package during initialization:

npm init --scope {{@organization}} {{[-y|--yes]}}