@fugood/bricks-cli 2.25.0-beta.6 → 2.25.0-beta.60

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
@@ -187,7 +187,13 @@ bricks app bind <app-id> [-b device-ids] [-u device-ids] [--dry-run] [-j|--json]
187
187
  bricks app trigger <app-id> <test-id> [--play|--stop] [--setup-at-launch]
188
188
 
189
189
  # Preview a release without publishing
190
- bricks app release <app-id> -c <config-path-or-json> [--dry-run] [-j|--json]
190
+ bricks app release <app-id> -c <config-path-or-json> [-n name] [--version version] [--changelogs text] [--dry-run] [-j|--json]
191
+
192
+ # Diagnose a config: schema validation + semantic lint rules
193
+ # (data-update-race, redundant-rect-overlay, off-grid-frame, out-of-bounds-frame,
194
+ # wait-async-no-op, missing-result-param, unused-data-node, z-order-cover)
195
+ # Accepts a local file path or a remote application id.
196
+ bricks app doctor <app-id-or-path> [-c|--composed] [--strict] [--only codes] [--ignore codes] [-j|--json]
191
197
  ```
192
198
 
193
199
  ### Module Management
@@ -209,7 +215,11 @@ bricks module update <module-id> [-n name] [-d description] [-c config-json] [-f
209
215
  bricks module short-edit <module-id> -l '[{"shortId":"<subspace-short-id>","path":"property.name","content":"value"}]'
210
216
 
211
217
  # Preview a release without publishing
212
- bricks module release <module-id> -c <config-path-or-json> [--dry-run] [-j|--json]
218
+ bricks module release <module-id> -c <config-path-or-json> [-n name] [--version version] [--changelogs text] [--dry-run] [-j|--json]
219
+
220
+ # Diagnose a module config (same rules as `app doctor`; the root subspace's
221
+ # data nodes are treated as the module's exposed interface)
222
+ bricks module doctor <module-id-or-path> [--strict] [--only codes] [--ignore codes] [-j|--json]
213
223
  ```
214
224
 
215
225
  ### Device Group Management
@@ -258,6 +268,55 @@ bricks media files <box-id> \
258
268
  bricks media file <file-id> [-j|--json]
259
269
  ```
260
270
 
271
+ ### Data Bank (Remote Properties)
272
+
273
+ Manage the workspace Data Bank: settings and space keys go through the Workspace API
274
+ (workspace token); property CRUD talks to the Data Bank API directly using a space key.
275
+ On the first property command the CLI issues a key via the Workspace API and saves it
276
+ to the active profile (`~/.bricks-cli/config.json`) — no manual setup needed.
277
+
278
+ ```bash
279
+ # Workspace-level settings
280
+ bricks data status [-j|--json] # also shows the stored CLI key (masked)
281
+ bricks data enable
282
+ bricks data disable
283
+
284
+ # Stored CLI key management
285
+ bricks data login [--name <keyName>] # (re)issue a key and save it to the profile
286
+ bricks data logout [--revoke] # remove the stored key; --revoke also revokes it
287
+
288
+ # Space key management (human output masks key values; --json includes them)
289
+ bricks data keys list [-j|--json]
290
+ bricks data keys new <name> \
291
+ [--expire-at <ISO date>] \ # between 1 hour and 90 days from now
292
+ [--read <propId,...>] \ # limit readable properties
293
+ [--write <propId,...>] \ # limit writable properties
294
+ [-j|--json]
295
+ bricks data keys revoke <keyValue|name> [-y] [-j|--json]
296
+
297
+ # Property CRUD (Data Bank API, uses the stored key)
298
+ bricks data list [-k keyword] [-m InSubspace|Global] [-j|--json]
299
+ bricks data get <propertyId> [-j|--json]
300
+ bricks data set <propertyId> \
301
+ [-v <json-or-string> | --value-file <path>] \
302
+ [-d <definition-json> | --definition-file <path>] \
303
+ [-m InSubspace|Global] [-t tag1,tag2] [-n "<update note>"] \
304
+ [--no-upsert] \ # fail when the property does not exist
305
+ [--no-notify] \ # skip notifying subscribed devices
306
+ [--dry-run] [-j|--json]
307
+ bricks data remove <propertyId> [-y] [--dry-run] [-j|--json]
308
+ ```
309
+
310
+ Notes:
311
+ - `set` is an upsert by default and notifies subscribed devices, the same as editing in the controller Bank page.
312
+ - When no `-v/--value-file` is given, `set` keeps the current value (useful to change only tags or the definition).
313
+ - `-v` parses the input as JSON and falls back to a plain string (`-v '{"a":1}'` → object, `-v hello` → string).
314
+ - Revoking the auto-provisioned `manager` / `used-by-device` keys rotates them instead of deleting them.
315
+ - The Data Bank endpoint is derived from the configured BRICKS endpoint
316
+ (prod → `bank.bricks.tools`, beta → `bank-beta.bricks.tools`, dev → `localhost:8080`).
317
+ - Environment overrides for CI / custom setups: `BRICKS_BANK_SPACENAME` + `BRICKS_BANK_SPACEKEY`
318
+ (skip the stored key) and `BRICKS_BANK_ENDPOINT` (custom Bank URL).
319
+
261
320
  ### Interactive Mode
262
321
 
263
322
  ```bash