LPM CLI

lpm info

Inspect package versions, dependencies, integrity, and current registry metadata.

Inspect a package before you install it or choose a version.

lpm info [OPTIONS] <PACKAGE>
lpm info <PACKAGE>@<VERSION>
lpm info <PACKAGE> --version <PACKAGE_VERSION>

Quickstart

lpm info react
lpm info react@19.0.0
lpm info react --version next

The command has human and JSON output modes. It has no subcommands.

LPM CLI supports npm, private registries, and the LPM.dev Registry. Package names that start with @lpm.dev/ always use the LPM.dev Registry.

Examples

# Inspect the default version
lpm info react

# Inspect a specific version
lpm info react@19.0.0

# Select the highest version that matches a range
lpm info 'react@^19'

# Inspect a private-registry package
lpm info @my-co/internal

# Inspect an LPM.dev Registry package
lpm info @lpm.dev/alice.highlight

# Produce structured output without prompts
lpm info react@19.0.0 --json | jq '.versions[.selected_version].dependencies'

# Show metadata cache diagnostics
lpm --verbose info react

Registry configuration

Info has no lpm.json configuration. Registry routing and npm credentials come from .npmrc.

~/.npmrc
registry=https://registry.npmjs.org/
@my-co:registry=https://packages.example.com/npm/
//packages.example.com/npm/:_authToken=${PRIVATE_NPM_TOKEN}

On macOS and Linux, restrict access to the file:

chmod 600 ~/.npmrc
lpm info @my-co/internal --json

Environment-backed credentials belong in user configuration. Project-local environment interpolation for credentials is refused.

Package nameDestination
@lpm.dev/<owner>.<name>The LPM.dev Registry. .npmrc cannot override this scope.
@scope/pkg with a registry mappingThe registry configured for that scope.
@jsr/... without a scope mappinghttps://npm.jsr.io.
Other namesThe default .npmrc registry, or npmjs.org.

Configuration merges global and user .npmrc files, then the selected project or workspace-root file. See registry configuration.

The global --registry <URL> flag changes the LPM.dev Registry endpoint. It does not override the default npm registry or a scope mapping.

Registry URLs can include a path prefix. Info rejects URLs with a query string or fragment.

Npm-compatible reads use matching .npmrc credentials. LPM.dev Registry reads use your LPM.dev Registry token or session when available.

See authentication for credential sources and private-package access.

Version selection

Without a selector, the command uses dist-tags.latest, then the registry's legacy latestVersion value.

An explicit selector can be an exact version, a dist-tag such as next, or a semantic-version range. Quote ranges that contain shell operators.

lpm info react --version next
lpm info 'react@>=18 <20'

The command resolves a tag first, then an exact version, then the highest version that matches the range.

Use either an inline selector or --version. Supplying both is an error.

A requested version that does not exist fails in both output modes. Dangling tags and unmatched ranges also fail. A selected version must agree with its entry in the registry metadata.

With no selector and no default version, the command returns a package overview without selected-version details. It does not choose the highest version automatically.

Human output

The report includes the package name and description. Available fields for the selected version include:

FieldMeaning
versionThe selected version.
ecosystemThe package ecosystem, when supplied.
integrityThe integrity hash, with a legacy shasum fallback. Long values appear shortened.
dependenciesRegular dependencies and their declared ranges.
peer dependenciesPeer dependencies and their declared ranges.
publishedThe selected version's publication time, when supplied.

The report also lists available versions. Distribution and download totals appear when supplied.

Optional and development dependencies remain available in JSON when the registry supplies them. They do not appear in the human dependency sections.

JSON output

--json returns normalized metadata with success, selected_version, and _cache diagnostics.

# Read the selected version
lpm info react@19.0.0 --json | jq '.selected_version'

# Read all available versions
lpm info react --json | jq '.versions | keys'

# Read the selected version's full metadata
lpm info react@19.0.0 --json | jq '.versions[.selected_version]'

selected_version is a version string. It is null when no selector was supplied and the registry has no default version. The complete versions object remains available after explicit selection.

The JSON output preserves supported metadata fields. It does not return the raw registry response. Unsupported fields, including top-level README and maintainer data, are omitted.

Freshness and cache diagnostics

The command requests current metadata on every run. A cached ETag permits conditional revalidation.

If the registry returns HTTP 304, LPM CLI uses the cached response body. A failed revalidation does not become a successful stale response.

For example, _cache can contain:

{
  "status": "revalidated",
  "age_seconds": 143,
  "network_request": true,
  "not_modified": true
}

age_seconds can be null. After HTTP 304, it describes the cached response's age before revalidation.

Install and resolution commands can reuse metadata for up to five minutes. Registry cache directives can shorten or disable that reuse.

Info has no offline mode. --verbose shows cache diagnostics in human output.

Troubleshooting

ResultAction
Package not foundCheck the package name, registry mapping, and private-package access.
Version or tag not foundRemove the selector and use --json to inspect .versions and ."dist-tags". A dangling default requires a registry metadata fix.
No default versionChoose an explicit version from the package overview.
Inconsistent selected versionCheck the registry or mirror's metadata.
Two version selectorsUse either package@version or --version, then repeat the command.
Npm authentication failureCorrect the matching .npmrc credential and token permissions.
Registry or network failureCorrect the connection or credentials, then repeat the request.

Flags

FlagDescription
--version <PACKAGE_VERSION>Select an exact version, tag, or range. Conflicts with an inline selector.

The command also supports the global flags, including --json, --verbose, --registry, and --cwd.

See also