npm token create --cidr=192.168.1.0/24

Category: Node.js & npm/yarn

npm token create --cidr=192.168.1.0/24

Create a token limited to an IP range

Issues a registry token that only works from the 192.168.1.0/24 network, limiting damage if the token leaks. The --cidr flag accepts one or several CIDR blocks. Combine it with --read-only for a hardened CI credential.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.