← 返回 Skills 市场
jhen0409

BRICKS CLI

作者 Jhen-Jie Hong · GitHub ↗ · v0.1.4 · MIT-0
cross-platform ⚠ suspicious
772
总下载
0
收藏
0
当前安装
4
版本数
在 OpenClaw 中安装
/install bricks-cli
功能描述
Manage BRICKS workspace devices, groups, apps, modules, media, and projects via CLI for control, monitoring, updates, and deployments.
使用说明 (SKILL.md)

BRICKS CLI

CLI for BRICKS Workspace API — manage devices, apps, modules, and media.

Scope note: This skill covers cloud API operations (device/app/module/media management) and local-network device interaction (LAN discovery, MCP bridging). The use-desktop-acp rule extends scope further to include bridging with the BRICKS Project Desktop agent, which shares sessions and can execute commands in project context. See the Security section below for details.

Installation (if not yet)

# Validate installed
which bricks

# npm (published by @fugood on npmjs.com — https://www.npmjs.com/package/@fugood/bricks-cli)
npm i -g @fugood/bricks-cli
# Bun
bun add -g @fugood/bricks-cli

Authentication

# Login with one-time passcode (get from https://control.bricks.tools)
bricks auth login \x3Cpasscode>

# Check auth status
bricks auth status

# Switch profiles
bricks auth list
bricks auth use \x3Cprofile>

Global --auth-profile Flag

Use -ap or --auth-profile to override the active profile for any command, without switching the stored profile:

# Run any command as a specific profile
bricks -ap staging device list
bricks --auth-profile production app list

# Also applies to login — saves token to the specified profile
bricks -ap staging auth login \x3Cpasscode>

Priority: --auth-profile flag > BRICKS_PROFILE env > stored current profile.

Device Management

List & Info

# List all devices
bricks device list
bricks device list -j              # JSON output
bricks device list -k "lobby"      # Filter by keyword

# Get device details
bricks device get \x3Cdevice-id>
bricks device get \x3Cdevice-id> -j   # JSON output

Control

# Refresh device (reload app)
bricks device refresh \x3Cdevice-id>

# Clear device cache
bricks device clear-cache \x3Cdevice-id>

# Send control command
bricks device control \x3Cdevice-id> \x3Ctype>
bricks device control \x3Cdevice-id> \x3Ctype> -p '{"key":"value"}'

Screenshot

# Take and save screenshot
bricks device screenshot \x3Cdevice-id>
bricks device screenshot \x3Cdevice-id> -o /tmp/screen.png

# Fetch existing screenshot (no new capture)
bricks device screenshot \x3Cdevice-id> --no-take

Monitor (Interactive-tty needed)

# Monitor all devices (polls every 60s)
bricks device monitor

# Monitor specific group
bricks device monitor -g \x3Cgroup-id>

# Custom interval
bricks device monitor -i 30

Device Groups

# List groups
bricks group list

# Get group details
bricks group get \x3Cgroup-id>

# List devices in group with status
bricks group devices \x3Cgroup-id>

# Dispatch action to all devices in group
bricks group dispatch \x3Cgroup-id> \x3Caction>

# Refresh all devices in group
bricks group refresh \x3Cgroup-id>

# Monitor group
bricks group monitor \x3Cgroup-id>

Applications

# Create a new application
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 \x3Ckey>     # Create from example template
bricks app new -n "My App" --init -y           # Create + initialize local project
bricks app new -n "My App" -j                  # JSON output

# List apps
bricks app list

# Get app details
bricks app get \x3Capp-id>

# Update app
bricks app update \x3Capp-id>

# Validate config against BRICKS schema
bricks app check-config ./config.json
bricks app check-config ./config.json -j       # JSON output

# Bind devices to app
bricks app bind \x3Capp-id>

# Quick property edit
bricks app short-edit \x3Capp-id>

# Pull source files
bricks app project-pull \x3Capp-id>

# Initialize local project from app
bricks app project-init \x3Capp-id>
bricks app project-init \x3Capp-id> -o ./my-app
bricks app project-init \x3Capp-id> -y          # Skip prompts, use defaults
bricks app project-init \x3Capp-id> --no-git    # Skip git init

Modules

# Create a new module
bricks module new -n "My Module"
bricks module new -n "My Module" --public --allow-modify
bricks module new -n "My Module" --init -y     # Create + initialize local project
bricks module new -n "My Module" -j            # JSON output

bricks module list
bricks module get \x3Cmodule-id>
bricks module update \x3Cmodule-id>
bricks module short-edit \x3Cmodule-id>
bricks module release \x3Cmodule-id>

# Initialize local project from module
bricks module project-init \x3Cmodule-id>
bricks module project-init \x3Cmodule-id> -o ./my-module -y

Project Init Options

Both app and module support these flags:

  • -o, --output \x3Cdir> — output directory
  • -y, --yes — skip prompts, use defaults
  • --no-git — skip git initialization
  • --no-install — skip bun install
  • --no-github-actions — skip GitHub Actions workflow
  • --no-agents — skip AGENTS.md
  • --no-claude — skip CLAUDE.md
  • --gemini — include GEMINI.md (off by default)

