LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

npm-view

View npm registry information for a package

TLDR

View package info
$ npm view [package]
copy
View a specific field
$ npm view [package] version
copy
View all published versions
$ npm view [package] versions
copy
View package dependencies
$ npm view [package] dependencies
copy
View a nested field
$ npm view [package] repository.url
copy
Output as JSON
$ npm view [package] --json
copy
View dist-tags (latest, next, etc.)
$ npm view [package] dist-tags
copy
View a specific version's info
$ npm view [package]@[2.0.0]
copy
View info from a custom registry
$ npm view [package] --registry [https://registry.example.com]
copy

SYNOPSIS

npm view [package[@version]] [field[.subfield]...]

DESCRIPTION

npm view fetches and displays metadata about a package from the npm registry. It shows the full package manifest by default, or specific fields when requested.The command supports nested field access with dot notation (e.g., `repository.url`). When a field contains an array, each element is printed on a separate line. Multiple fields can be specified to show several values at once.Aliases: npm info, npm show.

PARAMETERS

PACKAGE

Package name, optionally with @version or @tag.
FIELD
Top-level field to display (version, dependencies, license, repository, etc.).
FIELD.SUBFIELD
Nested field access (e.g., repository.url, dist.tarball).
versions
List all published versions.
dependencies
Show production dependencies.
dist-tags
Show distribution tags.
--json
Output in JSON format.
--registry url
Query a custom registry URL.

CAVEATS

Requires network access to query the registry. When viewing scoped packages, the scope must be included (e.g., @scope/package). Output format varies between single values and arrays. Private packages require authentication.

HISTORY

npm view has been available since early versions of npm, providing command-line access to the package registry metadata that powers npm's dependency resolution.

SEE ALSO

Copied to clipboard
Kai