package-json-cli
Get the package.json of a package from the npm registry
Install
npm install --global package-json-cli
Usage
$ package-json --help
Usage
$ package-json <name> [version=latest]
Options
--full-metadata Output full package metadata
--all-versions Output all versions
--registry-url Custom registry URL
--no-deprecated Omit deprecated versions
Example
$ package-json ava
{
"name": "ava",
"version": "6.1.1"
…
}
The version
can be in any format supported by the semver module. For example:
-
1
- get the latest1.x.x
-
1.2
- get the latest1.2.x
-
^1.2.3
- get the latest1.x.x
but at least1.2.3
Dist tags (such as latest
) are also supported.
Related
- package-json - API for this module
- latest-version-cli - Get the latest version of an npm package