@fugood/bricks-cli 2.26.0-beta.3 → 2.26.0-beta.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -170,9 +170,18 @@ bricks device list [-k keyword] [-j|--json]
170
170
  # Resolve a device name or ID
171
171
  bricks device resolve <query> [-l limit] [-j|--json]
172
172
 
173
- # Get device details
173
+ # Get device details (incl. stored Lock, Activity Log and Local Sync settings)
174
174
  bricks device get <device-id> [-j|--json]
175
175
 
176
+ # Update device settings (only the given settings change; other ENV variables are kept)
177
+ bricks device update <device-id> [-n name] [-d description] [--tags a,b] [--dry-run] [-j|--json]
178
+ bricks device update <device-id> [-e KEY=VALUE ...] [--env-json '{"KEY":"value"}'] [--unset-env KEY ...]
179
+ bricks device update <device-id> [--[no-]activity-log] [--activity-log-filter filter] [--[no-]activity-log-screenshot]
180
+ bricks device update <device-id> [--[no-]local-sync] [--local-sync-priority 0-9] [--[no-]local-sync-dynamic-latency] [--local-sync-latency-offset ms]
181
+ bricks device update <device-id> --lock | --unlock
182
+ # --lock / --unlock run alone. A locked device refuses other updates: unlock it first.
183
+ # ENV changes reach the running app after `bricks device refresh <device-id>` (not automatic).
184
+
176
185
  # Bind a new device with passcode
177
186
  bricks device bind <passcode> [-n device-name]
178
187
  bricks device bind <passcode> [--dry-run] [-j|--json]
@@ -206,8 +215,8 @@ bricks app resolve <query> [-l limit] [-j|--json]
206
215
  # Get application details
207
216
  bricks app get <app-id> [-c|--composed] [-j|--json]
208
217
 
209
- # Update application
210
- bricks app update <app-id> [-n name] [-d description] [-c config-json] [-f config-file] [--validate]
218
+ # Update application (`-t ''` clears the tags; a locked application refuses all changes until --unlock)
219
+ bricks app update <app-id> [-n name] [-d description] [-t tags] [--lock|--unlock] [-c config-json] [-f config-file] [--validate]
211
220
 
212
221
  # Short edit application (requires valid shortIds from app config)
213
222
  bricks app short-edit <app-id> -l '[{"shortId":"<subspace-short-id>","path":"property.name","content":"value"}]'
@@ -215,16 +224,39 @@ bricks app short-edit <app-id> -l '[{"shortId":"<subspace-short-id>","path":"pro
215
224
  # Bind/unbind devices
216
225
  bricks app bind <app-id> [-b device-ids] [-u device-ids]
217
226
  bricks app bind <app-id> [-b device-ids] [-u device-ids] [--dry-run] [-j|--json]
227
+ # Set the viewport of new or bound devices (JSON or a JSON file keyed by device ID).
228
+ # Fields: x, y, width, height, rotate, type (rotate|scroll), rotateType (crop|fit|physical-rotate),
229
+ # scrollType (crop|fit), maintainAspectRatio, forceDeviceRatio, mirrorHorizontal, mirrorVertical, content.
230
+ # Fields not given keep the current viewport, else the root layout (full size at 0,0).
231
+ # A bound device keeps its other settings (automation, cron tests, control toggles, env).
232
+ bricks app bind <app-id> --viewport '{"<device-id>":{"x":0,"y":0,"width":960,"height":540,"rotate":90}}' [--dry-run] [-j|--json]
218
233
 
219
234
  # Trigger automation
220
- bricks app trigger <app-id> <test-id> [--play|--stop] [--setup-at-launch]
235
+ bricks app trigger <app-id> <test-id> [--play|--stop] [--setup-at-launch] [-g match-group]
221
236
 
222
- # Preview a release without publishing
237
+ # Application Control pages (Runtime Editor, Canvas Control, Device Control):
238
+ # issue a page token and print the URL of each page (needs an OAuth login: `bricks auth login`);
239
+ # --no-token prints the sign-in URLs only and works with any login
240
+ bricks app control-page <app-id> -t <short-edit,canvas-control,device-control,device-control-create-only> [--token-name name] [--expires-in days] [-e KEY=VALUE] [--no-token] [--dry-run] [-j|--json]
241
+ # The printed URL is <controller>/<page>.html?workspace_secret=…&application_id=…; set BRICKS_CONTROLLER_URL to override the controller origin.
242
+
243
+ # Create a release (--dry-run checks it without publishing). A semver --version must be newer than every semver release in the cloud (see `bricks app versions <app-id> -j`); non-semver labels such as the default app name work as before.
223
244
  bricks app release <app-id> -c <config-path-or-json> [-n name] [--version version] [--changelogs text] [--dry-run] [-j|--json]
224
245
 
