Skip to main content
bun info 显示来自 npm 注册表的包元数据。

用法

terminal
bun info react
这将显示关于 react 包的信息,包括其最新版本、描述、主页、依赖项等。

查看特定版本

要查看特定版本的信息:
terminal

查看特定属性

你还可以查询包元数据中的特定属性:
terminal
bun info react version
bun info react dependencies
bun info react repository.url

JSON 输出

若要获得 JSON 格式的输出,使用 --json 参数:
terminal
bun info react --json

别名

bun pm viewbun info 的别名:
terminal
bun pm view react  # 等同于: bun info react

示例

terminal
# 查看基本包信息
bun info is-number

# 查看特定版本
bun info [email protected]

# 查看所有可用版本
bun info is-number versions

# 查看包依赖项
bun info express dependencies

# 查看包主页
bun info lodash homepage

# 获取 JSON 输出
bun info react --json