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

# 沙箱列表

> 按照 PPIO 归档文档通过 CLI 查询沙箱列表，了解该版本的命令行操作方式，为查看既有沙箱资源提供参考。

### 列出所有沙箱

要列出所有沙箱，请使用以下命令：

```bash Bash icon="terminal" theme={null}
ppio-sandbox-cli sandbox list
```

这将返回包括正在运行的和暂停的所有沙箱。

### 按状态过滤

要按沙箱状态过滤，您可以指定 `--state` 标志，可以是 `running`、`paused` 或同时指定。

```bash Bash icon="terminal" theme={null}
# 列出正在运行和暂停的沙箱
ppio-sandbox-cli sandbox list --state running,paused
# 列出正在运行的沙箱
ppio-sandbox-cli sandbox list --state running
# 列出暂停的沙箱
ppio-sandbox-cli sandbox list --state paused
```

### 按元数据过滤

要按沙箱元数据过滤沙箱，请使用 `--metadata` 标志。

```bash Bash icon="terminal" theme={null}
ppio-sandbox-cli sandbox list --metadata key1=value1,key2=value2
```

### 限制返回的数量

要限制命令返回的沙箱数量，请使用 `--limit` 标志。

```bash Bash icon="terminal" theme={null}
ppio-sandbox-cli sandbox list --limit 10
```

默认情况下，该命令将返回所有沙箱。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.