LinuxCommandLibrary

npm-team

Manage npm organization teams and memberships

TLDR

Add a user to a team in an organization

$ npm team add [organization:team] [username]
copy

Remove a user from a team
$ npm team rm [organization:team] [username]
copy

Create a new team in an organization
$ npm team create [organization:team]
copy

Delete a team from an organization
$ npm team destroy [organization:team]
copy

List all teams in an organization
$ npm team ls [organization]
copy

List all users in a specific team
$ npm team ls [organization:team]
copy

SYNOPSIS

npm team create|destroy|add|rm orgname:teamname username
npm team ls orgname:teamname

PARAMETERS

create orgname:teamname
    Creates a new team named teamname within the organization orgname.

destroy orgname:teamname
    Destroys the team named teamname within the organization orgname.

add orgname:teamname username
    Adds the user username to the team teamname within the organization orgname.

rm orgname:teamname username
    Removes the user username from the team teamname within the organization orgname.

ls orgname:teamname
    Lists all members of the team teamname within the organization orgname.

DESCRIPTION

The `npm team` command allows you to manage teams within your npm organization. Teams are used for access control, allowing you to grant specific permissions to groups of users within your organization's packages and scopes. This command lets you create, destroy, add members to, and remove members from teams. You must be an owner of the organization to perform these actions. These actions are crucial for maintaining proper security and collaboration within your npm ecosystem, ensuring that only authorized individuals can publish, modify, or manage specific packages. Proper use of teams can significantly improve workflow and access management, particularly in large organizations or open-source projects with multiple contributors.

CAVEATS

You must be an owner of the organization to use these commands. Teams are only applicable within the scope of an organization. This command requires authentication with the npm registry. Ensure you are logged in using `npm login`.

AUTHENTICATION

All commands require you to be logged in to npm with sufficient permissions (organization owner). Make sure you are logged in using `npm login` before running these commands.

SEE ALSO

npm(1), npm-owner(1), npm-org(1)

Copied to clipboard