> ## 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                       # print docs entrypoint and example search
openclaw docs <query...>            # search the live docs index
```

| 引數           | 說明                              |
| ------------ | ------------------------------- |
| `[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"}}
# Docs search: <query>

- [Title](https://docs.openclaw.ai/...) - snippet
- [Title](https://docs.openclaw.ai/...) - snippet
```

## 結束代碼

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

## 相關

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