npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

package-json-cli

4.1.0

@sindresorhus

npmHomeRepoSnykSocket
Downloads:0
$ npm install package-json-cli
DailyWeeklyMonthlyYearly

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 latest 1.x.x
  • 1.2 - get the latest 1.2.x
  • ^1.2.3 - get the latest 1.x.x but at least 1.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