246
+ # CTOR projects: a config-only push (update-app) is the normal last step after edits.
247
+ bricks ctor push --auto-commit -y
248
+ # Release (deploy-app) only when a new version is requested. The version (from --version, --auto-version or package.json) must be semver and newer than every cloud release; a duplicate or lower one is refused before anything changes. There is no bypass flag: restore an old release with `bricks app switch-version`.
249
+ bricks ctor deploy --auto-commit --version <next-version> -y
250
+
251
+ # List release versions, then switch the platform config to one (ID or name).
252
+ # The local CTOR project is not changed. Unreleased changes are dropped: confirm, or pass -y.
253
+ bricks app versions <app-id> [-j|--json]
254
+ bricks app switch-version <app-id> <version-id-or-name> [-y|--yes] [--dry-run] [-j|--json]
255
+
225
256
  # Diagnose a config: schema validation + semantic lint rules
226
257
  # (data-update-race, redundant-rect-overlay, off-grid-frame, out-of-bounds-frame,
227
- # wait-async-no-op, missing-result-param, unused-data-node, z-order-cover)
258
+ # wait-async-no-op, missing-result-param, unused-data-node, z-order-cover,
259
+ # expression-global-variable, mapping-outside-items)
228
260
  # Accepts a local file path or a remote application id.
229
261
  bricks app doctor <app-id-or-path> [-c|--composed] [--strict] [--only codes] [--ignore codes] [-j|--json]
230
262
  ```
@@ -278,6 +310,32 @@ bricks group refresh <group-id> [--dry-run] [-j|--json]
278
310
  bricks group monitor <group-id> [-i interval-seconds]
279
311
  ```
280
312
 
313
+ ### Blueprints
314
+
315
+ A Blueprint is a workspace-level map of a site: its applications, modules, devices, Data Bank
316
+ properties and Media Flow boxes as nodes, with role cards and the edges between them. The CLI
317
+ reads Blueprints; edit them in CTOR. These commands need the `query_blueprint` token permission.
318
+
319
+ ```bash
320
+ # List blueprints (name, node count, revision, Orchestrator run state)
321
+ bricks blueprint list [-k keyword] [-j|--json]
322
+
323
+ # Resolve a blueprint name or ID
324
+ bricks blueprint resolve <query> [-l limit] [-j|--json]
325
+
326
+ # Get blueprint details (overview, counts, run state, referenced entities with no node)
327
+ bricks blueprint get <blueprint-id> [-j|--json]
328
+
329
+ # Nodes with authored edges and edges derived from the workspace (bindings, used modules, ...)
330
+ bricks blueprint graph <blueprint-id> [-j|--json]
331
+
332
+ # Nodes grouped by kind; removed or moved entities are flagged as missing
333
+ bricks blueprint members <blueprint-id> [-j|--json]
334
+
335
+ # Print the projection text that the Blueprint Orchestrator gets as its context
336
+ bricks blueprint projection <blueprint-id>
337
+ ```
338
+
281
339
  ### Media Flow
282
340
 
283
341
  Media Flow commands require:
@@ -345,6 +403,9 @@ Notes:
345
403
  - When no `-v/--value-file` is given, `set` keeps the current value (useful to change only tags or the definition).
346
404
  - `-v` parses the input as JSON and falls back to a plain string (`-v '{"a":1}'` → object, `-v hello` → string).
347
405
  - Revoking the auto-provisioned `manager` / `used-by-device` keys rotates them instead of deleting them.
406
+ - Space key values come back masked (last 4 characters) unless the login may read them: the
407
+ workspace owner, a role with `update-workspace`, or a token with the `manage_devtools` scope.
408
+ A key the login creates is always returned in full, and a masked key revokes by its full value.
348
409
  - The Data Bank endpoint is derived from the configured BRICKS endpoint
349
410
  (prod → `bank.bricks.tools`, beta → `bank-beta.bricks.tools`, dev → `localhost:8080`).
350
411
  - Environment overrides for CI / custom setups: `BRICKS_BANK_SPACENAME` + `BRICKS_BANK_SPACEKEY`
@@ -353,6 +414,16 @@ Notes:
353
414
  it in the buttress `state.json`, so that server's local functions can use `context.bank`
354
415
  (`--revoke` removes it; re-running rotates the key).
355
416
 
417
+ ### Buttress binding and device authentication
418
+
419
+ `bricks buttress bind` pairs the server with the current workspace **and automatically
420
+ provisions a workspace-scoped DevTools token** in its permission-restricted `state.json`.
421
+ After restarting Buttress, agents with `local_devices = true` use it for matching-workspace
422
+ devices without passing credentials through model arguments. Normal bind/status output
423
+ hides the token; `--print` emits the complete secret state for remote provisioning.
424
+ Rebind and restart to renew an expired token (default lifetime: 30 days). Rebinding does
425
+ not revoke older tokens. Automatic device authentication assumes a trusted LAN.
426
+
356
427
  ### Interactive Mode
357
428
 
358
429
  ```bash