Skip to content
NewBun 1.4.5 is out. Release notes
AphrodyBun

Package Manager · Publishing & Analysis

bun info

Display package metadata from the npm registry

bun info displays package metadata from the npm registry.

Usage

bun info react

bun info react prints the package's latest version, description, homepage, dependencies, and other metadata.

Viewing specific versions

To view information about a specific version:

bun info react@18.0.0

A version range or a dist-tag selects the same version that bun add would install. A dist-tag that does not exist is an error:

bun info react@^18 version
bun info react@canary version

Viewing specific properties

To print specific properties from the package metadata:

bun info react version
bun info react dependencies
bun info react repository.url

Property paths use the same grammar as npm view and bun pm pkg. A dot or [index] steps into an object or an array. A name in brackets is taken literally, so it may contain dots. A property name after an array is read from every element:

bun info react maintainers[0].name     # first maintainer's name
bun info react maintainers.name        # every maintainer's name
bun info react dist-tags.latest
bun info react "time[18.0.0]"          # publish time of 18.0.0
bun info react "exports[.].default"

Several properties print one name = value line each. A property that does not exist is skipped; if none of them exists, the command fails.

bun info react name version license

Properties are looked up on the selected version first, then on the registry document for the package (for example dist-tags, time, readme).

JSON output

To get the output in JSON format, use the --json flag:

bun info react --json
bun info react version dist.tarball --json   # {"version": "...", "dist.tarball": "..."}

bun info does not need a package.json. Without a package name it shows the package in the current directory's package.json.

Alias

bun pm view is an alias for bun info:

bun pm view react  # equivalent to: bun info react

Examples

# View basic package information
bun info is-number

# View a specific version
bun info is-number@7.0.0

# View all available versions
bun info is-number versions

# View package dependencies
bun info express dependencies

# View package homepage
bun info lodash homepage

# Get JSON output
bun info react --json