首页 Yarn

npm-orgs

Working with Teams & Orgs

Description

There are three levels of org users:

  1. Super admin, controls billing & adding people to the org.
  2. Team admin, manages team membership & package access.
  3. Developer, works on packages they are given access to.

The super admin is the only person who can add users to the org because it impacts the monthly bill. The super admin will use the website to manage membership. Every org has a developers team that all users are automatically added to.

The team admin is the person who manages team creation, team membership, and package access for teams. The team admin grants package access to teams, not individuals.

The developer will be able to access packages based on the teams they are on. Access is either read-write or read-only.

There are two main commands:

  1. npm team see npm-team for more details
  2. npm access see npm-access for more details

Team Admins create teams

npm team ls <org>:developers
npm team create <org:team>
npm team add <org:team> <user>

Publish a package and adjust package access

npm init --scope=<org>

to scope it for your org & publish as usual

npm access grant <read-only|read-write> <org:team> [<package>]
npm access revoke <org:team> [<package>]

Monitor your package access

npm access ls-packages <org> <user>
npm access ls-packages <org:team>
npm access ls-collaborators <pkg>

See Also

Last modified February 13, 2023           Found a typo? Send a pull request!

快速入门

命令行

npm 用法

配置 npm

故障排除