npm-view
View package details from the npm registry
TLDR
View information about the latest version of a package
View information about a specific version of a package
View all available versions of a package
View the description of a package
View the dependencies of the latest version of a package
View the repository URL of a package
View the maintainers of a package
SYNOPSIS
npm view <package-name>[@<version>] [<field>]
PARAMETERS
<package-name>
The name of the package to inspect in the npm registry.
[@<version>]
Optional. A specific version or version range of the package to view. If omitted, the latest version is used.
[<field>]
Optional. A specific field or property to retrieve from the package's metadata. Uses dot notation to access nested properties (e.g., `dependencies`, `author.name`).
DESCRIPTION
The `npm view` command retrieves information about a specific package from the npm registry. It allows you to inspect various aspects of a package, such as its version, dependencies, author, repository, and more. This command is invaluable for developers seeking to understand package details without needing to download the entire package.
You can query specific fields, such as `npm view
CAVEATS
Rate limiting by the npm registry may affect the usage of the command. If the registry is unavailable or unreachable, the command will fail.
EXAMPLES
- Get the latest version of `lodash`:
npm view lodash version
- Get the dependencies of `react` version 16.8.0:
npm view react@16.8.0 dependencies
- Get the author's name of `express`:
npm view express author.name
OUTPUT FORMAT
The output format depends on the field specified. If no field is specified, a detailed JSON representation of the package's metadata is returned. If a specific field is specified, the value of that field is returned.
SEE ALSO
npm(1), npm-registry(7), npm-install(1)