npm-team.1 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. .TH "NPM\-TEAM" "1" "October 2021" "" ""
  2. .SH "NAME"
  3. \fBnpm-team\fR \- Manage organization teams and team memberships
  4. .SS Synopsis
  5. .P
  6. .RS 2
  7. .nf
  8. npm team create <scope:team>
  9. npm team destroy <scope:team>
  10. npm team add <scope:team> <user>
  11. npm team rm <scope:team> <user>
  12. npm team ls <scope>|<scope:team>
  13. .fi
  14. .RE
  15. .P
  16. Note: This command is unaware of workspaces\.
  17. .SS Description
  18. .P
  19. Used to manage teams in organizations, and change team memberships\. Does not
  20. handle permissions for packages\.
  21. .P
  22. Teams must always be fully qualified with the organization/scope they belong to
  23. when operating on them, separated by a colon (\fB:\fP)\. That is, if you have a
  24. \fBnewteam\fP team in an \fBorg\fP organization, you must always refer to that team
  25. as \fB@org:newteam\fP in these commands\.
  26. .P
  27. If you have two\-factor authentication enabled in \fBauth\-and\-writes\fP mode, then
  28. you can provide a code from your authenticator with \fB[\-\-otp <otpcode>]\fP\|\.
  29. If you don't include this then you will be prompted\.
  30. .RS 0
  31. .IP \(bu 2
  32. create / destroy:
  33. Create a new team, or destroy an existing one\. Note: You cannot remove the
  34. \fBdevelopers\fP team, <a href="https://docs\.npmjs\.com/about\-developers\-team" target="_blank">learn more\.</a>
  35. Here's how to create a new team \fBnewteam\fP under the \fBorg\fP org:
  36. .P
  37. .RS 2
  38. .nf
  39. npm team create @org:newteam
  40. .fi
  41. .RE
  42. You should see a confirming message such as: \fB+@org:newteam\fP once the new
  43. team has been created\.
  44. .IP \(bu 2
  45. add:
  46. Add a user to an existing team\.
  47. Adding a new user \fBusername\fP to a team named \fBnewteam\fP under the \fBorg\fP org:
  48. .P
  49. .RS 2
  50. .nf
  51. npm team add @org:newteam username
  52. .fi
  53. .RE
  54. On success, you should see a message: \fBusername added to @org:newteam\fP
  55. .IP \(bu 2
  56. rm:
  57. Using \fBnpm team rm\fP you can also remove users from a team they belong to\.
  58. Here's an example removing user \fBusername\fP from \fBnewteam\fP team
  59. in \fBorg\fP organization:
  60. .P
  61. .RS 2
  62. .nf
  63. npm team rm @org:newteam username
  64. .fi
  65. .RE
  66. Once the user is removed a confirmation message is displayed:
  67. \fBusername removed from @org:newteam\fP
  68. .IP \(bu 2
  69. ls:
  70. If performed on an organization name, will return a list of existing teams
  71. under that organization\. If performed on a team, it will instead return a list
  72. of all users belonging to that particular team\.
  73. Here's an example of how to list all teams from an org named \fBorg\fP:
  74. .P
  75. .RS 2
  76. .nf
  77. npm team ls @org
  78. .fi
  79. .RE
  80. Example listing all members of a team named \fBnewteam\fP:
  81. .P
  82. .RS 2
  83. .nf
  84. npm team ls @org:newteam
  85. .fi
  86. .RE
  87. .RE
  88. .SS Details
  89. .P
  90. \fBnpm team\fP always operates directly on the current registry, configurable from
  91. the command line using \fB\-\-registry=<registry url>\fP\|\.
  92. .P
  93. You must be a \fIteam admin\fR to create teams and manage team membership, under
  94. the given organization\. Listing teams and team memberships may be done by
  95. any member of the organization\.
  96. .P
  97. Organization creation and management of team admins and \fIorganization\fR members
  98. is done through the website, not the npm CLI\.
  99. .P
  100. To use teams to manage permissions on packages belonging to your organization,
  101. use the \fBnpm access\fP command to grant or revoke the appropriate permissions\.
  102. .SS Configuration
  103. <!\-\- AUTOGENERATED CONFIG DESCRIPTIONS START \-\->
  104. <!\-\- automatically generated, do not edit manually \-\->
  105. <!\-\- see lib/utils/config/definitions\.js \-\->
  106. .SS \fBregistry\fP
  107. .RS 0
  108. .IP \(bu 2
  109. Default: "https://registry\.npmjs\.org/"
  110. .IP \(bu 2
  111. Type: URL
  112. .RE
  113. .P
  114. The base URL of the npm registry\.
  115. <!\-\- automatically generated, do not edit manually \-\->
  116. <!\-\- see lib/utils/config/definitions\.js \-\->
  117. .SS \fBotp\fP
  118. .RS 0
  119. .IP \(bu 2
  120. Default: null
  121. .IP \(bu 2
  122. Type: null or String
  123. .RE
  124. .P
  125. This is a one\-time password from a two\-factor authenticator\. It's needed
  126. when publishing or changing package permissions with \fBnpm access\fP\|\.
  127. .P
  128. If not set, and a registry response fails with a challenge for a one\-time
  129. password, npm will prompt on the command line for one\.
  130. <!\-\- automatically generated, do not edit manually \-\->
  131. <!\-\- see lib/utils/config/definitions\.js \-\->
  132. .SS \fBparseable\fP
  133. .RS 0
  134. .IP \(bu 2
  135. Default: false
  136. .IP \(bu 2
  137. Type: Boolean
  138. .RE
  139. .P
  140. Output parseable results from commands that write to standard output\. For
  141. \fBnpm search\fP, this will be tab\-separated table format\.
  142. <!\-\- automatically generated, do not edit manually \-\->
  143. <!\-\- see lib/utils/config/definitions\.js \-\->
  144. .SS \fBjson\fP
  145. .RS 0
  146. .IP \(bu 2
  147. Default: false
  148. .IP \(bu 2
  149. Type: Boolean
  150. .RE
  151. .P
  152. Whether or not to output JSON data, rather than the normal output\.
  153. .RS 0
  154. .IP \(bu 2
  155. In \fBnpm pkg set\fP it enables parsing set values with JSON\.parse() before
  156. saving them to your \fBpackage\.json\fP\|\.
  157. .RE
  158. .P
  159. Not supported by all npm commands\.
  160. <!\-\- automatically generated, do not edit manually \-\->
  161. <!\-\- see lib/utils/config/definitions\.js \-\->
  162. <!\-\- AUTOGENERATED CONFIG DESCRIPTIONS END \-\->
  163. .SS See Also
  164. .RS 0
  165. .IP \(bu 2
  166. npm help access
  167. .IP \(bu 2
  168. npm help config
  169. .IP \(bu 2
  170. npm help registry
  171. .RE