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

# browser

# `openclaw browser`

管理 OpenClaw 的浏览器控制服务器并运行浏览器操作（标签页、快照、截图、导航、点击、输入）。

相关文档：

* 浏览器工具 + API：[Browser tool](/docs/tools/browser)
* Chrome 扩展中继：[Chrome extension](/docs/tools/chrome-extension)

## 常用标志

* `--url <gatewayWsUrl>`：Gateway WebSocket URL（默认从配置读取）。
* `--token <token>`：Gateway 令牌（如需要）。
* `--timeout <ms>`：请求超时（毫秒）。
* `--browser-profile <name>`：选择浏览器配置文件（默认从配置读取）。
* `--json`：机器可读输出（在支持的命令中）。

## 快速开始（本地）

```bash theme={null}
openclaw browser --browser-profile chrome tabs
openclaw browser --browser-profile openclaw start
openclaw browser --browser-profile openclaw open https://example.com
openclaw browser --browser-profile openclaw snapshot
```

## 配置文件

配置文件是命名的浏览器路由配置。实际使用中：

* `openclaw`：启动/附加到专用的 OpenClaw 管理的 Chrome 实例（隔离的用户数据目录）。
* `chrome`：通过 Chrome 扩展中继控制您现有的 Chrome 标签页。

```bash theme={null}
openclaw browser profiles
openclaw browser create-profile --name work --color "#FF5A36"
openclaw browser delete-profile --name work
```

使用特定配置文件：

```bash theme={null}
openclaw browser --browser-profile work tabs
```

## 标签页

```bash theme={null}
openclaw browser tabs
openclaw browser open https://docs.openclaw.ai
openclaw browser focus <targetId>
openclaw browser close <targetId>
```

## 快照 / 截图 / 操作

快照：

```bash theme={null}
openclaw browser snapshot
```

截图：

```bash theme={null}
openclaw browser screenshot
```

导航/点击/输入（基于引用的 UI 自动化）：

```bash theme={null}
openclaw browser navigate https://example.com
openclaw browser click <ref>
openclaw browser type <ref> "hello"
```

## Chrome 扩展中继（通过工具栏按钮附加）

此模式允许代理控制您手动附加的现有 Chrome 标签页（不会自动附加）。

将解压后的扩展安装到稳定路径：

```bash theme={null}
openclaw browser extension install
openclaw browser extension path
```

然后在 Chrome 中打开 `chrome://extensions` → 启用"开发者模式" → "加载已解压的扩展程序" → 选择打印的文件夹。

完整指南：[Chrome extension](/docs/tools/chrome-extension)

## 远程浏览器控制（节点主机代理）

如果 Gateway 运行在不同于浏览器的机器上，请在拥有 Chrome/Brave/Edge/Chromium 的机器上运行**节点主机**。Gateway 将代理浏览器操作到该节点（无需单独的浏览器控制服务器）。

使用 `gateway.nodes.browser.mode` 控制自动路由，使用 `gateway.nodes.browser.node` 在多个连接节点中固定特定节点。

安全 + 远程设置：[Browser tool](/docs/tools/browser)、[Remote access](/docs/gateway/remote)、[Tailscale](/docs/gateway/tailscale)、[Security](/docs/gateway/security)
