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

# 连接本机与 Studio

在本机启动预览助手后，Studio 可以打开沙箱网页。需要从 Studio 调用本机时，在 macOS 上使用 Studio 提供的连接地址、设备绑定 ID 和令牌建立连接。连接会显示设备名称与架构，可在同一台 Mac 上打开沙箱预览和已安装的 Orca。授权被撤销或握手被拒绝时连接停止，需要新的有效绑定。

> [!WARNING]
>
> local connect 允许所连接的 Studio 以当前 macOS 用户的权限执行 Bash 命令。--directory 只指定起始目录。请使用自己授权的绑定，在环境变量中提供令牌。一次性启动链接和预览请求应来自该 Studio。

## local connect

| 选项 | 说明 | 默认值 |
| - | - | - |
| `--endpoint <url>` | Studio 提供的受信 WSS 地址，本地回环开发地址可使用 WS | — |
| `--binding-id <id>` | Studio 签发的用户与设备绑定 ID | — |
| `--directory <path>` | 每次命令执行的起始工作目录 | — |
| `--token-env <name>` | 保存 Studio 绑定令牌的环境变量名 | AGENTKIT\_LOCAL\_EXECUTION\_TOKEN |

```bash theme={null}
agentkit local connect --endpoint "$STUDIO_ENDPOINT" --binding-id "$BINDING_ID" --directory "$PWD"
```

## local open-orca

| 选项 | 说明 | 默认值 |
| - | - | - |
| `--launch-stdin` | 从标准输入读取 Studio 的一次性启动链接 | 未启用 |

```bash theme={null}
agentkit local open-orca --launch-stdin < studio-launch-url.txt
```

## local open-preview

| 选项 | 说明 | 默认值 |
| - | - | - |
| `--request-stdin` | 从标准输入读取已授权的预览请求 | 未启用 |

```bash theme={null}
agentkit local open-preview --request-stdin < studio-preview.json
```

## local start

| 选项 | 说明 | 默认值 |
| - | - | - |
| `--studio-origin <origin>` | 授权访问的 Studio HTTPS 源地址 | — |

```bash theme={null}
agentkit local start --studio-origin "$STUDIO_ORIGIN"
```

## local serve

| 选项 | 说明 | 默认值 |
| - | - | - |
| `--studio-origin <origin>` | 授权访问的 Studio HTTPS 源地址 | — |

```bash theme={null}
agentkit local serve --studio-origin "$STUDIO_ORIGIN"
```

## local status

此命令无专用选项。

```bash theme={null}
agentkit local status
```

## local stop

此命令无专用选项。

```bash theme={null}
agentkit local stop
```


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