To see information about a JS package, there’s npm-view command.

For example, to see a current version of Dotenv, I can use:

$ npm view dotenv version

I can also use info, show, or v instead of view.

To see all dependencies:

$ npm info dotenv dependencies

To see more info, I don’t need to specify anything else besides the package name:

$ npm info dotenvdotenv@16.0.2 | BSD-2-Clause | deps: none | versions: 68
Loads environment variables from .env file
keywords: dotenv, env, .env, environment, variables, config, settingsdist
.shasum: 0b0f8652c016a3858ef795024508cddc4bffc5bf
.integrity: sha512-JvpYKUmzQhYoIFgK2MOnF3bciIZoItIIoryihy0rIA+H4Jy0FmgyKYAHCTN98P5ybGSJcIFbh6QKeJdtZd1qhA==
.unpackedSize: 34.8 kB
- ~jcblw <>
- scottmotte <>
- motdotla <>
latest: 16.0.2
published 2 weeks ago by motdotla <>

npm-viewcan be sometimes useful in scripts that automate something, so it’s good to know about the command.