1NPM-TOKEN(1)                                                      NPM-TOKEN(1)
2
3
4

NAME

6       npm-token - Manage your authentication tokens
7
8   Synopsis
9           npm token list [--json|--parseable]
10           npm token create [--read-only] [--cidr=1.1.1.1/24,2.2.2.2/16]
11           npm token revoke <id|token>
12
13       Note: This command is unaware of workspaces.
14
15   Description
16       This lets you list, create and revoke authentication tokens.
17
18npm  token  list:  Shows a table of all active authentication tokens.
19         You can request this as JSON with --json or tab-separated values with
20         --parseable.
21
22
23         +--------+---------+------------+----------+----------------+
24         | id     | token   | created    | read-only | CIDR whitelist |
25         +--------+---------+------------+----------+----------------+
26         | 7f3134 | 1fa9ba… | 2017-10-02 | yes      |                |
27         +--------+---------+------------+----------+----------------+
28         | c03241 | af7aef… | 2017-10-02 | no       | 192.168.0.1/24 |
29         +--------+---------+------------+----------+----------------+
30         | e0cf92 | 3a436a… | 2017-10-02 | no       |                |
31         +--------+---------+------------+----------+----------------+
32         | 63eb9d | 74ef35… | 2017-09-28 | no       |                |
33         +--------+---------+------------+----------+----------------+
34         | 2daaa8 | cbad5f… | 2017-09-26 | no       |                |
35         +--------+---------+------------+----------+----------------+
36         | 68c2fe | 127e51… | 2017-09-23 | no       |                |
37         +--------+---------+------------+----------+----------------+
38         | 6334e1 | 1dadd1… | 2017-09-23 | no       |                |
39         +--------+---------+------------+----------+----------------+
40
41npm  token  create [--read-only] [--cidr=<cidr-ranges>]: Create a new
42         authentication token. It can be --read-only, or accept a list of CIDR
43         https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing   ranges
44         with which to limit use of this token. This will prompt you for  your
45         password, and, if you have two-factor authentication enabled, an otp.
46         Currently, the cli can not generate automation tokens.  Please  refer
47         to  the  docs website https://docs.npmjs.com/creating-and-viewing-ac
48         cess-tokens for more information on generating automation tokens.
49
50
51         +----------------+--------------------------------------+
52         | token          | a73c9572-f1b9-8983-983d-ba3ac3cc913d |
53         +----------------+--------------------------------------+
54         | cidr_whitelist |                                      |
55         +----------------+--------------------------------------+
56         | readonly       | false                                |
57         +----------------+--------------------------------------+
58         | created        | 2017-10-02T07:52:24.838Z             |
59         +----------------+--------------------------------------+
60
61npm token revoke <token|id>: Immediately  removes  an  authentication
62         token from the registry.  You will no longer be able to use it.  This
63         can accept both complete tokens (such as those you get back from  npm
64         token create, and those found in your .npmrc), and ids as seen in the
65         parseable or json output of npm token list.  This will NOT accept the
66         truncated token found in the normal npm token list output.
67
68
69   Configuration
70       <!--  AUTOGENERATED  CONFIG  DESCRIPTIONS  START --> <!-- automatically
71       generated, do not edit manually --> <!--  see  lib/utils/config/defini‐
72       tions.js -->
73
74   read-only
75       • Default: false
76
77       • Type: Boolean
78
79
80       This is used to mark a token as unable to publish when configuring lim‐
81       ited access tokens with the npm token create command.   <!--  automati‐
82       cally  generated,  do  not  edit  manually  --> <!-- see lib/utils/con‐
83       fig/definitions.js -->
84
85
86   cidr
87       • Default: null
88
89       • Type: null or String (can be set multiple times)
90
91
92       This is a list of CIDR address to be used when configuring limited  ac‐
93       cess tokens with the npm token create command.  <!-- automatically gen‐
94       erated, do not edit  manually  -->  <!--  see  lib/utils/config/defini‐
95       tions.js -->
96
97
98   registry
99       • Default: "https://registry.npmjs.org/"
100
101       • Type: URL
102
103
104       The base URL of the npm registry.  <!-- automatically generated, do not
105       edit manually --> <!-- see lib/utils/config/definitions.js -->
106
107
108   otp
109       • Default: null
110
111       • Type: null or String
112
113
114       This is a one-time  password  from  a  two-factor  authenticator.  It's
115       needed when publishing or changing package permissions with npm access.
116
117       If  not  set,  and  a  registry  response  fails with a challenge for a
118       one-time password, npm will prompt on the command line for  one.   <!--
119       automatically   generated,   do   not   edit   manually  -->  <!--  see
120       lib/utils/config/definitions.js -->
121
122       <!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
123
124
125   See Also
126       • npm help adduser
127
128       • npm help registry
129
130       • npm help config
131
132       • npm help npmrc
133
134       • npm help owner
135
136       • npm help whoami
137
138       • npm help profile
139
140
141
142
143                                 October 2021                     NPM-TOKEN(1)
Impressum