> For the complete documentation index, see [llms.txt](https://docs.unitlab.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.unitlab.ai/api-sdk-cli/zh/clis/cli-ontologies-and-cloud-storage.md).

# CLI：本体与云存储

在终端用 Unitlab CLI 管理本体与云存储：按标题或日期筛选、创建和更新本体结构，并浏览 S3、GCS、Azure 云存储连接中的文件。

## 本体 <a href="#ontologies" id="ontologies"></a>

```bash
unitlab ontology list --title-like "Robot" --edited-after 2026-11-01
unitlab ontology detail "$ONTOLOGY_ID" --json > robot-cell-qa.json

unitlab ontology create "Robot cell QA" --description "Grippers and parts" --structure structure.json
unitlab ontology update "$ONTOLOGY_ID" --structure structure.json
```

`--structure` 是一个 JSON 文件，格式与 `OntologyStructure.to_dict()` 输出的相同。可以用 Python 构建，或从 `ontology detail --json` 的 `structure` 字段开始修改。参见 [用 Python 构建本体](https://docs.unitlab.ai/api-sdk-cli/zh/sdks/build-ontologies-in-python.md)。

| `list` 筛选条件                                                                | 匹配内容            |
| -------------------------------------------------------------------------- | --------------- |
| `--title-eq`, `--title-like`                                               | 标题完全匹配或部分匹配     |
| `--description-eq`, `--description-like`                                   | 描述完全匹配或部分匹配     |
| `--created-before`, `--created-after`, `--edited-before`, `--edited-after` | ISO 8601 日期或时间戳 |

## 云存储 <a href="#cloud-storage" id="cloud-storage"></a>

```bash
unitlab cloud list
unitlab cloud browse "$CLOUD_STORAGE_ID" --prefix fleet/cell-04/ --json
```

前缀以 `/` 结尾时列出该文件夹内的内容。`--project` 会按某个项目检查各条目，`--page-size`（1 到 1,000，默认 500）设置每次请求返回的条目数。云存储连接在应用中创建。

使用 `unitlab project import-cloud` 导入文件；参见 [CLI：项目与 Data Unit](https://docs.unitlab.ai/api-sdk-cli/zh/clis/cli-projects-and-data-units.md)。

## 相关内容 <a href="#related" id="related"></a>

[本体资源](https://docs.unitlab.ai/api-sdk-cli/zh/sdks/ontology-resources.md) · [云存储](https://docs.unitlab.ai/api-sdk-cli/zh/sdks/cloud-storage.md)
