@basementuniverse/jsonpad-cli 1.0.0 → 1.2.0

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/REFERENCE.md CHANGED
@@ -13,6 +13,63 @@ Run `jsonpad <command> --help` for the same information in a terminal.
13
13
  - [`jsonpad schema sync`](#jsonpad-schema-sync): Create and update lists and indexes to match a schema document
14
14
  - [`jsonpad schema export`](#jsonpad-schema-export): Write a schema document for existing lists
15
15
  - [`jsonpad schema move`](#jsonpad-schema-move): Move lists (by id or path name) to a scope, or release them from their scope
16
+ - [`jsonpad lists list`](#jsonpad-lists-list): List lists (the default when no command is given)
17
+ - [`jsonpad lists get`](#jsonpad-lists-get): Show a list
18
+ - [`jsonpad lists create`](#jsonpad-lists-create): Create a list
19
+ - [`jsonpad lists update`](#jsonpad-lists-update): Change a list. Fields that aren't given are left as they are
20
+ - [`jsonpad lists delete`](#jsonpad-lists-delete): Delete a list. Its items and indexes are deleted in the background
21
+ - [`jsonpad lists search`](#jsonpad-lists-search): Search a list's items, using the indexes that allow searching
22
+ - [`jsonpad lists stats`](#jsonpad-lists-stats): Show a list's stats: its items, indexes and events, by day
23
+ - [`jsonpad lists events`](#jsonpad-lists-events): List a list's events, newest first by default
24
+ - [`jsonpad lists event`](#jsonpad-lists-event): Show one of a list's events
25
+ - [`jsonpad indexes list`](#jsonpad-indexes-list): List a list's indexes (the default when no command is given)
26
+ - [`jsonpad indexes get`](#jsonpad-indexes-get): Show an index
27
+ - [`jsonpad indexes create`](#jsonpad-indexes-create): Create an index. It builds in the background, and until it has built it can't be used to filter, order or search items
28
+ - [`jsonpad indexes update`](#jsonpad-indexes-update): Change an index. Fields that aren't given are left as they are. Changing the pointer rebuilds the index
29
+ - [`jsonpad indexes delete`](#jsonpad-indexes-delete): Delete an index
30
+ - [`jsonpad indexes rebuild`](#jsonpad-indexes-rebuild): Rebuild an index whose last build failed, once the problem has been fixed
31
+ - [`jsonpad indexes wait`](#jsonpad-indexes-wait): Wait for an index to finish building
32
+ - [`jsonpad indexes stats`](#jsonpad-indexes-stats): Show an index's events, by day
33
+ - [`jsonpad indexes events`](#jsonpad-indexes-events): List an index's events, newest first by default
34
+ - [`jsonpad indexes event`](#jsonpad-indexes-event): Show one of an index's events
35
+ - [`jsonpad items list`](#jsonpad-items-list): List a list's items (the default when no command is given)
36
+ - [`jsonpad items get`](#jsonpad-items-get): Show an item, with its data
37
+ - [`jsonpad items create`](#jsonpad-items-create): Create an item
38
+ - [`jsonpad items update`](#jsonpad-items-update): Change an item. --data replaces all of its data; fields that aren't given are left as they are
39
+ - [`jsonpad items delete`](#jsonpad-items-delete): Delete an item. It can be restored from its events
40
+ - [`jsonpad items restore`](#jsonpad-items-restore): Restore an item to how it was after one of its events
41
+ - [`jsonpad items stats`](#jsonpad-items-stats): Show an item's events, by day
42
+ - [`jsonpad items events`](#jsonpad-items-events): List an item's events, newest first by default
43
+ - [`jsonpad items event`](#jsonpad-items-event): Show one of an item's events
44
+ - [`jsonpad items export`](#jsonpad-items-export): Output every item in a list as NDJSON, e.g. for a backup
45
+ - [`jsonpad items import`](#jsonpad-items-import): Create items from an NDJSON or JSON file
46
+ - [`jsonpad items data get`](#jsonpad-items-data-get): Output an item's data, or part of it. Without an item, output the data of a page of the list's items
47
+ - [`jsonpad items data set`](#jsonpad-items-data-set): Merge data into an item's data, or into part of it. Objects are merged, and arrays are added to. Outputs the changed item
48
+ - [`jsonpad items data replace`](#jsonpad-items-data-replace): Replace an item's data, or part of it. Outputs the changed item
49
+ - [`jsonpad items data patch`](#jsonpad-items-data-patch): Change an item's data, or part of it, with a JSON patch (RFC 6902). Outputs the changed item
50
+ - [`jsonpad items data delete`](#jsonpad-items-data-delete): Delete part of an item's data. Outputs the changed item
51
+ - [`jsonpad identities list`](#jsonpad-identities-list): List identities (the default when no command is given)
52
+ - [`jsonpad identities get`](#jsonpad-identities-get): Show an identity
53
+ - [`jsonpad identities create`](#jsonpad-identities-create): Create an identity. The password is asked for in a terminal, or read from stdin or JSONPAD_IDENTITY_PASSWORD
54
+ - [`jsonpad identities update`](#jsonpad-identities-update): Change an identity. Fields that aren't given are left as they are
55
+ - [`jsonpad identities delete`](#jsonpad-identities-delete): Delete an identity
56
+ - [`jsonpad identities register`](#jsonpad-identities-register): Register an identity, as an app would for a new user
57
+ - [`jsonpad identities login`](#jsonpad-identities-login): Log in as an identity, to act as it
58
+ - [`jsonpad identities logout`](#jsonpad-identities-logout): Log out the identity in JSONPAD_IDENTITY_TOKEN, so that its token stops working
59
+ - [`jsonpad identities self get`](#jsonpad-identities-self-get): Show the identity in JSONPAD_IDENTITY_TOKEN (the default when no command is given)
60
+ - [`jsonpad identities self update`](#jsonpad-identities-self-update): Change the identity in JSONPAD_IDENTITY_TOKEN. Fields that aren't given are left as they are
61
+ - [`jsonpad identities self delete`](#jsonpad-identities-self-delete): Delete the identity in JSONPAD_IDENTITY_TOKEN
62
+ - [`jsonpad identities stats`](#jsonpad-identities-stats): Show an identity's events, by day
63
+ - [`jsonpad identities events`](#jsonpad-identities-events): List an identity's events, newest first by default
64
+ - [`jsonpad identities event`](#jsonpad-identities-event): Show one of an identity's events
65
+ - [`jsonpad whoami`](#jsonpad-whoami): Show the token you're using, its plan's limits and usage
66
+ - [`jsonpad config set-profile`](#jsonpad-config-set-profile): Add or update a profile
67
+ - [`jsonpad config use`](#jsonpad-config-use): Choose the default profile
68
+ - [`jsonpad config list`](#jsonpad-config-list): List profiles (tokens are masked)
69
+ - [`jsonpad config remove`](#jsonpad-config-remove): Remove a profile
70
+ - [`jsonpad config path`](#jsonpad-config-path): Show where the config file is (set JSONPAD_CONFIG to use a different file)
71
+ - [`jsonpad listen`](#jsonpad-listen): Print realtime events from lists and items as they happen
72
+ - [`jsonpad completion`](#jsonpad-completion): Output a script that completes jsonpad commands and options when you press Tab
16
73
 
17
74
  ### `jsonpad sync-schema`
18
75
 
@@ -102,14 +159,1238 @@ The same as [`jsonpad export-schema`](#jsonpad-export-schema), with the same arg
102
159
 
103
160
  The same as [`jsonpad move-lists`](#jsonpad-move-lists), with the same arguments and options.
104
161
 
162
+ ### `jsonpad lists list`
163
+
164
+ List lists (the default when no command is given)
165
+
166
+ ```
167
+ jsonpad lists list [options]
168
+ ```
169
+
170
+ | Option | Description |
171
+ | --- | --- |
172
+ | `--name <name>` | Only lists whose name contains this |
173
+ | `--path-name <path name>` | Only lists whose path name contains this |
174
+ | `--tagged <tags>` | Only those with one of these comma-separated tags (repeat the option to require every group) |
175
+ | `--pinned` | Only pinned lists |
176
+ | `--no-pinned` | Only lists that aren't pinned |
177
+ | `--readonly` | Only readonly lists |
178
+ | `--no-readonly` | Only lists that aren't readonly |
179
+ | `--realtime` | Only realtime lists |
180
+ | `--no-realtime` | Only lists that aren't realtime |
181
+ | `--protected` | Only protected lists |
182
+ | `--no-protected` | Only lists that aren't protected |
183
+ | `--indexable` | Only indexable lists |
184
+ | `--no-indexable` | Only lists that aren't indexable |
185
+ | `--generative` | Only generative lists |
186
+ | `--no-generative` | Only lists that aren't generative |
187
+ | `--all` | Fetch every page, not just one. The output is NDJSON unless --output says otherwise |
188
+ | `--max <number>` | With --all, stop after this many |
189
+ | `--page <number>` | The page to fetch (default 1) |
190
+ | `--limit <number>` | How many to fetch per page, up to 100 (default 20) |
191
+ | `--order <field>` | The field to order by (one of: createdAt, updatedAt, name, pathName, pinned, readonly, realtime, protected, indexable, generative, activated) |
192
+ | `--direction <direction>` | The order direction (one of: asc, desc) |
193
+ | `-o, --output <format>` | Output format (default: table in a terminal, otherwise json) (one of: table, json, ndjson, id) |
194
+ | `--json` | Output JSON (the same as --output json) |
195
+ | `-q, --quiet` | Only output ids (the same as --output id) |
196
+
197
+ ### `jsonpad lists get`
198
+
199
+ Show a list
200
+
201
+ ```
202
+ jsonpad lists get [options] <list>
203
+ ```
204
+
205
+ | Argument | Description |
206
+ | --- | --- |
207
+ | `list` | The list (id or path name) |
208
+
209
+ | Option | Description |
210
+ | --- | --- |
211
+ | `-o, --output <format>` | Output format (default: table in a terminal, otherwise json) (one of: table, json, ndjson, id) |
212
+ | `--json` | Output JSON (the same as --output json) |
213
+ | `-q, --quiet` | Only output ids (the same as --output id) |
214
+
215
+ ### `jsonpad lists create`
216
+
217
+ Create a list
218
+
219
+ ```
220
+ jsonpad lists create [options]
221
+ ```
222
+
223
+ | Option | Description |
224
+ | --- | --- |
225
+ | `--name <name>` | The name |
226
+ | `--path-name <path name>` | The path name, which can be used in place of the id |
227
+ | `--description <text>` | The description |
228
+ | `--tags <tags>` | Comma-separated tags, replacing any it has (repeatable; pass "" to remove them all) |
229
+ | `--schema <json>` | A JSON schema that items must match: JSON, @file or - for stdin |
230
+ | `--generative-prompt <text>` | The prompt used to generate items, for generative lists |
231
+ | `--pinned` | Pinned in the dashboard |
232
+ | `--no-pinned` | Not pinned |
233
+ | `--readonly` | Items can't be created, changed or deleted |
234
+ | `--no-readonly` | Not readonly |
235
+ | `--realtime` | Changes are sent to realtime clients |
236
+ | `--no-realtime` | Not realtime |
237
+ | `--protected` | The list can't be deleted while it has items |
238
+ | `--no-protected` | Not protected |
239
+ | `--indexable` | Items can be listed, filtered and searched with a token |
240
+ | `--no-indexable` | Not indexable |
241
+ | `--generative` | Items can be generated from the generative prompt |
242
+ | `--no-generative` | Not generative |
243
+ | `--data <json>` | The whole list as a JSON object (JSON, @file or - for stdin); the options above take precedence |
244
+ | `-o, --output <format>` | Output format (default: table in a terminal, otherwise json) (one of: table, json, ndjson, id) |
245
+ | `--json` | Output JSON (the same as --output json) |
246
+ | `-q, --quiet` | Only output ids (the same as --output id) |
247
+
248
+ ### `jsonpad lists update`
249
+
250
+ Change a list. Fields that aren't given are left as they are
251
+
252
+ ```
253
+ jsonpad lists update [options] <list>
254
+ ```
255
+
256
+ | Argument | Description |
257
+ | --- | --- |
258
+ | `list` | The list (id or path name) |
259
+
260
+ | Option | Description |
261
+ | --- | --- |
262
+ | `--name <name>` | The name |
263
+ | `--path-name <path name>` | The path name, which can be used in place of the id |
264
+ | `--description <text>` | The description |
265
+ | `--tags <tags>` | Comma-separated tags, replacing any it has (repeatable; pass "" to remove them all) |
266
+ | `--schema <json>` | A JSON schema that items must match: JSON, @file or - for stdin |
267
+ | `--generative-prompt <text>` | The prompt used to generate items, for generative lists |
268
+ | `--no-schema` | Remove the schema |
269
+ | `--no-generative-prompt` | Remove the generative prompt |
270
+ | `--pinned` | Pinned in the dashboard |
271
+ | `--no-pinned` | Not pinned |
272
+ | `--readonly` | Items can't be created, changed or deleted |
273
+ | `--no-readonly` | Not readonly |
274
+ | `--realtime` | Changes are sent to realtime clients |
275
+ | `--no-realtime` | Not realtime |
276
+ | `--protected` | The list can't be deleted while it has items |
277
+ | `--no-protected` | Not protected |
278
+ | `--indexable` | Items can be listed, filtered and searched with a token |
279
+ | `--no-indexable` | Not indexable |
280
+ | `--generative` | Items can be generated from the generative prompt |
281
+ | `--no-generative` | Not generative |
282
+ | `--data <json>` | The whole list as a JSON object (JSON, @file or - for stdin); the options above take precedence |
283
+ | `-o, --output <format>` | Output format (default: table in a terminal, otherwise json) (one of: table, json, ndjson, id) |
284
+ | `--json` | Output JSON (the same as --output json) |
285
+ | `-q, --quiet` | Only output ids (the same as --output id) |
286
+
287
+ ### `jsonpad lists delete`
288
+
289
+ Delete a list. Its items and indexes are deleted in the background
290
+
291
+ ```
292
+ jsonpad lists delete [options] <list>
293
+ ```
294
+
295
+ | Argument | Description |
296
+ | --- | --- |
297
+ | `list` | The list (id or path name) |
298
+
299
+ | Option | Description |
300
+ | --- | --- |
301
+ | `-y, --yes` | Don't ask for confirmation |
302
+
303
+ ### `jsonpad lists search`
304
+
305
+ Search a list's items, using the indexes that allow searching
306
+
307
+ ```
308
+ jsonpad lists search [options] <list> <query>
309
+ ```
310
+
311
+ | Argument | Description |
312
+ | --- | --- |
313
+ | `list` | The list (id or path name) |
314
+ | `query` | What to search for, 3 to 100 characters |
315
+
316
+ | Option | Description |
317
+ | --- | --- |
318
+ | `--include-items` | Include the items, not just their ids |
319
+ | `--include-data` | With --include-items, include each item's data |
320
+ | `--include-guarded` | Include guarded values in the item data, for items the identity making the request owns |
321
+ | `-o, --output <format>` | Output format (default: table in a terminal, otherwise json) (one of: table, json, ndjson, id) |
322
+ | `--json` | Output JSON (the same as --output json) |
323
+ | `-q, --quiet` | Only output ids (the same as --output id) |
324
+
325
+ ### `jsonpad lists stats`
326
+
327
+ Show a list's stats: its items, indexes and events, by day
328
+
329
+ ```
330
+ jsonpad lists stats [options] <list>
331
+ ```
332
+
333
+ | Argument | Description |
334
+ | --- | --- |
335
+ | `list` | The list (id or path name) |
336
+
337
+ | Option | Description |
338
+ | --- | --- |
339
+ | `--days <number>` | How many days of stats, up to 90 (default 7) |
340
+ | `-o, --output <format>` | Output format (default: table in a terminal, otherwise json) (one of: table, json) |
341
+ | `--json` | Output JSON (the same as --output json) |
342
+
343
+ ### `jsonpad lists events`
344
+
345
+ List a list's events, newest first by default
346
+
347
+ ```
348
+ jsonpad lists events [options] <list>
349
+ ```
350
+
351
+ | Argument | Description |
352
+ | --- | --- |
353
+ | `list` | The list (id or path name) |
354
+
355
+ | Option | Description |
356
+ | --- | --- |
357
+ | `--type <type>` | Only events of this type (one of: list-created, list-updated, list-deleted) |
358
+ | `--start-at <date>` | Only events at or after this date, e.g. 2026-09-01 |
359
+ | `--end-at <date>` | Only events at or before this date |
360
+ | `--include-snapshot` | Include the list as it was after each event |
361
+ | `--include-attachments` | Include each event's attachments |
362
+ | `--all` | Fetch every page, not just one. The output is NDJSON unless --output says otherwise |
363
+ | `--max <number>` | With --all, stop after this many |
364
+ | `--page <number>` | The page to fetch (default 1) |
365
+ | `--limit <number>` | How many to fetch per page, up to 100 (default 20) |
366
+ | `--order <field>` | The field to order by (one of: createdAt, type) |
367
+ | `--direction <direction>` | The order direction (one of: asc, desc) |
368
+ | `-o, --output <format>` | Output format (default: table in a terminal, otherwise json) (one of: table, json, ndjson, id) |
369
+ | `--json` | Output JSON (the same as --output json) |
370
+ | `-q, --quiet` | Only output ids (the same as --output id) |
371
+
372
+ ### `jsonpad lists event`
373
+
374
+ Show one of a list's events
375
+
376
+ ```
377
+ jsonpad lists event [options] <list> <event>
378
+ ```
379
+
380
+ | Argument | Description |
381
+ | --- | --- |
382
+ | `list` | The list (id or path name) |
383
+ | `event` | The event id |
384
+
385
+ | Option | Description |
386
+ | --- | --- |
387
+ | `--include-snapshot` | Include the list as it was after each event |
388
+ | `--include-attachments` | Include each event's attachments |
389
+ | `-o, --output <format>` | Output format (default: table in a terminal, otherwise json) (one of: table, json, ndjson, id) |
390
+ | `--json` | Output JSON (the same as --output json) |
391
+ | `-q, --quiet` | Only output ids (the same as --output id) |
392
+
393
+ ### `jsonpad indexes list`
394
+
395
+ List a list's indexes (the default when no command is given)
396
+
397
+ ```
398
+ jsonpad indexes list [options] <list>
399
+ ```
400
+
401
+ | Argument | Description |
402
+ | --- | --- |
403
+ | `list` | The list (id or path name) |
404
+
405
+ | Option | Description |
406
+ | --- | --- |
407
+ | `--name <name>` | Only indexes whose name contains this |
408
+ | `--path-name <path name>` | Only indexes whose path name contains this |
409
+ | `--value-type <type>` | Only indexes of this type (one of: string, number, date) |
410
+ | `--alias` | Only the alias index |
411
+ | `--no-alias` | Only other indexes |
412
+ | `--guard` | Only guard indexes |
413
+ | `--no-guard` | Only other indexes |
414
+ | `--tagged <tags>` | Only those with one of these comma-separated tags (repeat the option to require every group) |
415
+ | `--all` | Fetch every page, not just one. The output is NDJSON unless --output says otherwise |
416
+ | `--max <number>` | With --all, stop after this many |
417
+ | `--page <number>` | The page to fetch (default 1) |
418
+ | `--limit <number>` | How many to fetch per page, up to 100 (default 20) |
419
+ | `--order <field>` | The field to order by (one of: createdAt, updatedAt, name, pathName, valueType, alias, sorting, filtering, searching, guard, defaultOrderDirection, activated) |
420
+ | `--direction <direction>` | The order direction (one of: asc, desc) |
421
+ | `-o, --output <format>` | Output format (default: table in a terminal, otherwise json) (one of: table, json, ndjson, id) |
422
+ | `--json` | Output JSON (the same as --output json) |
423
+ | `-q, --quiet` | Only output ids (the same as --output id) |
424
+
425
+ ### `jsonpad indexes get`
426
+
427
+ Show an index
428
+
429
+ ```
430
+ jsonpad indexes get [options] <list> <index>
431
+ ```
432
+
433
+ | Argument | Description |
434
+ | --- | --- |
435
+ | `list` | The list (id or path name) |
436
+ | `index` | The index (id or path name) |
437
+
438
+ | Option | Description |
439
+ | --- | --- |
440
+ | `-o, --output <format>` | Output format (default: table in a terminal, otherwise json) (one of: table, json, ndjson, id) |
441
+ | `--json` | Output JSON (the same as --output json) |
442
+ | `-q, --quiet` | Only output ids (the same as --output id) |
443
+
444
+ ### `jsonpad indexes create`
445
+
446
+ Create an index. It builds in the background, and until it has built it can't be used to filter, order or search items
447
+
448
+ ```
449
+ jsonpad indexes create [options] <list>
450
+ ```
451
+
452
+ | Argument | Description |
453
+ | --- | --- |
454
+ | `list` | The list (id or path name) |
455
+
456
+ | Option | Description |
457
+ | --- | --- |
458
+ | `--name <name>` | The name |
459
+ | `--path-name <path name>` | The path name, used to filter and order items, and in place of the id |
460
+ | `--description <text>` | The description |
461
+ | `--tags <tags>` | Comma-separated tags, replacing any it has (repeatable; pass "" to remove them all) |
462
+ | `--pointer <pointer>` | The JSON pointer to the value in item data, e.g. /title |
463
+ | `--value-type <type>` | The type of value (one of: string, number, date) |
464
+ | `--default-order-direction <direction>` | The direction items are ordered in by default (one of: asc, desc) |
465
+ | `--alias` | Items can be fetched by this index's value, in place of their id |
466
+ | `--no-alias` | Not an alias |
467
+ | `--sorting` | Items can be ordered by this index |
468
+ | `--no-sorting` | Items can't be ordered by it |
469
+ | `--filtering` | Items can be filtered by this index |
470
+ | `--no-filtering` | Items can't be filtered by it |
471
+ | `--searching` | This index's values are included in searches |
472
+ | `--no-searching` | Not included in searches |
473
+ | `--guard` | The value is removed from item data returned with a token |
474
+ | `--no-guard` | Not a guard |
475
+ | `--data <json>` | The whole index as a JSON object (JSON, @file or - for stdin); the options above take precedence |
476
+ | `--wait` | Wait for the index to be built, if it needs building |
477
+ | `--timeout <seconds>` | How long --wait waits (default 600) |
478
+ | `-o, --output <format>` | Output format (default: table in a terminal, otherwise json) (one of: table, json, ndjson, id) |
479
+ | `--json` | Output JSON (the same as --output json) |
480
+ | `-q, --quiet` | Only output ids (the same as --output id) |
481
+
482
+ ### `jsonpad indexes update`
483
+
484
+ Change an index. Fields that aren't given are left as they are. Changing the pointer rebuilds the index
485
+
486
+ ```
487
+ jsonpad indexes update [options] <list> <index>
488
+ ```
489
+
490
+ | Argument | Description |
491
+ | --- | --- |
492
+ | `list` | The list (id or path name) |
493
+ | `index` | The index (id or path name) |
494
+
495
+ | Option | Description |
496
+ | --- | --- |
497
+ | `--name <name>` | The name |
498
+ | `--path-name <path name>` | The path name, used to filter and order items, and in place of the id |
499
+ | `--description <text>` | The description |
500
+ | `--tags <tags>` | Comma-separated tags, replacing any it has (repeatable; pass "" to remove them all) |
501
+ | `--pointer <pointer>` | The JSON pointer to the value in item data, e.g. /title |
502
+ | `--value-type <type>` | The type of value (one of: string, number, date) |
503
+ | `--default-order-direction <direction>` | The direction items are ordered in by default (one of: asc, desc) |
504
+ | `--alias` | Items can be fetched by this index's value, in place of their id |
505
+ | `--no-alias` | Not an alias |
506
+ | `--sorting` | Items can be ordered by this index |
507
+ | `--no-sorting` | Items can't be ordered by it |
508
+ | `--filtering` | Items can be filtered by this index |
509
+ | `--no-filtering` | Items can't be filtered by it |
510
+ | `--searching` | This index's values are included in searches |
511
+ | `--no-searching` | Not included in searches |
512
+ | `--guard` | The value is removed from item data returned with a token |
513
+ | `--no-guard` | Not a guard |
514
+ | `--data <json>` | The whole index as a JSON object (JSON, @file or - for stdin); the options above take precedence |
515
+ | `--wait` | Wait for the index to be built, if it needs building |
516
+ | `--timeout <seconds>` | How long --wait waits (default 600) |
517
+ | `-o, --output <format>` | Output format (default: table in a terminal, otherwise json) (one of: table, json, ndjson, id) |
518
+ | `--json` | Output JSON (the same as --output json) |
519
+ | `-q, --quiet` | Only output ids (the same as --output id) |
520
+
521
+ ### `jsonpad indexes delete`
522
+
523
+ Delete an index
524
+
525
+ ```
526
+ jsonpad indexes delete [options] <list> <index>
527
+ ```
528
+
529
+ | Argument | Description |
530
+ | --- | --- |
531
+ | `list` | The list (id or path name) |
532
+ | `index` | The index (id or path name) |
533
+
534
+ | Option | Description |
535
+ | --- | --- |
536
+ | `-y, --yes` | Don't ask for confirmation |
537
+
538
+ ### `jsonpad indexes rebuild`
539
+
540
+ The same as [`jsonpad rebuild-index`](#jsonpad-rebuild-index), with the same arguments and options.
541
+
542
+ ### `jsonpad indexes wait`
543
+
544
+ Wait for an index to finish building
545
+
546
+ ```
547
+ jsonpad indexes wait [options] <list> <index>
548
+ ```
549
+
550
+ | Argument | Description |
551
+ | --- | --- |
552
+ | `list` | The list (id or path name) |
553
+ | `index` | The index (id or path name) |
554
+
555
+ | Option | Description |
556
+ | --- | --- |
557
+ | `--timeout <seconds>` | How long to wait (default 600) |
558
+
559
+ ### `jsonpad indexes stats`
560
+
561
+ Show an index's events, by day
562
+
563
+ ```
564
+ jsonpad indexes stats [options] <list> <index>
565
+ ```
566
+
567
+ | Argument | Description |
568
+ | --- | --- |
569
+ | `list` | The list (id or path name) |
570
+ | `index` | The index (id or path name) |
571
+
572
+ | Option | Description |
573
+ | --- | --- |
574
+ | `--days <number>` | How many days of stats, up to 90 (default 7) |
575
+ | `-o, --output <format>` | Output format (default: table in a terminal, otherwise json) (one of: table, json) |
576
+ | `--json` | Output JSON (the same as --output json) |
577
+
578
+ ### `jsonpad indexes events`
579
+
580
+ List an index's events, newest first by default
581
+
582
+ ```
583
+ jsonpad indexes events [options] <list> <index>
584
+ ```
585
+
586
+ | Argument | Description |
587
+ | --- | --- |
588
+ | `list` | The list (id or path name) |
589
+ | `index` | The index (id or path name) |
590
+
591
+ | Option | Description |
592
+ | --- | --- |
593
+ | `--type <type>` | Only events of this type (one of: index-created, index-updated, index-deleted, index-built, index-build-failed, index-build-requested) |
594
+ | `--start-at <date>` | Only events at or after this date, e.g. 2026-09-01 |
595
+ | `--end-at <date>` | Only events at or before this date |
596
+ | `--include-snapshot` | Include the index as it was after each event |
597
+ | `--include-attachments` | Include each event's attachments |
598
+ | `--all` | Fetch every page, not just one. The output is NDJSON unless --output says otherwise |
599
+ | `--max <number>` | With --all, stop after this many |
600
+ | `--page <number>` | The page to fetch (default 1) |
601
+ | `--limit <number>` | How many to fetch per page, up to 100 (default 20) |
602
+ | `--order <field>` | The field to order by (one of: createdAt, type) |
603
+ | `--direction <direction>` | The order direction (one of: asc, desc) |
604
+ | `-o, --output <format>` | Output format (default: table in a terminal, otherwise json) (one of: table, json, ndjson, id) |
605
+ | `--json` | Output JSON (the same as --output json) |
606
+ | `-q, --quiet` | Only output ids (the same as --output id) |
607
+
608
+ ### `jsonpad indexes event`
609
+
610
+ Show one of an index's events
611
+
612
+ ```
613
+ jsonpad indexes event [options] <list> <index> <event>
614
+ ```
615
+
616
+ | Argument | Description |
617
+ | --- | --- |
618
+ | `list` | The list (id or path name) |
619
+ | `index` | The index (id or path name) |
620
+ | `event` | The event id |
621
+
622
+ | Option | Description |
623
+ | --- | --- |
624
+ | `--include-snapshot` | Include the index as it was after each event |
625
+ | `--include-attachments` | Include each event's attachments |
626
+ | `-o, --output <format>` | Output format (default: table in a terminal, otherwise json) (one of: table, json, ndjson, id) |
627
+ | `--json` | Output JSON (the same as --output json) |
628
+ | `-q, --quiet` | Only output ids (the same as --output id) |
629
+
630
+ ### `jsonpad items list`
631
+
632
+ List a list's items (the default when no command is given)
633
+
634
+ ```
635
+ jsonpad items list [options] <list>
636
+ ```
637
+
638
+ | Argument | Description |
639
+ | --- | --- |
640
+ | `list` | The list (id or path name) |
641
+
642
+ | Option | Description |
643
+ | --- | --- |
644
+ | `--where <index=value>` | Only items whose indexed value matches, e.g. --where title=Pancakes (repeatable; the index must allow filtering) |
645
+ | `--alias <value>` | Only the item with this alias |
646
+ | `--identity-id <id>` | Only items owned by this identity |
647
+ | `--readonly` | Only readonly items |
648
+ | `--no-readonly` | Only items that aren't readonly |
649
+ | `--tagged <tags>` | Only those with one of these comma-separated tags (repeat the option to require every group) |
650
+ | `--include-data` | Include each item's data |
651
+ | `--path <json path>` | With --include-data, only the part of the data matching this JSONPath, e.g. $.ingredients |
652
+ | `--include-guarded` | Include guarded values in the item data, for items the identity making the request owns |
653
+ | `--all` | Fetch every page, not just one. The output is NDJSON unless --output says otherwise |
654
+ | `--max <number>` | With --all, stop after this many |
655
+ | `--page <number>` | The page to fetch (default 1) |
656
+ | `--limit <number>` | How many to fetch per page, up to 100 (default 20) |
657
+ | `--order <field>` | The field to order by: createdAt, updatedAt, or an index path name |
658
+ | `--direction <direction>` | The order direction (one of: asc, desc) |
659
+ | `-o, --output <format>` | Output format (default: table in a terminal, otherwise json) (one of: table, json, ndjson, id) |
660
+ | `--json` | Output JSON (the same as --output json) |
661
+ | `-q, --quiet` | Only output ids (the same as --output id) |
662
+
663
+ ### `jsonpad items get`
664
+
665
+ Show an item, with its data
666
+
667
+ ```
668
+ jsonpad items get [options] <list> <item>
669
+ ```
670
+
671
+ | Argument | Description |
672
+ | --- | --- |
673
+ | `list` | The list (id or path name) |
674
+ | `item` | The item (id or alias) |
675
+
676
+ | Option | Description |
677
+ | --- | --- |
678
+ | `--item-version <version>` | An earlier version of the item (see its events) |
679
+ | `--path <json path>` | Only the part of the data matching this JSONPath, e.g. $.ingredients |
680
+ | `--no-data` | Leave out the item's data |
681
+ | `--generate` | Generate the item's data, in a generative list |
682
+ | `--include-guarded` | Include guarded values in the item data, for items the identity making the request owns |
683
+ | `-o, --output <format>` | Output format (default: table in a terminal, otherwise json) (one of: table, json, ndjson, id) |
684
+ | `--json` | Output JSON (the same as --output json) |
685
+ | `-q, --quiet` | Only output ids (the same as --output id) |
686
+
687
+ ### `jsonpad items create`
688
+
689
+ Create an item
690
+
691
+ ```
692
+ jsonpad items create [options] <list>
693
+ ```
694
+
695
+ | Argument | Description |
696
+ | --- | --- |
697
+ | `list` | The list (id or path name) |
698
+
699
+ | Option | Description |
700
+ | --- | --- |
701
+ | `--data <json>` | The item's data: JSON, @file or - for stdin |
702
+ | `--description <text>` | The description |
703
+ | `--tags <tags>` | Comma-separated tags, replacing any it has (repeatable; pass "" to remove them all) |
704
+ | `--readonly` | The item can't be changed or deleted |
705
+ | `--no-readonly` | Not readonly |
706
+ | `--generate` | Generate the item's data, in a generative list |
707
+ | `-o, --output <format>` | Output format (default: table in a terminal, otherwise json) (one of: table, json, ndjson, id) |
708
+ | `--json` | Output JSON (the same as --output json) |
709
+ | `-q, --quiet` | Only output ids (the same as --output id) |
710
+
711
+ ### `jsonpad items update`
712
+
713
+ Change an item. --data replaces all of its data; fields that aren't given are left as they are
714
+
715
+ ```
716
+ jsonpad items update [options] <list> <item>
717
+ ```
718
+
719
+ | Argument | Description |
720
+ | --- | --- |
721
+ | `list` | The list (id or path name) |
722
+ | `item` | The item (id or alias) |
723
+
724
+ | Option | Description |
725
+ | --- | --- |
726
+ | `--data <json>` | The item's data: JSON, @file or - for stdin |
727
+ | `--description <text>` | The description |
728
+ | `--tags <tags>` | Comma-separated tags, replacing any it has (repeatable; pass "" to remove them all) |
729
+ | `--readonly` | The item can't be changed or deleted |
730
+ | `--no-readonly` | Not readonly |
731
+ | `-o, --output <format>` | Output format (default: table in a terminal, otherwise json) (one of: table, json, ndjson, id) |
732
+ | `--json` | Output JSON (the same as --output json) |
733
+ | `-q, --quiet` | Only output ids (the same as --output id) |
734
+
735
+ ### `jsonpad items delete`
736
+
737
+ Delete an item. It can be restored from its events
738
+
739
+ ```
740
+ jsonpad items delete [options] <list> <item>
741
+ ```
742
+
743
+ | Argument | Description |
744
+ | --- | --- |
745
+ | `list` | The list (id or path name) |
746
+ | `item` | The item (id or alias) |
747
+
748
+ | Option | Description |
749
+ | --- | --- |
750
+ | `-y, --yes` | Don't ask for confirmation |
751
+
752
+ ### `jsonpad items restore`
753
+
754
+ Restore an item to how it was after one of its events, re-creating it if it was deleted. Find restorable events with jsonpad items events <list> <item> --restorable
755
+
756
+ ```
757
+ jsonpad items restore [options] <list> <item> <event>
758
+ ```
759
+
760
+ | Argument | Description |
761
+ | --- | --- |
762
+ | `list` | The list (id or path name) |
763
+ | `item` | The item (id or alias) |
764
+ | `event` | The event id |
765
+
766
+ | Option | Description |
767
+ | --- | --- |
768
+ | `-o, --output <format>` | Output format (default: table in a terminal, otherwise json) (one of: table, json, ndjson, id) |
769
+ | `--json` | Output JSON (the same as --output json) |
770
+ | `-q, --quiet` | Only output ids (the same as --output id) |
771
+
772
+ ### `jsonpad items stats`
773
+
774
+ Show an item's events, by day
775
+
776
+ ```
777
+ jsonpad items stats [options] <list> <item>
778
+ ```
779
+
780
+ | Argument | Description |
781
+ | --- | --- |
782
+ | `list` | The list (id or path name) |
783
+ | `item` | The item (id or alias) |
784
+
785
+ | Option | Description |
786
+ | --- | --- |
787
+ | `--days <number>` | How many days of stats, up to 90 (default 7) |
788
+ | `-o, --output <format>` | Output format (default: table in a terminal, otherwise json) (one of: table, json) |
789
+ | `--json` | Output JSON (the same as --output json) |
790
+
791
+ ### `jsonpad items events`
792
+
793
+ List an item's events, newest first by default
794
+
795
+ ```
796
+ jsonpad items events [options] <list> <item>
797
+ ```
798
+
799
+ | Argument | Description |
800
+ | --- | --- |
801
+ | `list` | The list (id or path name) |
802
+ | `item` | The item (id or alias) |
803
+
804
+ | Option | Description |
805
+ | --- | --- |
806
+ | `--type <type>` | Only events of this type (one of: item-created, item-updated, item-restored, item-deleted) |
807
+ | `--start-at <date>` | Only events at or after this date, e.g. 2026-09-01 |
808
+ | `--end-at <date>` | Only events at or before this date |
809
+ | `--restorable` | Only events the item can be restored to (jsonpad items restore) |
810
+ | `--include-snapshot` | Include the item as it was after each event |
811
+ | `--include-attachments` | Include each event's attachments |
812
+ | `--include-guarded` | Include guarded values in snapshots, for items the identity making the request owns |
813
+ | `--all` | Fetch every page, not just one. The output is NDJSON unless --output says otherwise |
814
+ | `--max <number>` | With --all, stop after this many |
815
+ | `--page <number>` | The page to fetch (default 1) |
816
+ | `--limit <number>` | How many to fetch per page, up to 100 (default 20) |
817
+ | `--order <field>` | The field to order by (one of: createdAt, type) |
818
+ | `--direction <direction>` | The order direction (one of: asc, desc) |
819
+ | `-o, --output <format>` | Output format (default: table in a terminal, otherwise json) (one of: table, json, ndjson, id) |
820
+ | `--json` | Output JSON (the same as --output json) |
821
+ | `-q, --quiet` | Only output ids (the same as --output id) |
822
+
823
+ ### `jsonpad items event`
824
+
825
+ Show one of an item's events
826
+
827
+ ```
828
+ jsonpad items event [options] <list> <item> <event>
829
+ ```
830
+
831
+ | Argument | Description |
832
+ | --- | --- |
833
+ | `list` | The list (id or path name) |
834
+ | `item` | The item (id or alias) |
835
+ | `event` | The event id |
836
+
837
+ | Option | Description |
838
+ | --- | --- |
839
+ | `--include-snapshot` | Include the item as it was after each event |
840
+ | `--include-attachments` | Include each event's attachments |
841
+ | `--include-guarded` | Include guarded values in snapshots, for items the identity making the request owns |
842
+ | `-o, --output <format>` | Output format (default: table in a terminal, otherwise json) (one of: table, json, ndjson, id) |
843
+ | `--json` | Output JSON (the same as --output json) |
844
+ | `-q, --quiet` | Only output ids (the same as --output id) |
845
+
846
+ ### `jsonpad items export`
847
+
848
+ Output every item in a list as NDJSON (one item per line), oldest first, e.g. for a backup. Import them again with jsonpad items import
849
+
850
+ ```
851
+ jsonpad items export [options] <list>
852
+ ```
853
+
854
+ | Argument | Description |
855
+ | --- | --- |
856
+ | `list` | The list (id or path name) |
857
+
858
+ | Option | Description |
859
+ | --- | --- |
860
+ | `--out <file>` | Write to a file, not stdout |
861
+ | `--data-only` | Only output each item's data |
862
+ | `--where <index=value>` | Only items whose indexed value matches (repeatable) |
863
+ | `--tagged <tags>` | Only items with one of these comma-separated tags (repeat the option to require every group) |
864
+ | `--include-guarded` | Include guarded values, for items the identity making the request owns |
865
+ | `--max <number>` | Stop after this many items |
866
+
867
+ ### `jsonpad items import`
868
+
869
+ Create an item for each record in a file: NDJSON (one record per line), or a JSON array. Records are items, as jsonpad items export outputs them, or with --data-only, item data. Items are created one at a time, at the pace the plan allows
870
+
871
+ ```
872
+ jsonpad items import [options] <list> <file>
873
+ ```
874
+
875
+ | Argument | Description |
876
+ | --- | --- |
877
+ | `list` | The list (id or path name) |
878
+ | `file` | The file to import, or - for stdin |
879
+
880
+ | Option | Description |
881
+ | --- | --- |
882
+ | `--data-only` | Each record is the data for an item |
883
+ | `--dry-run` | Check the records, and say how many items would be created, without creating any |
884
+ | `--continue-on-error` | Carry on when an item can't be created, instead of stopping |
885
+
886
+ ### `jsonpad items data get`
887
+
888
+ Output an item's data, or part of it. Without an item, output the data of a page of the list's items
889
+
890
+ ```
891
+ jsonpad items data get [options] <list> [item] [pointer]
892
+ ```
893
+
894
+ | Argument | Description |
895
+ | --- | --- |
896
+ | `list` | The list (id or path name) |
897
+ | `item` (optional) | The item (id or alias) |
898
+ | `pointer` (optional) | A JSON pointer to part of the data, e.g. /ingredients/0 |
899
+
900
+ | Option | Description |
901
+ | --- | --- |
902
+ | `--item-version <version>` | An earlier version of the item (see its events) |
903
+ | `--path <json path>` | Only the part of the data matching this JSONPath, e.g. $.ingredients |
904
+ | `--where <index=value>` | Without an item: only items whose indexed value matches (repeatable) |
905
+ | `--include-guarded` | Include guarded values in the item data, for items the identity making the request owns |
906
+ | `--all` | Without an item: output every item's data, one per line (NDJSON) unless --output is json |
907
+ | `--max <number>` | With --all, stop after this many |
908
+ | `-o, --output <format>` | Output format: json (the default), or ndjson for one line per value (one of: json, ndjson) |
909
+ | `--page <number>` | The page to fetch (default 1) |
910
+ | `--limit <number>` | How many to fetch per page, up to 100 (default 20) |
911
+ | `--order <field>` | Without an item: the field to order by (createdAt, updatedAt, or an index path name) |
912
+ | `--direction <direction>` | The order direction (one of: asc, desc) |
913
+
914
+ ### `jsonpad items data set`
915
+
916
+ Merge data into an item's data, or into part of it. Objects are merged, and arrays are added to. Outputs the changed item
917
+
918
+ ```
919
+ jsonpad items data set [options] <list> <item> [pointer]
920
+ ```
921
+
922
+ | Argument | Description |
923
+ | --- | --- |
924
+ | `list` | The list (id or path name) |
925
+ | `item` | The item (id or alias) |
926
+ | `pointer` (optional) | A JSON pointer to part of the data, e.g. /ingredients |
927
+
928
+ | Option | Description |
929
+ | --- | --- |
930
+ | `--data <json>` | The data: JSON, @file or - for stdin |
931
+ | `-o, --output <format>` | Output format (default: table in a terminal, otherwise json) (one of: table, json, ndjson, id) |
932
+ | `--json` | Output JSON (the same as --output json) |
933
+ | `-q, --quiet` | Only output ids (the same as --output id) |
934
+
935
+ ### `jsonpad items data replace`
936
+
937
+ Replace an item's data, or part of it. Outputs the changed item
938
+
939
+ ```
940
+ jsonpad items data replace [options] <list> <item> [pointer]
941
+ ```
942
+
943
+ | Argument | Description |
944
+ | --- | --- |
945
+ | `list` | The list (id or path name) |
946
+ | `item` | The item (id or alias) |
947
+ | `pointer` (optional) | A JSON pointer to part of the data, e.g. /ingredients |
948
+
949
+ | Option | Description |
950
+ | --- | --- |
951
+ | `--data <json>` | The data: JSON, @file or - for stdin |
952
+ | `-o, --output <format>` | Output format (default: table in a terminal, otherwise json) (one of: table, json, ndjson, id) |
953
+ | `--json` | Output JSON (the same as --output json) |
954
+ | `-q, --quiet` | Only output ids (the same as --output id) |
955
+
956
+ ### `jsonpad items data patch`
957
+
958
+ Change an item's data, or part of it, with a JSON patch (RFC 6902). Outputs the changed item
959
+
960
+ ```
961
+ jsonpad items data patch [options] <list> <item> [pointer]
962
+ ```
963
+
964
+ | Argument | Description |
965
+ | --- | --- |
966
+ | `list` | The list (id or path name) |
967
+ | `item` | The item (id or alias) |
968
+ | `pointer` (optional) | A JSON pointer to part of the data, e.g. /ingredients |
969
+
970
+ | Option | Description |
971
+ | --- | --- |
972
+ | `--patch <json>` | The JSON patch: JSON, @file or - for stdin |
973
+ | `-o, --output <format>` | Output format (default: table in a terminal, otherwise json) (one of: table, json, ndjson, id) |
974
+ | `--json` | Output JSON (the same as --output json) |
975
+ | `-q, --quiet` | Only output ids (the same as --output id) |
976
+
977
+ ### `jsonpad items data delete`
978
+
979
+ Delete part of an item's data. Outputs the changed item
980
+
981
+ ```
982
+ jsonpad items data delete [options] <list> <item> <pointer>
983
+ ```
984
+
985
+ | Argument | Description |
986
+ | --- | --- |
987
+ | `list` | The list (id or path name) |
988
+ | `item` | The item (id or alias) |
989
+ | `pointer` | A JSON pointer to the part to delete, e.g. /ingredients/0 |
990
+
991
+ | Option | Description |
992
+ | --- | --- |
993
+ | `-y, --yes` | Don't ask for confirmation |
994
+ | `-o, --output <format>` | Output format (default: table in a terminal, otherwise json) (one of: table, json, ndjson, id) |
995
+ | `--json` | Output JSON (the same as --output json) |
996
+ | `-q, --quiet` | Only output ids (the same as --output id) |
997
+
998
+ ### `jsonpad identities list`
999
+
1000
+ List identities (the default when no command is given)
1001
+
1002
+ ```
1003
+ jsonpad identities list [options]
1004
+ ```
1005
+
1006
+ | Option | Description |
1007
+ | --- | --- |
1008
+ | `--group <group>` | Only identities whose group contains this |
1009
+ | `--name <name>` | Only identities whose name contains this |
1010
+ | `--display-name <name>` | Only identities whose display name contains this |
1011
+ | `--tagged <tags>` | Only those with one of these comma-separated tags (repeat the option to require every group) |
1012
+ | `--all` | Fetch every page, not just one. The output is NDJSON unless --output says otherwise |
1013
+ | `--max <number>` | With --all, stop after this many |
1014
+ | `--page <number>` | The page to fetch (default 1) |
1015
+ | `--limit <number>` | How many to fetch per page, up to 100 (default 20) |
1016
+ | `--order <field>` | The field to order by (one of: createdAt, updatedAt, name, displayName, group, activated) |
1017
+ | `--direction <direction>` | The order direction (one of: asc, desc) |
1018
+ | `-o, --output <format>` | Output format (default: table in a terminal, otherwise json) (one of: table, json, ndjson, id) |
1019
+ | `--json` | Output JSON (the same as --output json) |
1020
+ | `-q, --quiet` | Only output ids (the same as --output id) |
1021
+
1022
+ ### `jsonpad identities get`
1023
+
1024
+ Show an identity
1025
+
1026
+ ```
1027
+ jsonpad identities get [options] <identity>
1028
+ ```
1029
+
1030
+ | Argument | Description |
1031
+ | --- | --- |
1032
+ | `identity` | The identity: its id, group/name, or the name of an identity without a group |
1033
+
1034
+ | Option | Description |
1035
+ | --- | --- |
1036
+ | `-o, --output <format>` | Output format (default: table in a terminal, otherwise json) (one of: table, json, ndjson, id) |
1037
+ | `--json` | Output JSON (the same as --output json) |
1038
+ | `-q, --quiet` | Only output ids (the same as --output id) |
1039
+
1040
+ ### `jsonpad identities create`
1041
+
1042
+ Create an identity. The password is asked for in a terminal, or read from stdin or JSONPAD_IDENTITY_PASSWORD
1043
+
1044
+ ```
1045
+ jsonpad identities create [options]
1046
+ ```
1047
+
1048
+ | Option | Description |
1049
+ | --- | --- |
1050
+ | `--group <group>` | The group, which separates identities with the same name |
1051
+ | `--name <name>` | The name, used to log in |
1052
+ | `--display-name <name>` | The name to show |
1053
+ | `--tags <tags>` | Comma-separated tags, replacing any it has (repeatable; pass "" to remove them all) |
1054
+ | `-o, --output <format>` | Output format (default: table in a terminal, otherwise json) (one of: table, json, ndjson, id) |
1055
+ | `--json` | Output JSON (the same as --output json) |
1056
+ | `-q, --quiet` | Only output ids (the same as --output id) |
1057
+
1058
+ ### `jsonpad identities update`
1059
+
1060
+ Change an identity. Fields that aren't given are left as they are
1061
+
1062
+ ```
1063
+ jsonpad identities update [options] <identity>
1064
+ ```
1065
+
1066
+ | Argument | Description |
1067
+ | --- | --- |
1068
+ | `identity` | The identity: its id, group/name, or the name of an identity without a group |
1069
+
1070
+ | Option | Description |
1071
+ | --- | --- |
1072
+ | `--group <group>` | The group, which separates identities with the same name |
1073
+ | `--name <name>` | The name, used to log in |
1074
+ | `--display-name <name>` | The name to show |
1075
+ | `--tags <tags>` | Comma-separated tags, replacing any it has (repeatable; pass "" to remove them all) |
1076
+ | `--no-display-name` | Remove the display name |
1077
+ | `--password` | Change the password: asked for in a terminal, or read from stdin or JSONPAD_IDENTITY_PASSWORD |
1078
+ | `-o, --output <format>` | Output format (default: table in a terminal, otherwise json) (one of: table, json, ndjson, id) |
1079
+ | `--json` | Output JSON (the same as --output json) |
1080
+ | `-q, --quiet` | Only output ids (the same as --output id) |
1081
+
1082
+ ### `jsonpad identities delete`
1083
+
1084
+ Delete an identity
1085
+
1086
+ ```
1087
+ jsonpad identities delete [options] <identity>
1088
+ ```
1089
+
1090
+ | Argument | Description |
1091
+ | --- | --- |
1092
+ | `identity` | The identity: its id, group/name, or the name of an identity without a group |
1093
+
1094
+ | Option | Description |
1095
+ | --- | --- |
1096
+ | `-y, --yes` | Don't ask for confirmation |
1097
+
1098
+ ### `jsonpad identities register`
1099
+
1100
+ Register an identity, as an app would for a new user. Unlike create, this needs the token's register permission. The password is asked for in a terminal, or read from stdin or JSONPAD_IDENTITY_PASSWORD
1101
+
1102
+ ```
1103
+ jsonpad identities register [options]
1104
+ ```
1105
+
1106
+ | Option | Description |
1107
+ | --- | --- |
1108
+ | `--group <group>` | The group |
1109
+ | `--name <name>` | The name, used to log in |
1110
+ | `--display-name <name>` | The name to show |
1111
+ | `--tags <tags>` | Comma-separated tags, replacing any it has (repeatable; pass "" to remove them all) |
1112
+ | `-o, --output <format>` | Output format (default: table in a terminal, otherwise json) (one of: table, json, ndjson, id) |
1113
+ | `--json` | Output JSON (the same as --output json) |
1114
+ | `-q, --quiet` | Only output ids (the same as --output id) |
1115
+
1116
+ ### `jsonpad identities login`
1117
+
1118
+ Log in as an identity, and output its identity token. Set JSONPAD_IDENTITY_TOKEN (and JSONPAD_IDENTITY_GROUP) to it to act as the identity when working with items, e.g. eval "$(jsonpad identities login --name ada -o env)". The password is asked for in a terminal, or read from stdin or JSONPAD_IDENTITY_PASSWORD
1119
+
1120
+ ```
1121
+ jsonpad identities login [options]
1122
+ ```
1123
+
1124
+ | Option | Description |
1125
+ | --- | --- |
1126
+ | `--group <group>` | The identity's group |
1127
+ | `--name <name>` | The identity's name |
1128
+ | `-o, --output <format>` | Output format: table (the default in a terminal), json (the default otherwise), env (export commands for a POSIX shell), or token (just the token) (one of: table, json, env, token) |
1129
+
1130
+ ### `jsonpad identities logout`
1131
+
1132
+ Log out the identity in JSONPAD_IDENTITY_TOKEN, so that its token stops working
1133
+
1134
+ ```
1135
+ jsonpad identities logout [options]
1136
+ ```
1137
+
1138
+ ### `jsonpad identities self get`
1139
+
1140
+ Show the identity in JSONPAD_IDENTITY_TOKEN (the default when no command is given)
1141
+
1142
+ ```
1143
+ jsonpad identities self get [options]
1144
+ ```
1145
+
1146
+ | Option | Description |
1147
+ | --- | --- |
1148
+ | `-o, --output <format>` | Output format (default: table in a terminal, otherwise json) (one of: table, json, ndjson, id) |
1149
+ | `--json` | Output JSON (the same as --output json) |
1150
+ | `-q, --quiet` | Only output ids (the same as --output id) |
1151
+
1152
+ ### `jsonpad identities self update`
1153
+
1154
+ Change the identity in JSONPAD_IDENTITY_TOKEN. Fields that aren't given are left as they are
1155
+
1156
+ ```
1157
+ jsonpad identities self update [options]
1158
+ ```
1159
+
1160
+ | Option | Description |
1161
+ | --- | --- |
1162
+ | `--name <name>` | The name, used to log in |
1163
+ | `--display-name <name>` | The name to show |
1164
+ | `--no-display-name` | Remove the display name |
1165
+ | `--password` | Change the password: asked for in a terminal, or read from stdin or JSONPAD_IDENTITY_PASSWORD |
1166
+ | `-o, --output <format>` | Output format (default: table in a terminal, otherwise json) (one of: table, json, ndjson, id) |
1167
+ | `--json` | Output JSON (the same as --output json) |
1168
+ | `-q, --quiet` | Only output ids (the same as --output id) |
1169
+
1170
+ ### `jsonpad identities self delete`
1171
+
1172
+ Delete the identity in JSONPAD_IDENTITY_TOKEN
1173
+
1174
+ ```
1175
+ jsonpad identities self delete [options]
1176
+ ```
1177
+
1178
+ | Option | Description |
1179
+ | --- | --- |
1180
+ | `-y, --yes` | Don't ask for confirmation |
1181
+
1182
+ ### `jsonpad identities stats`
1183
+
1184
+ Show an identity's events, by day
1185
+
1186
+ ```
1187
+ jsonpad identities stats [options] <identity>
1188
+ ```
1189
+
1190
+ | Argument | Description |
1191
+ | --- | --- |
1192
+ | `identity` | The identity: its id, group/name, or the name of an identity without a group |
1193
+
1194
+ | Option | Description |
1195
+ | --- | --- |
1196
+ | `--days <number>` | How many days of stats, up to 90 (default 7) |
1197
+ | `-o, --output <format>` | Output format (default: table in a terminal, otherwise json) (one of: table, json) |
1198
+ | `--json` | Output JSON (the same as --output json) |
1199
+
1200
+ ### `jsonpad identities events`
1201
+
1202
+ List an identity's events, newest first by default
1203
+
1204
+ ```
1205
+ jsonpad identities events [options] <identity>
1206
+ ```
1207
+
1208
+ | Argument | Description |
1209
+ | --- | --- |
1210
+ | `identity` | The identity: its id, group/name, or the name of an identity without a group |
1211
+
1212
+ | Option | Description |
1213
+ | --- | --- |
1214
+ | `--type <type>` | Only events of this type (one of: identity-created, identity-updated, identity-deleted, identity-registered, identity-logged-in, identity-logged-out, identity-updated-self, identity-deleted-self) |
1215
+ | `--start-at <date>` | Only events at or after this date, e.g. 2026-09-01 |
1216
+ | `--end-at <date>` | Only events at or before this date |
1217
+ | `--include-snapshot` | Include the identity as it was after each event |
1218
+ | `--include-attachments` | Include each event's attachments |
1219
+ | `--all` | Fetch every page, not just one. The output is NDJSON unless --output says otherwise |
1220
+ | `--max <number>` | With --all, stop after this many |
1221
+ | `--page <number>` | The page to fetch (default 1) |
1222
+ | `--limit <number>` | How many to fetch per page, up to 100 (default 20) |
1223
+ | `--order <field>` | The field to order by (one of: createdAt, type) |
1224
+ | `--direction <direction>` | The order direction (one of: asc, desc) |
1225
+ | `-o, --output <format>` | Output format (default: table in a terminal, otherwise json) (one of: table, json, ndjson, id) |
1226
+ | `--json` | Output JSON (the same as --output json) |
1227
+ | `-q, --quiet` | Only output ids (the same as --output id) |
1228
+
1229
+ ### `jsonpad identities event`
1230
+
1231
+ Show one of an identity's events
1232
+
1233
+ ```
1234
+ jsonpad identities event [options] <identity> <event>
1235
+ ```
1236
+
1237
+ | Argument | Description |
1238
+ | --- | --- |
1239
+ | `identity` | The identity: its id, group/name, or the name of an identity without a group |
1240
+ | `event` | The event id |
1241
+
1242
+ | Option | Description |
1243
+ | --- | --- |
1244
+ | `--include-snapshot` | Include the identity as it was after each event |
1245
+ | `--include-attachments` | Include each event's attachments |
1246
+ | `-o, --output <format>` | Output format (default: table in a terminal, otherwise json) (one of: table, json, ndjson, id) |
1247
+ | `--json` | Output JSON (the same as --output json) |
1248
+ | `-q, --quiet` | Only output ids (the same as --output id) |
1249
+
1250
+ ### `jsonpad whoami`
1251
+
1252
+ Show the token you're using: what it can do, its plan's limits, and the account's usage this month
1253
+
1254
+ ```
1255
+ jsonpad whoami [options]
1256
+ ```
1257
+
1258
+ | Option | Description |
1259
+ | --- | --- |
1260
+ | `-o, --output <format>` | Output format (default: table in a terminal, otherwise json) (one of: table, json, ndjson, id) |
1261
+ | `--json` | Output JSON (the same as --output json) |
1262
+ | `-q, --quiet` | Only output ids (the same as --output id) |
1263
+
1264
+ ### `jsonpad config set-profile`
1265
+
1266
+ Add or update a profile. The token is asked for in a terminal, or read from stdin (e.g. from a password manager). The global --api-url option sets the profile's API URL
1267
+
1268
+ ```
1269
+ jsonpad config set-profile [options] <name>
1270
+ ```
1271
+
1272
+ | Argument | Description |
1273
+ | --- | --- |
1274
+ | `name` | The profile name |
1275
+
1276
+ | Option | Description |
1277
+ | --- | --- |
1278
+ | `--default` | Make this the default profile |
1279
+
1280
+ ### `jsonpad config use`
1281
+
1282
+ Choose the default profile
1283
+
1284
+ ```
1285
+ jsonpad config use [options] <name>
1286
+ ```
1287
+
1288
+ | Argument | Description |
1289
+ | --- | --- |
1290
+ | `name` | The profile name |
1291
+
1292
+ ### `jsonpad config list`
1293
+
1294
+ List profiles (tokens are masked)
1295
+
1296
+ ```
1297
+ jsonpad config list [options]
1298
+ ```
1299
+
1300
+ | Option | Description |
1301
+ | --- | --- |
1302
+ | `-o, --output <format>` | Output format (default: table in a terminal, otherwise json) (one of: table, json, ndjson, id) |
1303
+ | `--json` | Output JSON (the same as --output json) |
1304
+ | `-q, --quiet` | Only output ids (the same as --output id) |
1305
+
1306
+ ### `jsonpad config remove`
1307
+
1308
+ Remove a profile
1309
+
1310
+ ```
1311
+ jsonpad config remove [options] <name>
1312
+ ```
1313
+
1314
+ | Argument | Description |
1315
+ | --- | --- |
1316
+ | `name` | The profile name |
1317
+
1318
+ | Option | Description |
1319
+ | --- | --- |
1320
+ | `-y, --yes` | Don't ask for confirmation |
1321
+
1322
+ ### `jsonpad config path`
1323
+
1324
+ Show where the config file is (set JSONPAD_CONFIG to use a different file)
1325
+
1326
+ ```
1327
+ jsonpad config path [options]
1328
+ ```
1329
+
1330
+ ### `jsonpad listen`
1331
+
1332
+ Print realtime events from lists and items as they happen, until you press Ctrl+C. Only lists with realtime turned on send events. This connects to https://realtime.jsonpad.io, so it doesn't work with --api-url or a profile for another API
1333
+
1334
+ ```
1335
+ jsonpad listen [options] [list...]
1336
+ ```
1337
+
1338
+ | Argument | Description |
1339
+ | --- | --- |
1340
+ | `list...` (optional) | Only events from these lists (ids or path names). Without any, events from every realtime list |
1341
+
1342
+ | Option | Description |
1343
+ | --- | --- |
1344
+ | `--items <items>` | Only events for these comma-separated items (ids or aliases; repeatable) |
1345
+ | `--events <types>` | Only these comma-separated event types (repeatable): list-created, list-updated, list-deleted, item-created, item-updated, item-restored, item-deleted |
1346
+ | `-o, --output <format>` | Output format: text (the default in a terminal), or ndjson (the default otherwise) (one of: text, ndjson) |
1347
+ | `--count <number>` | Stop after this many events |
1348
+
1349
+ ### `jsonpad completion`
1350
+
1351
+ Output a script that completes jsonpad commands and options when you press Tab
1352
+
1353
+ ```
1354
+ jsonpad completion [options] <shell>
1355
+ ```
1356
+
1357
+ | Argument | Description |
1358
+ | --- | --- |
1359
+ | `shell` | The shell |
1360
+
1361
+ ## Global options
1362
+
1363
+ Every command accepts these.
1364
+
1365
+ | Option | Description |
1366
+ | --- | --- |
1367
+ | `-v, --version` | Show the version |
1368
+ | `--profile <name>` | Use a saved profile (see jsonpad config) |
1369
+ | `--api-url <url>` | The API's URL, e.g. a local server |
1370
+ | `-V, --verbose` | Log requests, and the rate limit and quota |
1371
+ | `--identity-group <group>` | The group of the identity in JSONPAD_IDENTITY_TOKEN (for identities in a group) |
1372
+
105
1373
  ## Environment
106
1374
 
107
1375
  ```
108
- JSONPAD_TOKEN The API token to use (required). The token needs the
109
- sync-schema permission for schema commands, plus
110
- permission for each change a sync makes
1376
+ JSONPAD_TOKEN The API token to use, if you don't use a profile. The
1377
+ token needs the sync-schema permission for schema
1378
+ commands, plus permission for each change a sync makes
111
1379
  JSONPAD_API_URL The API's URL (default https://api.jsonpad.io)
1380
+ JSONPAD_PROFILE The profile to use, like --profile
1381
+ JSONPAD_CONFIG The config file, where profiles are saved (see
1382
+ jsonpad config path)
1383
+ JSONPAD_IDENTITY_TOKEN
1384
+ Act as this identity when working with items (see
1385
+ jsonpad identities login)
1386
+ JSONPAD_IDENTITY_GROUP
1387
+ The identity's group, like --identity-group
1388
+ JSONPAD_IDENTITY_PASSWORD
1389
+ A password for identities create, register and login
112
1390
  NO_COLOR Set to turn off coloured output
1391
+
1392
+ A profile chosen with --profile or JSONPAD_PROFILE comes first, then
1393
+ JSONPAD_TOKEN, then the default profile.
113
1394
  ```
114
1395
 
115
1396
  ## Exit codes
@@ -120,4 +1401,12 @@ NO_COLOR Set to turn off coloured output
120
1401
  2 A sync was refused because it needs --allow-rebuild
121
1402
  3 An index build failed, or didn't finish in time, while waiting
122
1403
  4 A sync was refused because it needs --allow-destructive
1404
+ 5 Refused because it needs confirmation: run again with --yes
1405
+ 6 Not found
1406
+ 7 The token isn't allowed to do this, or isn't valid
1407
+ 8 Rate limited (after retrying), or a plan limit or the monthly quota was
1408
+ reached
1409
+
1410
+ The schema commands and rebuild-index (and indexes rebuild) exit with 1 for
1411
+ every API error, as they did in @basementuniverse/jsonpad-sdk.
123
1412
  ```