> ## Documentation Index
> Fetch the complete documentation index at: https://bun.ll1025.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# bun info

> 显示来自 npm 注册表的包元数据

`bun info` 从 npm 注册表显示包元数据。

## 用法

```bash terminal icon="terminal" theme={null}
bun info react
```

`bun info react` 打印包的最新版本、描述、主页、依赖关系和其他元数据。

## 查看特定版本

要查看特定版本的信息：

```bash terminal icon="terminal" theme={null}
bun info react@18.0.0
```

## 查看特定属性

要从包元数据中打印特定属性：

```bash terminal icon="terminal" theme={null}
bun info react version
bun info react dependencies
bun info react repository.url
```

## JSON 输出

要以 JSON 格式获取输出，请使用 `--json` 标志：

```bash terminal icon="terminal" theme={null}
bun info react --json
```

## 别名

`bun pm view` 是 `bun info` 的别名：

```bash terminal icon="terminal" theme={null}
bun pm view react  # 等效于：bun info react
```

## 示例

```bash terminal icon="terminal" theme={null}
# 查看基本包信息
bun info is-number

# 查看特定版本
bun info is-number@7.0.0

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

# 查看包依赖
bun info express dependencies

# 查看包主页
bun info lodash homepage

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