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

# 文件說明

# `openclaw docs`

從終端機搜尋即時 OpenClaw 文件索引。

## 使用方式

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
openclaw docs                       # 顯示文件進入點與搜尋範例
openclaw docs <query...>            # 搜尋即時文件索引
```

| 引數           | 說明                              |
| ------------ | ------------------------------- |
| `[query...]` | 自由格式搜尋查詢。多字詞查詢會以空格連接，並作為單一查詢傳送。 |

未提供查詢時，`openclaw docs` 會顯示文件進入點 URL 與搜尋命令範例，而不執行搜尋。

## 範例

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
openclaw docs browser existing-session
openclaw docs sandbox allowHostControl
openclaw docs gateway token secretref
```

## 運作方式

`openclaw docs` 會呼叫 `https://docs.openclaw.ai/api/search` 並呈現 JSON 結果。搜尋請求使用固定的 30 秒逾時。

## 輸出

在富格式（TTY）終端機中，結果會呈現為標題，後接項目符號清單：頁面標題、含連結的文件 URL，以及下一行的簡短摘錄。沒有結果時會顯示 "No results."。

在非富格式輸出（透過管線傳送、`--no-color`、指令碼）中，相同資料會呈現為 Markdown：

```markdown theme={"theme":{"light":"min-light","dark":"min-dark"}}
# 文件搜尋：<query>

- [標題](https://docs.openclaw.ai/...) - 摘錄
- [標題](https://docs.openclaw.ai/...) - 摘錄
```

## 結束代碼

| 代碼  | 意義                              |
| --- | ------------------------------- |
| `0` | 搜尋成功，包括零結果的回應。                  |
| `1` | 託管文件搜尋 API 呼叫失敗；stderr 會顯示錯誤訊息。 |

## 相關內容

* [命令列介面參考](/zh-TW/cli)
* [即時文件](https://docs.openclaw.ai)