Media Flow

bricks media boxes              # List media boxes
bricks media box \x3Cbox-id>       # Box details
bricks media files \x3Cbox-id>     # Files in box (shows ready status)
bricks media file \x3Cfile-id>     # File details (shows ready status)

# Upload files to a media box
bricks media upload \x3Cbox-id> ./photo.jpg
bricks media upload \x3Cbox-id> ./img1.jpg ./img2.png      # Multiple files
bricks media upload \x3Cbox-id> ./photos/*.jpg -j           # JSON output

# Upload with tags and description
bricks media upload \x3Cbox-id> ./file.pdf -t docs -t report -d "Monthly report"

# Upload with image processing options
bricks media upload \x3Cbox-id> ./banner.jpg --image-version 250x250:FILL --image-version 800x600:BOUNDED
bricks media upload \x3Cbox-id> ./logo.png --image-version-type png

# Upload with AI analysis
bricks media upload \x3Cbox-id> ./photo.jpg --enable-ai-analysis
bricks media upload \x3Cbox-id> ./photo.jpg --ai-instruction "Describe the scene"

# Control concurrency
bricks media upload \x3Cbox-id> ./files/* --concurrency 5

Config

bricks config show              # Show current config
bricks config endpoint          # Show API endpoint
bricks config endpoint beta     # Switch to beta endpoint

Interactive Mode (Interactive-tty needed)

bricks interactive    # or: bricks i

DevTools (LAN Discovery)

# Scan LAN for DevTools servers via UDP broadcast
bricks devtools scan
bricks devtools scan -t 5000           # Custom timeout (ms)
bricks devtools scan -j                # JSON output
bricks devtools scan --verify          # Verify each server via HTTP

# Show connection URLs for a device
bricks devtools open \x3Caddress>
bricks devtools open \x3Caddress> -p 19853   # Custom port
bricks devtools open \x3Caddress> --verify   # Verify reachable first

Devices must have "Enable LAN Discovery" turned on in Advanced Settings (on by default).

MCP Server

bricks mcp start      # Start MCP server (STDIO mode)

Bridging Device MCP to Local CLI

Use mcporter to bridge a device's MCP endpoint as a local MCP server (STDIO), so tools like Claude Code can connect to it:

# Bridge a device's MCP endpoint (requires passcode as Bearer token)
npx mcporter --url http://\x3Cdevice-ip>:19851/mcp --header "Authorization: Bearer \x3Cpasscode>"

ACP Bridge (BRICKS Project Desktop)

Connect external ACP clients to the running BRICKS Project Desktop (docs).

# Start the bridge (requires BRICKS Project Desktop running with ACP enabled in Settings)
bricks desktop-acp-bridge

The bridge pipes ACP JSON-RPC over stdio ↔ the app's Unix socket (~/.bricks-project-desktop/acp.sock). It shares the app's sessions and MCP state.

Security: Commands executed through the ACP bridge run in the project's working directory. Only enable ACP when actively needed, and prefer --deny-all over --approve-all when automating. See the Security section and rule use-desktop-acp for details.

See rule use-desktop-acp for full usage with acpx and OpenClaw.

Rules

  • connect-local-device — Deploy the current app to a local LAN device, then monitor status, debug, and run automations via MCP
  • use-desktop-acp — Connect to the BRICKS Project Desktop agent via ACP for headless prompting, session management, and multi-agent orchestration

Security

  • Auto-approve risk: Running acpx --approve-all allows the bridged agent to execute bash commands without confirmation. Prefer explicit approval or --deny-all for untrusted prompts. Never combine --approve-all with persistent config in unattended/shared environments.
  • Persistent config: Creating ~/.acpx/config.json enables future ACP sessions without re-specifying the agent. This is convenient but means any process that invokes acpx bricks can start a session with project file access. Remove the config when not actively needed.
  • Device passcodes: LAN device MCP bridging (mcporter) requires passing device passcodes as Bearer tokens. Treat passcodes as secrets — do not log or commit them.
  • LAN discovery: bricks devtools scan broadcasts on the local network. Only run on trusted networks.

Tips

  • Use -j or --json on most commands for JSON output
  • Device IDs are UUIDs — use device list to find them
  • Get workspace token from: https://control.bricks.tools → Workspace Settings → API Token
安全使用建议
This skill appears to be what it claims (a BRICKS CLI) but contains several risky operational steps. Before installing or following the rules: - Verify the npm packages (@fugood/bricks-cli and acpx): check the publisher, star history, source repository, and inspect the package code if possible. No homepage is provided in the skill metadata — that increases risk. - Avoid using acpx --approve-all or any auto-approve flag. Auto-approve allows headless execution of arbitrary bash commands in your project directory. - Do not persistently write ~/.acpx/config.json on shared machines unless you understand and accept the risk; persistent config lets any process using acpx start sessions that access your project files. - Keep ACP disabled in BRICKS Project Desktop except when actively bridging; remove persistent config when done. Rotate passcodes/tokens used for device access. - Run installs and initial tests in an isolated environment (VM/container) or on a non-production machine before trusting them on your workstation or network. - Restrict LAN scans to trusted networks and confirm device workspace IDs to avoid interacting with devices from other workspaces. If you need stronger assurance, request the upstream package source or a link to the project's repo and review its code, or prefer a CLI distributed from a known, verifiable homepage or GitHub org.
功能分析
Type: OpenClaw Skill Name: bricks-cli Version: 0.1.4 The bricks-cli skill bundle provides a comprehensive interface for managing BRICKS workspaces, devices, and applications. While it includes high-risk capabilities such as LAN device discovery, remote device control, and an ACP bridge (bricks desktop-acp-bridge) that allows for arbitrary bash command execution via tools like acpx, these features are well-documented and aligned with the tool's stated purpose. The documentation in SKILL.md and rules/use-desktop-acp.md includes responsible security warnings regarding the risks of auto-approving commands and the use of persistent configurations, suggesting no malicious intent.
能力评估
Purpose & Capability
The name/description (BRICKS CLI for device/app/module/media/project management) aligns with the runtime instructions. The skill explicitly covers both cloud API operations and local LAN/device interactions (discovery, MCP/CDP bridging, and ACP desktop bridging), which is broader than a simple cloud-only CLI but coherent for a device-management tool.
Instruction Scope
SKILL.md instructs the user to scan the LAN for devices, bind devices, bridge to devices via MCP, and to enable and use ACP (Agent Client Protocol) which can run arbitrary bash commands in a project directory. It also documents and normalizes use of acpx --approve-all and writing persistent config (~/.acpx/config.json). Those steps grant local file access and headless command execution that go beyond mere CLI management and can lead to data exposure or arbitrary command execution if misused.
Install Mechanism
There is no packaged install spec in the skill bundle, but SKILL.md instructs installing @fugood/bricks-cli and acpx globally from npmjs.com. Installing global npm packages is expected for a CLI but introduces moderate supply-chain risk (packages published under an unknown owner; skill metadata lacks homepage). No direct downloads or obscure URLs are used in the instructions.
Credentials
The registry metadata declares no required env vars or credentials. Runtime instructions do rely on user-provided passcodes and on saved bricks auth profiles, and they recommend writing ~/.acpx/config.json which grants persistent agent invocation capability. While not requesting unrelated cloud creds, the instructions create persistent local state that could be abused.
Persistence & Privilege
The skill itself is not always-enabled and does not request system-wide privileges, but its recommended workflow includes creating persistent acpx config and enabling ACP in the BRICKS Desktop app, both of which create lasting local access paths (shared sessions, auto-run commands via --approve-all). Those persistence mechanisms increase the blast radius if the installed CLI or acpx agent is compromised or invoked by untrusted processes.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install bricks-cli
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /bricks-cli 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.4
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.
v0.1.3
bricks-cli 0.1.3 - Added rules/use-desktop-acp.md with instructions for connecting to the BRICKS Project Desktop agent via ACP. - Introduced new commands: `bricks app new` and `bricks module new` for creating apps/modules from the CLI, including project initialization options. - Added a global `--auth-profile` (`-ap`) flag to override the active authentication profile for any command. - Expanded `media upload` command with file tagging, image processing, AI analysis, and concurrency options. - Added `bricks desktop-acp-bridge` command to bridge ACP clients to the BRICKS Project Desktop app. - Updated documentation throughout to reflect new features, flags, and usage patterns.
v0.1.2
- Added rules/connect-local-device.md documentation file. - Documented the new "connect-local-device" rule, describing how to deploy to a local LAN device and monitor/control it via MCP. - No changes to core CLI commands; documentation update only.
v0.1.0
Initial release of bricks-cli — a CLI tool for managing the [BRICKS](https://bricks.tools) workspace. - Manage devices: list, control, screenshot, monitor, and clear cache. - Control device groups: batch actions, monitoring, and refresh. - Full application and module management: list, update, bind, edit, project init/pull. - Media file and box commands for digital signage workflows. - Support for interactive mode and local DevTools LAN discovery. - Project initialization with many customization flags. - MCP server start and bridge instructions for developer workflows.
元数据
Slug bricks-cli
版本 0.1.4
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 4
常见问题

BRICKS CLI 是什么?

Manage BRICKS workspace devices, groups, apps, modules, media, and projects via CLI for control, monitoring, updates, and deployments. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 772 次。

如何安装 BRICKS CLI?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install bricks-cli」即可一键安装,无需额外配置。

BRICKS CLI 是免费的吗?

是的,BRICKS CLI 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

BRICKS CLI 支持哪些平台?

BRICKS CLI 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 BRICKS CLI?

由 Jhen-Jie Hong(@jhen0409)开发并维护,当前版本 v0.1.4。

💬 留言讨论