get-npm-token
v1.0.1
Published
exchange npm credentials for an api token
Downloads
345
Maintainers
Readme
get-npm-token
username, email and password in – token out.
var getToken = require('get-npm-token')
getToken('https://registry.npmjs.org/', 'boennemann', '[email protected]', '***', console.log)
// the-token
npm install -g get-npm-token
get-npm-token
> ? npm registry https://registry.npmjs.org/
> ? npm username? boennemann
> ? npm email [email protected]
> ? npm password ***
> the-token
The CLI securely caches answers in the npm config/os keychain (if available) so a repeated call looks like this:
> ? npm registry (https://registry.npmjs.org/) # prefilled
> ? npm username? (boennemann) # prefilled
> ? npm email ([email protected]) # prefilled
> # no more password required, use -f if you changed it
> another-token