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

# BRICKS CLI

> BRICKS Workspace API 的命令列介面

[BRICKS](https://bricks.tools) CLI 是管理 BRICKS 工作區的命令列工具，可直接於終端機中完整控制 BRICKS Foundation 裝置、應用程式、模組與媒體。

## 您能做什麼

* **管理 BRICKS Foundation** —列出、監控、控制、擷取截圖，並派送群組動作（請參閱 [BRICKS Foundation](/zh-Hant/foundation) 進行裝置設定）
* **建置應用程式** —建立、更新、發行並部署 BRICKS 應用
* **管理模組** —建立可重複使用的模組並管理其生命週期
* **上傳媒體** —將檔案上傳至 Media Flow，並搭配標籤、AI 分析與影像處理
* **初始化專案** —由既有的應用或模組生成 bricks-ctor 專案
* **互動模式** —以終端機 UI 瀏覽並操控工作區
* **DevTools** —於區域網路探索裝置、檢視 brick 元件、擷取截圖、模擬輸入、監控網路活動，並透過 CDP 檢視儲存資料
* **配對 Buttress 伺服器** —將 [BRICKS Buttress](/zh-Hant/buttress) 伺服器繫結至工作區並核發 access token
* **MCP 伺服器** —透過 Model Context Protocol 將工作區工具開放給 AI 代理使用

## 安裝

使用一行指令安裝原生單一執行檔：

<CodeGroup>
  ```bash macOS / Linux theme={null}
  curl -fsSL https://cdn.bricks.tools/bricks-cli/release/install.sh | sh
  ```

  ```powershell Windows theme={null}
  irm https://cdn.bricks.tools/bricks-cli/release/install.ps1 | iex
  ```
</CodeGroup>

如需直接下載、npm/Bun 安裝與 beta 通道的選項，請參閱[安裝指南](/zh-Hant/cli/installation)。

## 快速開始

```bash theme={null}
# 使用 BRICKS Controller 的一次性通行碼登入
bricks auth login <passcode>

# 列出您的 BRICKS Foundation 裝置
bricks device list

# 列出您的應用程式
bricks app list

# 啟動互動模式
bricks interactive
```

## 下一步

<CardGroup cols={2}>
  <Card title="安裝" icon="download" href="/zh-Hant/cli/installation">
    於 macOS、Linux 或 Windows 上安裝 CLI。
  </Card>

  <Card title="驗證" icon="key" href="/zh-Hant/cli/authentication">
    設定設定檔並管理工作區認證。
  </Card>

  <Card title="指令參考" icon="book" href="/zh-Hant/cli/commands">
    每個 CLI 指令與選項的完整參考。
  </Card>
</CardGroup>
