@fugood/bricks-cli 2.25.0-beta.4 → 2.25.0-beta.41

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
@@ -105,6 +105,19 @@ bricks doctor
105
105
  bricks doctor --json
106
106
  ```
107
107
 
108
+ ### Self-update
109
+
110
+ ```bash
111
+ # Update the CLI in-place. Auto-detects how it was installed (npm, bun,
112
+ # standalone binary) and runs the matching update command. Falls back to
113
+ # the binary installer if the primary method fails.
114
+ bricks update-cli # prompts before updating
115
+ bricks update-cli -y # non-interactive
116
+
117
+ # Force a channel
118
+ bricks update-cli --channel beta
119
+ ```
120
+
108
121
  ### Configuration
109
122
 
110
123
  ```bash
@@ -174,7 +187,7 @@ bricks app bind <app-id> [-b device-ids] [-u device-ids] [--dry-run] [-j|--json]
174
187
  bricks app trigger <app-id> <test-id> [--play|--stop] [--setup-at-launch]
175
188
 
176
189
  # Preview a release without publishing
177
- 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]
178
191
  ```
179
192
 
180
193
  ### Module Management
@@ -196,7 +209,7 @@ bricks module update <module-id> [-n name] [-d description] [-c config-json] [-f
196
209
  bricks module short-edit <module-id> -l '[{"shortId":"<subspace-short-id>","path":"property.name","content":"value"}]'
197
210
 
198
211
  # Preview a release without publishing
199
- bricks module release <module-id> -c <config-path-or-json> [--dry-run] [-j|--json]
212
+ bricks module release <module-id> -c <config-path-or-json> [-n name] [--version version] [--changelogs text] [--dry-run] [-j|--json]
200
213
  ```
201
214
 
202
215
  ### Device Group Management
@@ -245,6 +258,55 @@ bricks media files <box-id> \
245
258
  bricks media file <file-id> [-j|--json]
246
259
  ```
247
260
 
261
+ ### Data Bank (Remote Properties)
262
+
263
+ Manage the workspace Data Bank: settings and space keys go through the Workspace API
264
+ (workspace token); property CRUD talks to the Data Bank API directly using a space key.
265
+ On the first property command the CLI issues a key via the Workspace API and saves it
266
+ to the active profile (`~/.bricks-cli/config.json`) — no manual setup needed.
267
+
268
+ ```bash
269
+ # Workspace-level settings
270
+ bricks data status [-j|--json] # also shows the stored CLI key (masked)
271
+ bricks data enable
272
+ bricks data disable
273
+
274
+ # Stored CLI key management
275
+ bricks data login [--name <keyName>] # (re)issue a key and save it to the profile
276
+ bricks data logout [--revoke] # remove the stored key; --revoke also revokes it
277
+
278
+ # Space key management (human output masks key values; --json includes them)
279
+ bricks data keys list [-j|--json]
280
+ bricks data keys new <name> \
281
+ [--expire-at <ISO date>] \ # between 1 hour and 90 days from now
282
+ [--read <propId,...>] \ # limit readable properties
283
+ [--write <propId,...>] \ # limit writable properties
284
+ [-j|--json]
285
+ bricks data keys revoke <keyValue|name> [-y] [-j|--json]
286
+
287
+ # Property CRUD (Data Bank API, uses the stored key)
288
+ bricks data list [-k keyword] [-m InSubspace|Global] [-j|--json]
289
+ bricks data get <propertyId> [-j|--json]
290
+ bricks data set <propertyId> \
291
+ [-v <json-or-string> | --value-file <path>] \
292
+ [-d <definition-json> | --definition-file <path>] \
293
+ [-m InSubspace|Global] [-t tag1,tag2] [-n "<update note>"] \
294
+ [--no-upsert] \ # fail when the property does not exist
295
+ [--no-notify] \ # skip notifying subscribed devices
296
+ [--dry-run] [-j|--json]
297
+ bricks data remove <propertyId> [-y] [--dry-run] [-j|--json]
298
+ ```
299
+
300
+ Notes:
301
+ - `set` is an upsert by default and notifies subscribed devices, the same as editing in the controller Bank page.
302
+ - When no `-v/--value-file` is given, `set` keeps the current value (useful to change only tags or the definition).
303
+ - `-v` parses the input as JSON and falls back to a plain string (`-v '{"a":1}'` → object, `-v hello` → string).
304
+ - Revoking the auto-provisioned `manager` / `used-by-device` keys rotates them instead of deleting them.
305
+ - The Data Bank endpoint is derived from the configured BRICKS endpoint
306
+ (prod → `bank.bricks.tools`, beta → `bank-beta.bricks.tools`, dev → `localhost:8080`).
307
+ - Environment overrides for CI / custom setups: `BRICKS_BANK_SPACENAME` + `BRICKS_BANK_SPACEKEY`
308
+ (skip the stored key) and `BRICKS_BANK_ENDPOINT` (custom Bank URL).
309
+
248
310
  ### Interactive Mode
249
311
 
250
312
  ```bash