返回顶部
b

bricks-cliBRICKS-CLI管理

Manage BRICKS workspace via CLI. Use for device status, screenshots, control, monitoring, group operations, application management, module management, project initialization and deployment, scanning and connecting local BRICKS Foundation devices on LAN, and creating BRICKS applications via BRICKS Project Desktop agent through ACP. Triggers on: device management, digital signage control, BRICKS workspace tasks, app/module updates, project setup, LAN device discovery, ACP bridge, desktop agent.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 0.1.4
安全检测
已通过
762
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

bricks-cli

BRICKS CLI

BRICKS Workspace API的CLI工具——管理设备、应用、模块和媒体。

范围说明: 此技能涵盖云API操作(设备/应用/模块/媒体管理)以及本地网络设备交互(LAN发现、MCP桥接)。use-desktop-acp规则进一步扩展范围,包括与BRICKS Project Desktop代理的桥接,该代理共享会话并可在项目上下文中执行命令。详情请参阅下方安全章节。

安装(如尚未安装)

bash

验证是否已安装


which bricks

npm(由@fugood在npmjs.com发布 — https://www.npmjs.com/package/@fugood/bricks-cli)

npm i -g @fugood/bricks-cli

Bun

bun add -g @fugood/bricks-cli

身份认证

bash

使用一次性密码登录(从 https://control.bricks.tools 获取)


bricks auth login

查看认证状态

bricks auth status

切换配置文件

bricks auth list bricks auth use

全局 --auth-profile 标志

使用 -ap 或 --auth-profile 可为任何命令覆盖当前激活的配置文件,而无需切换已存储的配置文件:

bash

以特定配置文件运行任何命令


bricks -ap staging device list
bricks --auth-profile production app list

同样适用于登录 — 将令牌保存到指定配置文件

bricks -ap staging auth login

优先级:--auth-profile 标志 > BRICKS_PROFILE 环境变量 > 已存储的当前配置文件。

设备管理

列表与信息

bash

列出所有设备


bricks device list
bricks device list -j # JSON输出
bricks device list -k lobby # 按关键词筛选

获取设备详情

bricks device get bricks device get -j # JSON输出

控制

bash

刷新设备(重新加载应用)


bricks device refresh

清除设备缓存

bricks device clear-cache

发送控制命令

bricks device control bricks device control -p {key:value}

截图

bash

截取并保存截图


bricks device screenshot
bricks device screenshot -o /tmp/screen.png

获取已有截图(不重新截取)

bricks device screenshot --no-take

监控(需要交互式终端)

bash

监控所有设备(每60秒轮询)


bricks device monitor

监控特定分组

bricks device monitor -g

自定义间隔

bricks device monitor -i 30

设备分组

bash

列出分组


bricks group list

获取分组详情

bricks group get

列出分组内设备及其状态

bricks group devices

向分组内所有设备发送操作指令

bricks group dispatch

刷新分组内所有设备

bricks group refresh

监控分组

bricks group monitor

应用

bash

创建新应用


bricks app new -n My App
bricks app new -n My App -d Description --layout-width 192 --layout-height 108
bricks app new -n My App --example # 从示例模板创建
bricks app new -n My App --init -y # 创建并初始化本地项目
bricks app new -n My App -j # JSON输出

列出应用

bricks app list

获取应用详情

bricks app get

更新应用

bricks app update

根据BRICKS模式验证配置

bricks app check-config ./config.json bricks app check-config ./config.json -j # JSON输出

绑定设备到应用

bricks app bind

快速属性编辑

bricks app short-edit

拉取源文件

bricks app project-pull

从应用初始化本地项目

bricks app project-init bricks app project-init -o ./my-app bricks app project-init -y # 跳过提示,使用默认值 bricks app project-init --no-git # 跳过git初始化

模块

bash

创建新模块


bricks module new -n My Module
bricks module new -n My Module --public --allow-modify
bricks module new -n My Module --init -y # 创建并初始化本地项目
bricks module new -n My Module -j # JSON输出

bricks module list
bricks module get
bricks module update
bricks module short-edit
bricks module release

从模块初始化本地项目

bricks module project-init bricks module project-init -o ./my-module -y

项目初始化选项

app 和 module 均支持以下标志:

  • - -o, --output — 输出目录
  • -y, --yes — 跳过提示,使用默认值
  • --no-git — 跳过git初始化
  • --no-install — 跳过 bun install
  • --no-github-actions — 跳过GitHub Actions工作流
  • --no-agents — 跳过AGENTS.md
  • --no-claude — 跳过CLAUDE.md
  • --gemini — 包含GEMINI.md(默认不包含)

媒体流

bash
bricks media boxes # 列出媒体盒
bricks media box # 媒体盒详情
bricks media files # 媒体盒中的文件(显示就绪状态)
bricks media file # 文件详情(显示就绪状态)

上传文件到媒体盒

bricks media upload ./photo.jpg bricks media upload ./img1.jpg ./img2.png # 多个文件 bricks media upload ./photos/*.jpg -j # JSON输出

带标签和描述上传

bricks media upload ./file.pdf -t docs -t report -d Monthly report

带图像处理选项上传

bricks media upload ./banner.jpg --image-version 250x250:FILL --image-version 800x600:BOUNDED bricks media upload ./logo.png --image-version-type png

带AI分析上传

bricks media upload ./photo.jpg --enable-ai-analysis bricks media upload ./photo.jpg --ai-instruction Describe the scene

控制并发数

bricks media upload ./files/* --concurrency 5

配置

bash
bricks config show # 显示当前配置
bricks config endpoint # 显示API端点
bricks config endpoint beta # 切换到beta端点

交互模式(需要交互式终端)

bash
bricks interactive # 或:bricks i

DevTools(LAN发现)

bash

通过UDP广播扫描LAN中的DevTools服务器


bricks devtools scan
bricks devtools scan -t 5000 # 自定义超时(毫秒)
bricks devtools scan -j # JSON输出
bricks devtools scan --verify # 通过HTTP验证每个服务器

显示设备的连接URL

bricks devtools open
bricks devtools open
-p 19853 # 自定义端口 bricks devtools open
--verify # 先验证是否可达

设备必须在高级设置中开启启用LAN发现(默认开启)。

MCP服务器

bash
bricks mcp start # 启动MCP服务器(STDIO模式)

桥接设备MCP到本地CLI

使用mcporter将设备的MCP端点桥接为本地MCP服务器(STDIO),使Claude Code等工具可以连接到它:

bash

桥接设备的MCP端点(需要密码作为Bearer令牌)


npx mcporter --url http://:19851/mcp --header Authorization: Bearer

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 bricks-cli-1776419959 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 bricks-cli-1776419959 技能

通过命令行安装

skillhub install bricks-cli-1776419959

下载

⬇ 下载 bricks-cli v0.1.4(免费)

文件大小: 7.07 KB | 发布时间: 2026-4-17 19:51

v0.1.4 最新 2026-4-17 19:51
bricks-cli 0.1.4 changelog

- Expanded description and skill scope to explicitly cover local network device discovery, LAN operations, ACP (agent communication protocol) bridging, and integration with the BRICKS Project Desktop agent.
- Updated documentation to clarify capabilities for scanning/connecting to local BRICKS Foundation devices on LAN and creating applications via the desktop agent.
- Included additional triggers for LAN device discovery, ACP bridge operations, and desktop agent interactions.
- No functional or code changes—documentation and metadata improvements only.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部