LinuxCommandLibrary

npm-org

Manage npm organizations and teams

TLDR

Add a new user to an organization

$ npm org set [organization_name] [username]
copy

Change a user's role in an organization
$ npm org set [organization_name] [username] [developer|admin|owner]
copy

Remove a user from an organization
$ npm org rm [organization_name] [username]
copy

List all users in an organization
$ npm org ls [organization_name]
copy

List all users in an organization, output in JSON format
$ npm org ls [organization_name] --json
copy

Display a user's role in an organization
$ npm org ls [organization_name] [username]
copy

SYNOPSIS

npm org [options]

PARAMETERS

set
    Sets the role of a user in an organization. `role` can be 'owner', 'developer', or 'readonly'.

get
    Gets the role of a user in an organization.

rm
    Removes a user from an organization.

ls
    Lists all users in an organization and their roles.

DESCRIPTION

The `npm-org` command allows you to manage npm organizations and teams within the npm registry. It provides functionalities to create, delete, list, and manage members of organizations and teams. Organizations allow you to group packages under a common namespace, making it easier for users to discover and trust your modules. Teams within an organization further allow you to control access to packages and manage permissions for developers collaborating on projects. This command is essential for larger teams and organizations looking to efficiently manage their npm packages and developer access.

This command requires an npm account and you must be logged in using `npm login` before running most commands.

CAVEATS

Many commands related to organization management can also be performed via the npm website. Ensure you have the correct permissions to modify organization members and roles.

ROLES

owner: Has full control over the organization.
developer: Can publish and manage packages within the organization.
readonly: Has read-only access to the organization's packages.

HISTORY

Organization and team management features were introduced to npm to facilitate collaboration and control access to private npm packages. This functionality has evolved over time with enhancements to permission management and reporting capabilities.

SEE ALSO

Copied to clipboard