powersync 0.0.0-dev-20260305082615

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.
Files changed (99) hide show
  1. package/LICENSE +67 -0
  2. package/README.md +1596 -0
  3. package/bin/dev.cmd +3 -0
  4. package/bin/dev.js +22 -0
  5. package/bin/run.cmd +3 -0
  6. package/bin/run.js +12 -0
  7. package/dist/api/cloud/create-cloud-instance.d.ts +15 -0
  8. package/dist/api/cloud/create-cloud-instance.js +19 -0
  9. package/dist/api/cloud/fetch-cloud-config.d.ts +12 -0
  10. package/dist/api/cloud/fetch-cloud-config.js +18 -0
  11. package/dist/api/cloud/fetch-cloud-sync-rules-content.d.ts +7 -0
  12. package/dist/api/cloud/fetch-cloud-sync-rules-content.js +26 -0
  13. package/dist/api/cloud/test-connection.d.ts +16 -0
  14. package/dist/api/cloud/test-connection.js +36 -0
  15. package/dist/api/cloud/validate-cloud-link-config.d.ts +17 -0
  16. package/dist/api/cloud/validate-cloud-link-config.js +47 -0
  17. package/dist/api/cloud/wait-for-operation.d.ts +16 -0
  18. package/dist/api/cloud/wait-for-operation.js +33 -0
  19. package/dist/api/cloud/write-cloud-link.d.ts +10 -0
  20. package/dist/api/cloud/write-cloud-link.js +21 -0
  21. package/dist/api/display-status.d.ts +4 -0
  22. package/dist/api/display-status.js +80 -0
  23. package/dist/api/ide/configure-vscode-ide.d.ts +14 -0
  24. package/dist/api/ide/configure-vscode-ide.js +62 -0
  25. package/dist/api/login-server.d.ts +26 -0
  26. package/dist/api/login-server.js +137 -0
  27. package/dist/api/run-validation-tests.d.ts +63 -0
  28. package/dist/api/run-validation-tests.js +202 -0
  29. package/dist/api/self-hosted/fetch-self-hosted-sync-rules-content.d.ts +7 -0
  30. package/dist/api/self-hosted/fetch-self-hosted-sync-rules-content.js +26 -0
  31. package/dist/commands/configure/ide.d.ts +8 -0
  32. package/dist/commands/configure/ide.js +58 -0
  33. package/dist/commands/configure/index.d.ts +8 -0
  34. package/dist/commands/configure/index.js +11 -0
  35. package/dist/commands/deploy/index.d.ts +48 -0
  36. package/dist/commands/deploy/index.js +333 -0
  37. package/dist/commands/deploy/service-config.d.ts +14 -0
  38. package/dist/commands/deploy/service-config.js +30 -0
  39. package/dist/commands/deploy/sync-config.d.ts +24 -0
  40. package/dist/commands/deploy/sync-config.js +103 -0
  41. package/dist/commands/destroy.d.ts +14 -0
  42. package/dist/commands/destroy.js +62 -0
  43. package/dist/commands/fetch/config.d.ts +14 -0
  44. package/dist/commands/fetch/config.js +33 -0
  45. package/dist/commands/fetch/index.d.ts +13 -0
  46. package/dist/commands/fetch/index.js +16 -0
  47. package/dist/commands/fetch/instances.d.ts +47 -0
  48. package/dist/commands/fetch/instances.js +177 -0
  49. package/dist/commands/fetch/status.d.ts +18 -0
  50. package/dist/commands/fetch/status.js +60 -0
  51. package/dist/commands/generate/index.d.ts +8 -0
  52. package/dist/commands/generate/index.js +11 -0
  53. package/dist/commands/generate/schema.d.ts +19 -0
  54. package/dist/commands/generate/schema.js +72 -0
  55. package/dist/commands/generate/token.d.ts +25 -0
  56. package/dist/commands/generate/token.js +124 -0
  57. package/dist/commands/init/cloud.d.ts +11 -0
  58. package/dist/commands/init/cloud.js +64 -0
  59. package/dist/commands/init/index.d.ts +8 -0
  60. package/dist/commands/init/index.js +11 -0
  61. package/dist/commands/init/self-hosted.d.ts +11 -0
  62. package/dist/commands/init/self-hosted.js +60 -0
  63. package/dist/commands/link/cloud.d.ts +15 -0
  64. package/dist/commands/link/cloud.js +111 -0
  65. package/dist/commands/link/index.d.ts +8 -0
  66. package/dist/commands/link/index.js +11 -0
  67. package/dist/commands/link/self-hosted.d.ts +12 -0
  68. package/dist/commands/link/self-hosted.js +54 -0
  69. package/dist/commands/login.d.ts +8 -0
  70. package/dist/commands/login.js +107 -0
  71. package/dist/commands/logout.d.ts +8 -0
  72. package/dist/commands/logout.js +19 -0
  73. package/dist/commands/migrate/index.d.ts +7 -0
  74. package/dist/commands/migrate/index.js +10 -0
  75. package/dist/commands/migrate/sync-rules.d.ts +15 -0
  76. package/dist/commands/migrate/sync-rules.js +51 -0
  77. package/dist/commands/pull/index.d.ts +8 -0
  78. package/dist/commands/pull/index.js +11 -0
  79. package/dist/commands/pull/instance.d.ts +14 -0
  80. package/dist/commands/pull/instance.js +108 -0
  81. package/dist/commands/status.d.ts +1 -0
  82. package/dist/commands/status.js +2 -0
  83. package/dist/commands/stop.d.ts +14 -0
  84. package/dist/commands/stop.js +62 -0
  85. package/dist/commands/validate.d.ts +16 -0
  86. package/dist/commands/validate.js +165 -0
  87. package/dist/help.d.ts +31 -0
  88. package/dist/help.js +123 -0
  89. package/dist/index.d.ts +1 -0
  90. package/dist/index.js +1 -0
  91. package/oclif.manifest.json +1629 -0
  92. package/package.json +131 -0
  93. package/templates/cloud/powersync/cli.yaml +3 -0
  94. package/templates/cloud/powersync/service.yaml +174 -0
  95. package/templates/cloud/powersync/sync-config.yaml +22 -0
  96. package/templates/self-hosted/base/powersync/cli.yaml +3 -0
  97. package/templates/self-hosted/base/powersync/service.yaml +243 -0
  98. package/templates/self-hosted/base/powersync/sync-config.yaml +22 -0
  99. package/templates/vscode/settings.json +3 -0
@@ -0,0 +1,1629 @@
1
+ {
2
+ "commands": {
3
+ "destroy": {
4
+ "aliases": [],
5
+ "args": {},
6
+ "description": "Permanently delete the linked PowerSync Cloud instance and its data. Requires --confirm=yes.",
7
+ "examples": [
8
+ "<%= config.bin %> <%= command.id %>",
9
+ "<%= config.bin %> <%= command.id %> --confirm=yes"
10
+ ],
11
+ "flags": {
12
+ "confirm": {
13
+ "description": "Set to \"yes\" to confirm destruction of the instance.",
14
+ "name": "confirm",
15
+ "hasDynamicHelp": false,
16
+ "multiple": false,
17
+ "options": [
18
+ "yes"
19
+ ],
20
+ "type": "option"
21
+ },
22
+ "directory": {
23
+ "description": "Directory containing PowerSync config. Defaults to \"powersync\". This is required if multiple powersync config files are present in subdirectories of the current working directory.",
24
+ "helpGroup": "PROJECT",
25
+ "name": "directory",
26
+ "default": "powersync",
27
+ "hasDynamicHelp": false,
28
+ "multiple": false,
29
+ "type": "option"
30
+ },
31
+ "instance-id": {
32
+ "dependsOn": [
33
+ "project-id"
34
+ ],
35
+ "description": "PowerSync Cloud instance ID. Manually passed if the current context has not been linked.",
36
+ "helpGroup": "CLOUD_PROJECT",
37
+ "name": "instance-id",
38
+ "required": false,
39
+ "hasDynamicHelp": false,
40
+ "multiple": false,
41
+ "type": "option"
42
+ },
43
+ "org-id": {
44
+ "description": "Organization ID (optional). Defaults to the token’s single org when only one is available; pass explicitly if the token has multiple orgs.",
45
+ "helpGroup": "CLOUD_PROJECT",
46
+ "name": "org-id",
47
+ "required": false,
48
+ "hasDynamicHelp": false,
49
+ "multiple": false,
50
+ "type": "option"
51
+ },
52
+ "project-id": {
53
+ "description": "Project ID. Manually passed if the current context has not been linked.",
54
+ "helpGroup": "CLOUD_PROJECT",
55
+ "name": "project-id",
56
+ "required": false,
57
+ "hasDynamicHelp": false,
58
+ "multiple": false,
59
+ "type": "option"
60
+ }
61
+ },
62
+ "hasDynamicHelp": false,
63
+ "hiddenAliases": [],
64
+ "id": "destroy",
65
+ "pluginAlias": "powersync",
66
+ "pluginName": "powersync",
67
+ "pluginType": "core",
68
+ "strict": true,
69
+ "summary": "[Cloud only] Permanently destroy the linked Cloud instance.",
70
+ "enableJsonFlag": false,
71
+ "commandHelpGroup": "CLOUD",
72
+ "isESM": true,
73
+ "relativePath": [
74
+ "dist",
75
+ "commands",
76
+ "destroy.js"
77
+ ]
78
+ },
79
+ "login": {
80
+ "aliases": [],
81
+ "args": {},
82
+ "description": "Store a PowerSync auth token (PAT) in secure storage so later Cloud commands run without passing a token. If secure storage is unavailable, login can optionally store it in a local config file. Use PS_ADMIN_TOKEN env var for CI or scripts instead.",
83
+ "examples": [
84
+ "<%= config.bin %> <%= command.id %>"
85
+ ],
86
+ "flags": {},
87
+ "hasDynamicHelp": false,
88
+ "hiddenAliases": [],
89
+ "id": "login",
90
+ "pluginAlias": "powersync",
91
+ "pluginName": "powersync",
92
+ "pluginType": "core",
93
+ "strict": true,
94
+ "summary": "Store auth token for Cloud commands.",
95
+ "enableJsonFlag": false,
96
+ "commandHelpGroup": "AUTHENTICATION",
97
+ "isESM": true,
98
+ "relativePath": [
99
+ "dist",
100
+ "commands",
101
+ "login.js"
102
+ ]
103
+ },
104
+ "logout": {
105
+ "aliases": [],
106
+ "args": {},
107
+ "description": "Remove the stored PowerSync auth token from secure storage or local fallback config storage. Cloud commands will no longer use stored credentials until you run login again.",
108
+ "examples": [
109
+ "<%= config.bin %> <%= command.id %>"
110
+ ],
111
+ "flags": {},
112
+ "hasDynamicHelp": false,
113
+ "hiddenAliases": [],
114
+ "id": "logout",
115
+ "pluginAlias": "powersync",
116
+ "pluginName": "powersync",
117
+ "pluginType": "core",
118
+ "strict": true,
119
+ "summary": "Remove stored auth token.",
120
+ "enableJsonFlag": false,
121
+ "commandHelpGroup": "AUTHENTICATION",
122
+ "isESM": true,
123
+ "relativePath": [
124
+ "dist",
125
+ "commands",
126
+ "logout.js"
127
+ ]
128
+ },
129
+ "status": {
130
+ "aliases": [],
131
+ "args": {},
132
+ "description": "Fetch instance diagnostics: connection status, active and deploying sync config, replication state. Output as human-readable, JSON, or YAML. Cloud and self-hosted.",
133
+ "examples": [
134
+ "<%= config.bin %> <%= command.id %>",
135
+ "<%= config.bin %> <%= command.id %> --output=json",
136
+ "<%= config.bin %> <%= command.id %> --instance-id=<id> --project-id=<id>"
137
+ ],
138
+ "flags": {
139
+ "output": {
140
+ "description": "Output format: human-readable, json, or yaml.",
141
+ "name": "output",
142
+ "default": "human",
143
+ "hasDynamicHelp": false,
144
+ "multiple": false,
145
+ "options": [
146
+ "human",
147
+ "json",
148
+ "yaml"
149
+ ],
150
+ "type": "option"
151
+ },
152
+ "api-url": {
153
+ "description": "[Self-hosted] PowerSync API URL. When set, context is treated as self-hosted (exclusive with --instance-id). Resolved: flag → cli.yaml → API_URL.",
154
+ "exclusive": [
155
+ "instance-id",
156
+ "org-id",
157
+ "project-id"
158
+ ],
159
+ "helpGroup": "SELF_HOSTED_PROJECT",
160
+ "name": "api-url",
161
+ "required": false,
162
+ "hasDynamicHelp": false,
163
+ "multiple": false,
164
+ "type": "option"
165
+ },
166
+ "instance-id": {
167
+ "dependsOn": [
168
+ "project-id"
169
+ ],
170
+ "description": "[Cloud] PowerSync Cloud instance ID (BSON ObjectID). When set, context is treated as cloud (exclusive with --api-url). Resolved: flag → cli.yaml → INSTANCE_ID.",
171
+ "helpGroup": "CLOUD_PROJECT",
172
+ "name": "instance-id",
173
+ "required": false,
174
+ "hasDynamicHelp": false,
175
+ "multiple": false,
176
+ "type": "option"
177
+ },
178
+ "org-id": {
179
+ "description": "[Cloud] Organization ID (optional). Defaults to the token’s single org when only one is available; pass explicitly if the token has multiple orgs. Resolved: flag → cli.yaml → ORG_ID.",
180
+ "helpGroup": "CLOUD_PROJECT",
181
+ "name": "org-id",
182
+ "required": false,
183
+ "hasDynamicHelp": false,
184
+ "multiple": false,
185
+ "type": "option"
186
+ },
187
+ "project-id": {
188
+ "description": "[Cloud] Project ID. Resolved: flag → cli.yaml → PROJECT_ID.",
189
+ "helpGroup": "CLOUD_PROJECT",
190
+ "name": "project-id",
191
+ "required": false,
192
+ "hasDynamicHelp": false,
193
+ "multiple": false,
194
+ "type": "option"
195
+ },
196
+ "directory": {
197
+ "description": "Directory containing PowerSync config. Defaults to \"powersync\". This is required if multiple powersync config files are present in subdirectories of the current working directory.",
198
+ "helpGroup": "PROJECT",
199
+ "name": "directory",
200
+ "default": "powersync",
201
+ "hasDynamicHelp": false,
202
+ "multiple": false,
203
+ "type": "option"
204
+ }
205
+ },
206
+ "hasDynamicHelp": false,
207
+ "hiddenAliases": [],
208
+ "id": "status",
209
+ "pluginAlias": "powersync",
210
+ "pluginName": "powersync",
211
+ "pluginType": "core",
212
+ "strict": true,
213
+ "summary": "Show instance diagnostics (connections, sync config, replication).",
214
+ "enableJsonFlag": false,
215
+ "commandHelpGroup": "INSTANCE",
216
+ "isESM": true,
217
+ "relativePath": [
218
+ "dist",
219
+ "commands",
220
+ "status.js"
221
+ ]
222
+ },
223
+ "stop": {
224
+ "aliases": [],
225
+ "args": {},
226
+ "description": "Deactivate the linked PowerSync Cloud instance. Requires --confirm=yes. Restart later with powersync deploy.",
227
+ "examples": [
228
+ "<%= config.bin %> <%= command.id %>",
229
+ "<%= config.bin %> <%= command.id %> --confirm=yes"
230
+ ],
231
+ "flags": {
232
+ "confirm": {
233
+ "description": "Set to \"yes\" to confirm stopping the instance.",
234
+ "name": "confirm",
235
+ "hasDynamicHelp": false,
236
+ "multiple": false,
237
+ "options": [
238
+ "yes"
239
+ ],
240
+ "type": "option"
241
+ },
242
+ "directory": {
243
+ "description": "Directory containing PowerSync config. Defaults to \"powersync\". This is required if multiple powersync config files are present in subdirectories of the current working directory.",
244
+ "helpGroup": "PROJECT",
245
+ "name": "directory",
246
+ "default": "powersync",
247
+ "hasDynamicHelp": false,
248
+ "multiple": false,
249
+ "type": "option"
250
+ },
251
+ "instance-id": {
252
+ "dependsOn": [
253
+ "project-id"
254
+ ],
255
+ "description": "PowerSync Cloud instance ID. Manually passed if the current context has not been linked.",
256
+ "helpGroup": "CLOUD_PROJECT",
257
+ "name": "instance-id",
258
+ "required": false,
259
+ "hasDynamicHelp": false,
260
+ "multiple": false,
261
+ "type": "option"
262
+ },
263
+ "org-id": {
264
+ "description": "Organization ID (optional). Defaults to the token’s single org when only one is available; pass explicitly if the token has multiple orgs.",
265
+ "helpGroup": "CLOUD_PROJECT",
266
+ "name": "org-id",
267
+ "required": false,
268
+ "hasDynamicHelp": false,
269
+ "multiple": false,
270
+ "type": "option"
271
+ },
272
+ "project-id": {
273
+ "description": "Project ID. Manually passed if the current context has not been linked.",
274
+ "helpGroup": "CLOUD_PROJECT",
275
+ "name": "project-id",
276
+ "required": false,
277
+ "hasDynamicHelp": false,
278
+ "multiple": false,
279
+ "type": "option"
280
+ }
281
+ },
282
+ "hasDynamicHelp": false,
283
+ "hiddenAliases": [],
284
+ "id": "stop",
285
+ "pluginAlias": "powersync",
286
+ "pluginName": "powersync",
287
+ "pluginType": "core",
288
+ "strict": true,
289
+ "summary": "[Cloud only] Stop the linked Cloud instance (restart with deploy).",
290
+ "enableJsonFlag": false,
291
+ "commandHelpGroup": "CLOUD",
292
+ "isESM": true,
293
+ "relativePath": [
294
+ "dist",
295
+ "commands",
296
+ "stop.js"
297
+ ]
298
+ },
299
+ "validate": {
300
+ "aliases": [],
301
+ "args": {},
302
+ "description": "Run validation checks on local config: config schema, database connections, and sync config. Requires a linked instance. Works with Cloud and self-hosted.",
303
+ "examples": [
304
+ "<%= config.bin %> <%= command.id %>",
305
+ "<%= config.bin %> <%= command.id %> --output=json",
306
+ "<%= config.bin %> <%= command.id %> --api-url=https://powersync.example.com"
307
+ ],
308
+ "flags": {
309
+ "output": {
310
+ "description": "Output format: human-readable, json, or yaml.",
311
+ "name": "output",
312
+ "default": "human",
313
+ "hasDynamicHelp": false,
314
+ "multiple": false,
315
+ "options": [
316
+ "human",
317
+ "json",
318
+ "yaml"
319
+ ],
320
+ "type": "option"
321
+ },
322
+ "api-url": {
323
+ "description": "[Self-hosted] PowerSync API URL. When set, context is treated as self-hosted (exclusive with --instance-id). Resolved: flag → cli.yaml → API_URL.",
324
+ "exclusive": [
325
+ "instance-id",
326
+ "org-id",
327
+ "project-id"
328
+ ],
329
+ "helpGroup": "SELF_HOSTED_PROJECT",
330
+ "name": "api-url",
331
+ "required": false,
332
+ "hasDynamicHelp": false,
333
+ "multiple": false,
334
+ "type": "option"
335
+ },
336
+ "instance-id": {
337
+ "dependsOn": [
338
+ "project-id"
339
+ ],
340
+ "description": "[Cloud] PowerSync Cloud instance ID (BSON ObjectID). When set, context is treated as cloud (exclusive with --api-url). Resolved: flag → cli.yaml → INSTANCE_ID.",
341
+ "helpGroup": "CLOUD_PROJECT",
342
+ "name": "instance-id",
343
+ "required": false,
344
+ "hasDynamicHelp": false,
345
+ "multiple": false,
346
+ "type": "option"
347
+ },
348
+ "org-id": {
349
+ "description": "[Cloud] Organization ID (optional). Defaults to the token’s single org when only one is available; pass explicitly if the token has multiple orgs. Resolved: flag → cli.yaml → ORG_ID.",
350
+ "helpGroup": "CLOUD_PROJECT",
351
+ "name": "org-id",
352
+ "required": false,
353
+ "hasDynamicHelp": false,
354
+ "multiple": false,
355
+ "type": "option"
356
+ },
357
+ "project-id": {
358
+ "description": "[Cloud] Project ID. Resolved: flag → cli.yaml → PROJECT_ID.",
359
+ "helpGroup": "CLOUD_PROJECT",
360
+ "name": "project-id",
361
+ "required": false,
362
+ "hasDynamicHelp": false,
363
+ "multiple": false,
364
+ "type": "option"
365
+ },
366
+ "directory": {
367
+ "description": "Directory containing PowerSync config. Defaults to \"powersync\". This is required if multiple powersync config files are present in subdirectories of the current working directory.",
368
+ "helpGroup": "PROJECT",
369
+ "name": "directory",
370
+ "default": "powersync",
371
+ "hasDynamicHelp": false,
372
+ "multiple": false,
373
+ "type": "option"
374
+ }
375
+ },
376
+ "hasDynamicHelp": false,
377
+ "hiddenAliases": [],
378
+ "id": "validate",
379
+ "pluginAlias": "powersync",
380
+ "pluginName": "powersync",
381
+ "pluginType": "core",
382
+ "strict": true,
383
+ "summary": "Validate config schema, connections, and sync config before deploy.",
384
+ "enableJsonFlag": false,
385
+ "commandHelpGroup": "INSTANCE",
386
+ "isESM": true,
387
+ "relativePath": [
388
+ "dist",
389
+ "commands",
390
+ "validate.js"
391
+ ]
392
+ },
393
+ "configure:ide": {
394
+ "aliases": [],
395
+ "args": {},
396
+ "description": "Configure or guide your IDE setup for the best PowerSync CLI developer experience. Enables YAML schema validation and autocompletion, sets up !env custom tag support, and patches existing config files with language server directives.",
397
+ "examples": [
398
+ "<%= config.bin %> <%= command.id %>"
399
+ ],
400
+ "flags": {},
401
+ "hasDynamicHelp": false,
402
+ "hiddenAliases": [],
403
+ "id": "configure:ide",
404
+ "pluginAlias": "powersync",
405
+ "pluginName": "powersync",
406
+ "pluginType": "core",
407
+ "strict": true,
408
+ "summary": "Configure your IDE for the best PowerSync CLI developer experience.",
409
+ "enableJsonFlag": false,
410
+ "commandHelpGroup": "PROJECT SETUP",
411
+ "isESM": true,
412
+ "relativePath": [
413
+ "dist",
414
+ "commands",
415
+ "configure",
416
+ "ide.js"
417
+ ]
418
+ },
419
+ "configure": {
420
+ "aliases": [],
421
+ "args": {},
422
+ "description": "Configure your workspace or IDE for PowerSync development.",
423
+ "examples": [
424
+ "<%= config.bin %> <%= command.id %>"
425
+ ],
426
+ "flags": {},
427
+ "hasDynamicHelp": false,
428
+ "hidden": true,
429
+ "hiddenAliases": [],
430
+ "id": "configure",
431
+ "pluginAlias": "powersync",
432
+ "pluginName": "powersync",
433
+ "pluginType": "core",
434
+ "strict": true,
435
+ "summary": "Configure your workspace or IDE for PowerSync development.",
436
+ "enableJsonFlag": false,
437
+ "isESM": true,
438
+ "relativePath": [
439
+ "dist",
440
+ "commands",
441
+ "configure",
442
+ "index.js"
443
+ ]
444
+ },
445
+ "deploy": {
446
+ "aliases": [],
447
+ "args": {},
448
+ "description": "Deploy local config (service.yaml, sync config) to the linked PowerSync Cloud instance.\nValidates connections and sync config before deploying.\nSee also powersync deploy sync-config to deploy only sync config changes.\nSee also powersync deploy service-config to deploy only service config changes.",
449
+ "examples": [
450
+ "<%= config.bin %> <%= command.id %>",
451
+ "<%= config.bin %> <%= command.id %> --instance-id=<id> --project-id=<id>"
452
+ ],
453
+ "flags": {
454
+ "deploy-timeout": {
455
+ "description": "Seconds to wait after scheduling a deploy before timing out while polling status (default 300 seconds).",
456
+ "name": "deploy-timeout",
457
+ "default": 300,
458
+ "hasDynamicHelp": false,
459
+ "multiple": false,
460
+ "type": "option"
461
+ },
462
+ "directory": {
463
+ "description": "Directory containing PowerSync config. Defaults to \"powersync\". This is required if multiple powersync config files are present in subdirectories of the current working directory.",
464
+ "helpGroup": "PROJECT",
465
+ "name": "directory",
466
+ "default": "powersync",
467
+ "hasDynamicHelp": false,
468
+ "multiple": false,
469
+ "type": "option"
470
+ },
471
+ "instance-id": {
472
+ "dependsOn": [
473
+ "project-id"
474
+ ],
475
+ "description": "PowerSync Cloud instance ID. Manually passed if the current context has not been linked.",
476
+ "helpGroup": "CLOUD_PROJECT",
477
+ "name": "instance-id",
478
+ "required": false,
479
+ "hasDynamicHelp": false,
480
+ "multiple": false,
481
+ "type": "option"
482
+ },
483
+ "org-id": {
484
+ "description": "Organization ID (optional). Defaults to the token’s single org when only one is available; pass explicitly if the token has multiple orgs.",
485
+ "helpGroup": "CLOUD_PROJECT",
486
+ "name": "org-id",
487
+ "required": false,
488
+ "hasDynamicHelp": false,
489
+ "multiple": false,
490
+ "type": "option"
491
+ },
492
+ "project-id": {
493
+ "description": "Project ID. Manually passed if the current context has not been linked.",
494
+ "helpGroup": "CLOUD_PROJECT",
495
+ "name": "project-id",
496
+ "required": false,
497
+ "hasDynamicHelp": false,
498
+ "multiple": false,
499
+ "type": "option"
500
+ }
501
+ },
502
+ "hasDynamicHelp": false,
503
+ "hiddenAliases": [],
504
+ "id": "deploy",
505
+ "pluginAlias": "powersync",
506
+ "pluginName": "powersync",
507
+ "pluginType": "core",
508
+ "strict": true,
509
+ "summary": "[Cloud only] Deploy local config to the linked Cloud instance (connections + auth + sync config).",
510
+ "enableJsonFlag": false,
511
+ "commandHelpGroup": "CLOUD",
512
+ "isESM": true,
513
+ "relativePath": [
514
+ "dist",
515
+ "commands",
516
+ "deploy",
517
+ "index.js"
518
+ ]
519
+ },
520
+ "deploy:service-config": {
521
+ "aliases": [],
522
+ "args": {},
523
+ "description": "Deploy only service config changes (without sync config updates).",
524
+ "examples": [
525
+ "<%= config.bin %> <%= command.id %>",
526
+ "<%= config.bin %> <%= command.id %> --instance-id=<id> --project-id=<id>"
527
+ ],
528
+ "flags": {
529
+ "deploy-timeout": {
530
+ "description": "Seconds to wait after scheduling a deploy before timing out while polling status (default 300 seconds).",
531
+ "name": "deploy-timeout",
532
+ "default": 300,
533
+ "hasDynamicHelp": false,
534
+ "multiple": false,
535
+ "type": "option"
536
+ },
537
+ "directory": {
538
+ "description": "Directory containing PowerSync config. Defaults to \"powersync\". This is required if multiple powersync config files are present in subdirectories of the current working directory.",
539
+ "helpGroup": "PROJECT",
540
+ "name": "directory",
541
+ "default": "powersync",
542
+ "hasDynamicHelp": false,
543
+ "multiple": false,
544
+ "type": "option"
545
+ },
546
+ "instance-id": {
547
+ "dependsOn": [
548
+ "project-id"
549
+ ],
550
+ "description": "PowerSync Cloud instance ID. Manually passed if the current context has not been linked.",
551
+ "helpGroup": "CLOUD_PROJECT",
552
+ "name": "instance-id",
553
+ "required": false,
554
+ "hasDynamicHelp": false,
555
+ "multiple": false,
556
+ "type": "option"
557
+ },
558
+ "org-id": {
559
+ "description": "Organization ID (optional). Defaults to the token’s single org when only one is available; pass explicitly if the token has multiple orgs.",
560
+ "helpGroup": "CLOUD_PROJECT",
561
+ "name": "org-id",
562
+ "required": false,
563
+ "hasDynamicHelp": false,
564
+ "multiple": false,
565
+ "type": "option"
566
+ },
567
+ "project-id": {
568
+ "description": "Project ID. Manually passed if the current context has not been linked.",
569
+ "helpGroup": "CLOUD_PROJECT",
570
+ "name": "project-id",
571
+ "required": false,
572
+ "hasDynamicHelp": false,
573
+ "multiple": false,
574
+ "type": "option"
575
+ }
576
+ },
577
+ "hasDynamicHelp": false,
578
+ "hiddenAliases": [],
579
+ "id": "deploy:service-config",
580
+ "pluginAlias": "powersync",
581
+ "pluginName": "powersync",
582
+ "pluginType": "core",
583
+ "strict": true,
584
+ "summary": "[Cloud only] Deploy only local service config to the linked Cloud instance.",
585
+ "enableJsonFlag": false,
586
+ "commandHelpGroup": "CLOUD",
587
+ "isESM": true,
588
+ "relativePath": [
589
+ "dist",
590
+ "commands",
591
+ "deploy",
592
+ "service-config.js"
593
+ ]
594
+ },
595
+ "deploy:sync-config": {
596
+ "aliases": [],
597
+ "args": {},
598
+ "description": "Deploy only sync config changes.",
599
+ "examples": [
600
+ "<%= config.bin %> <%= command.id %>",
601
+ "<%= config.bin %> <%= command.id %> --instance-id=<id> --project-id=<id>"
602
+ ],
603
+ "flags": {
604
+ "deploy-timeout": {
605
+ "description": "Seconds to wait after scheduling a deploy before timing out while polling status (default 300 seconds).",
606
+ "name": "deploy-timeout",
607
+ "default": 300,
608
+ "hasDynamicHelp": false,
609
+ "multiple": false,
610
+ "type": "option"
611
+ },
612
+ "directory": {
613
+ "description": "Directory containing PowerSync config. Defaults to \"powersync\". This is required if multiple powersync config files are present in subdirectories of the current working directory.",
614
+ "helpGroup": "PROJECT",
615
+ "name": "directory",
616
+ "default": "powersync",
617
+ "hasDynamicHelp": false,
618
+ "multiple": false,
619
+ "type": "option"
620
+ },
621
+ "instance-id": {
622
+ "dependsOn": [
623
+ "project-id"
624
+ ],
625
+ "description": "PowerSync Cloud instance ID. Manually passed if the current context has not been linked.",
626
+ "helpGroup": "CLOUD_PROJECT",
627
+ "name": "instance-id",
628
+ "required": false,
629
+ "hasDynamicHelp": false,
630
+ "multiple": false,
631
+ "type": "option"
632
+ },
633
+ "org-id": {
634
+ "description": "Organization ID (optional). Defaults to the token’s single org when only one is available; pass explicitly if the token has multiple orgs.",
635
+ "helpGroup": "CLOUD_PROJECT",
636
+ "name": "org-id",
637
+ "required": false,
638
+ "hasDynamicHelp": false,
639
+ "multiple": false,
640
+ "type": "option"
641
+ },
642
+ "project-id": {
643
+ "description": "Project ID. Manually passed if the current context has not been linked.",
644
+ "helpGroup": "CLOUD_PROJECT",
645
+ "name": "project-id",
646
+ "required": false,
647
+ "hasDynamicHelp": false,
648
+ "multiple": false,
649
+ "type": "option"
650
+ },
651
+ "sync-config-file-path": {
652
+ "description": "Path to a sync config file. If provided, this file will be validated and deployed instead of the default sync-config.yaml.",
653
+ "name": "sync-config-file-path",
654
+ "hasDynamicHelp": false,
655
+ "multiple": false,
656
+ "type": "option"
657
+ }
658
+ },
659
+ "hasDynamicHelp": false,
660
+ "hiddenAliases": [],
661
+ "id": "deploy:sync-config",
662
+ "pluginAlias": "powersync",
663
+ "pluginName": "powersync",
664
+ "pluginType": "core",
665
+ "strict": true,
666
+ "summary": "[Cloud only] Deploy only local sync config to the linked Cloud instance.",
667
+ "enableJsonFlag": false,
668
+ "commandHelpGroup": "CLOUD",
669
+ "isESM": true,
670
+ "relativePath": [
671
+ "dist",
672
+ "commands",
673
+ "deploy",
674
+ "sync-config.js"
675
+ ]
676
+ },
677
+ "fetch:config": {
678
+ "aliases": [],
679
+ "args": {},
680
+ "description": "Retrieve the current instance config from PowerSync Cloud and print as YAML or JSON.",
681
+ "examples": [
682
+ "<%= config.bin %> <%= command.id %>",
683
+ "<%= config.bin %> <%= command.id %> --output=json"
684
+ ],
685
+ "flags": {
686
+ "output": {
687
+ "description": "Output format: yaml or json.",
688
+ "name": "output",
689
+ "default": "yaml",
690
+ "hasDynamicHelp": false,
691
+ "multiple": false,
692
+ "options": [
693
+ "json",
694
+ "yaml"
695
+ ],
696
+ "type": "option"
697
+ },
698
+ "directory": {
699
+ "description": "Directory containing PowerSync config. Defaults to \"powersync\". This is required if multiple powersync config files are present in subdirectories of the current working directory.",
700
+ "helpGroup": "PROJECT",
701
+ "name": "directory",
702
+ "default": "powersync",
703
+ "hasDynamicHelp": false,
704
+ "multiple": false,
705
+ "type": "option"
706
+ },
707
+ "instance-id": {
708
+ "dependsOn": [
709
+ "project-id"
710
+ ],
711
+ "description": "PowerSync Cloud instance ID. Manually passed if the current context has not been linked.",
712
+ "helpGroup": "CLOUD_PROJECT",
713
+ "name": "instance-id",
714
+ "required": false,
715
+ "hasDynamicHelp": false,
716
+ "multiple": false,
717
+ "type": "option"
718
+ },
719
+ "org-id": {
720
+ "description": "Organization ID (optional). Defaults to the token’s single org when only one is available; pass explicitly if the token has multiple orgs.",
721
+ "helpGroup": "CLOUD_PROJECT",
722
+ "name": "org-id",
723
+ "required": false,
724
+ "hasDynamicHelp": false,
725
+ "multiple": false,
726
+ "type": "option"
727
+ },
728
+ "project-id": {
729
+ "description": "Project ID. Manually passed if the current context has not been linked.",
730
+ "helpGroup": "CLOUD_PROJECT",
731
+ "name": "project-id",
732
+ "required": false,
733
+ "hasDynamicHelp": false,
734
+ "multiple": false,
735
+ "type": "option"
736
+ }
737
+ },
738
+ "hasDynamicHelp": false,
739
+ "hiddenAliases": [],
740
+ "id": "fetch:config",
741
+ "pluginAlias": "powersync",
742
+ "pluginName": "powersync",
743
+ "pluginType": "core",
744
+ "strict": true,
745
+ "summary": "[Cloud only] Print linked Cloud instance config (YAML or JSON).",
746
+ "enableJsonFlag": false,
747
+ "commandHelpGroup": "CLOUD",
748
+ "isESM": true,
749
+ "relativePath": [
750
+ "dist",
751
+ "commands",
752
+ "fetch",
753
+ "config.js"
754
+ ]
755
+ },
756
+ "fetch": {
757
+ "aliases": [],
758
+ "args": {},
759
+ "description": "Subcommands: list Cloud instances in org/project (fetch instances), print instance config as YAML/JSON (fetch config), or show instance diagnostics (fetch status).",
760
+ "examples": [
761
+ "<%= config.bin %> <%= command.id %>"
762
+ ],
763
+ "flags": {},
764
+ "hasDynamicHelp": false,
765
+ "hidden": true,
766
+ "hiddenAliases": [],
767
+ "id": "fetch",
768
+ "pluginAlias": "powersync",
769
+ "pluginName": "powersync",
770
+ "pluginType": "core",
771
+ "strict": true,
772
+ "summary": "List instances, fetch config, or fetch instance diagnostics.",
773
+ "enableJsonFlag": false,
774
+ "isESM": true,
775
+ "relativePath": [
776
+ "dist",
777
+ "commands",
778
+ "fetch",
779
+ "index.js"
780
+ ]
781
+ },
782
+ "fetch:instances": {
783
+ "aliases": [],
784
+ "args": {},
785
+ "description": "List PowerSync Cloud and linked instances, Cloud instances are grouped by organization and project.",
786
+ "examples": [
787
+ "<%= config.bin %> <%= command.id %>",
788
+ "<%= config.bin %> <%= command.id %> --project-id=<id> --output=json"
789
+ ],
790
+ "flags": {
791
+ "org-id": {
792
+ "description": "Optional Organization ID. Defaults to all organizations.",
793
+ "name": "org-id",
794
+ "required": false,
795
+ "hasDynamicHelp": false,
796
+ "multiple": false,
797
+ "type": "option"
798
+ },
799
+ "output": {
800
+ "description": "Output format: human or json.",
801
+ "name": "output",
802
+ "default": "human",
803
+ "hasDynamicHelp": false,
804
+ "multiple": false,
805
+ "options": [
806
+ "human",
807
+ "json"
808
+ ],
809
+ "type": "option"
810
+ },
811
+ "output-file": {
812
+ "description": "Optionally write instance information to a file.",
813
+ "name": "output-file",
814
+ "required": false,
815
+ "hasDynamicHelp": false,
816
+ "multiple": false,
817
+ "type": "option"
818
+ },
819
+ "project-id": {
820
+ "description": "Optional Project ID. Defaults to all projects in the org.",
821
+ "name": "project-id",
822
+ "required": false,
823
+ "hasDynamicHelp": false,
824
+ "multiple": false,
825
+ "type": "option"
826
+ }
827
+ },
828
+ "hasDynamicHelp": false,
829
+ "hiddenAliases": [],
830
+ "id": "fetch:instances",
831
+ "pluginAlias": "powersync",
832
+ "pluginName": "powersync",
833
+ "pluginType": "core",
834
+ "strict": true,
835
+ "summary": "List Cloud and linked instances.",
836
+ "enableJsonFlag": false,
837
+ "commandHelpGroup": "CLOUD",
838
+ "isESM": true,
839
+ "relativePath": [
840
+ "dist",
841
+ "commands",
842
+ "fetch",
843
+ "instances.js"
844
+ ]
845
+ },
846
+ "fetch:status": {
847
+ "aliases": [],
848
+ "args": {},
849
+ "description": "Fetch instance diagnostics: connection status, active and deploying sync config, replication state. Output as human-readable, JSON, or YAML. Cloud and self-hosted.",
850
+ "examples": [
851
+ "<%= config.bin %> <%= command.id %>",
852
+ "<%= config.bin %> <%= command.id %> --output=json",
853
+ "<%= config.bin %> <%= command.id %> --instance-id=<id> --project-id=<id>"
854
+ ],
855
+ "flags": {
856
+ "output": {
857
+ "description": "Output format: human-readable, json, or yaml.",
858
+ "name": "output",
859
+ "default": "human",
860
+ "hasDynamicHelp": false,
861
+ "multiple": false,
862
+ "options": [
863
+ "human",
864
+ "json",
865
+ "yaml"
866
+ ],
867
+ "type": "option"
868
+ },
869
+ "api-url": {
870
+ "description": "[Self-hosted] PowerSync API URL. When set, context is treated as self-hosted (exclusive with --instance-id). Resolved: flag → cli.yaml → API_URL.",
871
+ "exclusive": [
872
+ "instance-id",
873
+ "org-id",
874
+ "project-id"
875
+ ],
876
+ "helpGroup": "SELF_HOSTED_PROJECT",
877
+ "name": "api-url",
878
+ "required": false,
879
+ "hasDynamicHelp": false,
880
+ "multiple": false,
881
+ "type": "option"
882
+ },
883
+ "instance-id": {
884
+ "dependsOn": [
885
+ "project-id"
886
+ ],
887
+ "description": "[Cloud] PowerSync Cloud instance ID (BSON ObjectID). When set, context is treated as cloud (exclusive with --api-url). Resolved: flag → cli.yaml → INSTANCE_ID.",
888
+ "helpGroup": "CLOUD_PROJECT",
889
+ "name": "instance-id",
890
+ "required": false,
891
+ "hasDynamicHelp": false,
892
+ "multiple": false,
893
+ "type": "option"
894
+ },
895
+ "org-id": {
896
+ "description": "[Cloud] Organization ID (optional). Defaults to the token’s single org when only one is available; pass explicitly if the token has multiple orgs. Resolved: flag → cli.yaml → ORG_ID.",
897
+ "helpGroup": "CLOUD_PROJECT",
898
+ "name": "org-id",
899
+ "required": false,
900
+ "hasDynamicHelp": false,
901
+ "multiple": false,
902
+ "type": "option"
903
+ },
904
+ "project-id": {
905
+ "description": "[Cloud] Project ID. Resolved: flag → cli.yaml → PROJECT_ID.",
906
+ "helpGroup": "CLOUD_PROJECT",
907
+ "name": "project-id",
908
+ "required": false,
909
+ "hasDynamicHelp": false,
910
+ "multiple": false,
911
+ "type": "option"
912
+ },
913
+ "directory": {
914
+ "description": "Directory containing PowerSync config. Defaults to \"powersync\". This is required if multiple powersync config files are present in subdirectories of the current working directory.",
915
+ "helpGroup": "PROJECT",
916
+ "name": "directory",
917
+ "default": "powersync",
918
+ "hasDynamicHelp": false,
919
+ "multiple": false,
920
+ "type": "option"
921
+ }
922
+ },
923
+ "hasDynamicHelp": false,
924
+ "hiddenAliases": [],
925
+ "id": "fetch:status",
926
+ "pluginAlias": "powersync",
927
+ "pluginName": "powersync",
928
+ "pluginType": "core",
929
+ "strict": true,
930
+ "summary": "Show instance diagnostics (connections, sync config, replication).",
931
+ "enableJsonFlag": false,
932
+ "commandHelpGroup": "INSTANCE",
933
+ "isESM": true,
934
+ "relativePath": [
935
+ "dist",
936
+ "commands",
937
+ "status.js"
938
+ ]
939
+ },
940
+ "generate": {
941
+ "aliases": [],
942
+ "args": {},
943
+ "description": "Generate client artifacts: schema (from instance schema + sync config) or a development token for connecting clients. Cloud and self-hosted where supported.",
944
+ "examples": [
945
+ "<%= config.bin %> <%= command.id %>"
946
+ ],
947
+ "flags": {},
948
+ "hasDynamicHelp": false,
949
+ "hidden": true,
950
+ "hiddenAliases": [],
951
+ "id": "generate",
952
+ "pluginAlias": "powersync",
953
+ "pluginName": "powersync",
954
+ "pluginType": "core",
955
+ "strict": true,
956
+ "summary": "Generate client schema or development token.",
957
+ "enableJsonFlag": false,
958
+ "isESM": true,
959
+ "relativePath": [
960
+ "dist",
961
+ "commands",
962
+ "generate",
963
+ "index.js"
964
+ ]
965
+ },
966
+ "generate:schema": {
967
+ "aliases": [],
968
+ "args": {},
969
+ "description": "Generate a client-side schema file from the instance database schema and sync config. Supports multiple output types (e.g. type, dart). Requires a linked instance. Cloud and self-hosted.",
970
+ "examples": [
971
+ "<%= config.bin %> <%= command.id %> --output=ts --output-path=schema.ts",
972
+ "<%= config.bin %> <%= command.id %> --output=dart --output-path=lib/schema.dart --instance-id=<id> --project-id=<id>"
973
+ ],
974
+ "flags": {
975
+ "output": {
976
+ "description": "Output type: dart, dotNet, js, jsLegacy, kotlin, swift, ts",
977
+ "name": "output",
978
+ "required": true,
979
+ "default": "type",
980
+ "hasDynamicHelp": false,
981
+ "multiple": false,
982
+ "options": [
983
+ "dart",
984
+ "dotNet",
985
+ "js",
986
+ "jsLegacy",
987
+ "kotlin",
988
+ "swift",
989
+ "ts"
990
+ ],
991
+ "type": "option"
992
+ },
993
+ "output-path": {
994
+ "description": "Path to output the schema file.",
995
+ "name": "output-path",
996
+ "required": true,
997
+ "hasDynamicHelp": false,
998
+ "multiple": false,
999
+ "type": "option"
1000
+ },
1001
+ "api-url": {
1002
+ "description": "[Self-hosted] PowerSync API URL. When set, context is treated as self-hosted (exclusive with --instance-id). Resolved: flag → cli.yaml → API_URL.",
1003
+ "exclusive": [
1004
+ "instance-id",
1005
+ "org-id",
1006
+ "project-id"
1007
+ ],
1008
+ "helpGroup": "SELF_HOSTED_PROJECT",
1009
+ "name": "api-url",
1010
+ "required": false,
1011
+ "hasDynamicHelp": false,
1012
+ "multiple": false,
1013
+ "type": "option"
1014
+ },
1015
+ "instance-id": {
1016
+ "dependsOn": [
1017
+ "project-id"
1018
+ ],
1019
+ "description": "[Cloud] PowerSync Cloud instance ID (BSON ObjectID). When set, context is treated as cloud (exclusive with --api-url). Resolved: flag → cli.yaml → INSTANCE_ID.",
1020
+ "helpGroup": "CLOUD_PROJECT",
1021
+ "name": "instance-id",
1022
+ "required": false,
1023
+ "hasDynamicHelp": false,
1024
+ "multiple": false,
1025
+ "type": "option"
1026
+ },
1027
+ "org-id": {
1028
+ "description": "[Cloud] Organization ID (optional). Defaults to the token’s single org when only one is available; pass explicitly if the token has multiple orgs. Resolved: flag → cli.yaml → ORG_ID.",
1029
+ "helpGroup": "CLOUD_PROJECT",
1030
+ "name": "org-id",
1031
+ "required": false,
1032
+ "hasDynamicHelp": false,
1033
+ "multiple": false,
1034
+ "type": "option"
1035
+ },
1036
+ "project-id": {
1037
+ "description": "[Cloud] Project ID. Resolved: flag → cli.yaml → PROJECT_ID.",
1038
+ "helpGroup": "CLOUD_PROJECT",
1039
+ "name": "project-id",
1040
+ "required": false,
1041
+ "hasDynamicHelp": false,
1042
+ "multiple": false,
1043
+ "type": "option"
1044
+ },
1045
+ "directory": {
1046
+ "description": "Directory containing PowerSync config. Defaults to \"powersync\". This is required if multiple powersync config files are present in subdirectories of the current working directory.",
1047
+ "helpGroup": "PROJECT",
1048
+ "name": "directory",
1049
+ "default": "powersync",
1050
+ "hasDynamicHelp": false,
1051
+ "multiple": false,
1052
+ "type": "option"
1053
+ }
1054
+ },
1055
+ "hasDynamicHelp": false,
1056
+ "hiddenAliases": [],
1057
+ "id": "generate:schema",
1058
+ "pluginAlias": "powersync",
1059
+ "pluginName": "powersync",
1060
+ "pluginType": "core",
1061
+ "strict": true,
1062
+ "summary": "Generate client schema file from instance schema and sync config.",
1063
+ "enableJsonFlag": false,
1064
+ "commandHelpGroup": "INSTANCE",
1065
+ "isESM": true,
1066
+ "relativePath": [
1067
+ "dist",
1068
+ "commands",
1069
+ "generate",
1070
+ "schema.js"
1071
+ ]
1072
+ },
1073
+ "generate:token": {
1074
+ "aliases": [],
1075
+ "args": {},
1076
+ "description": "Generate a JWT for development clients to connect to PowerSync. Cloud: uses instance dev-token API (allow_temporary_tokens must be enabled). Self-hosted: signs with shared secret from config. Requires --subject; optional --expires-in-seconds.",
1077
+ "examples": [
1078
+ "<%= config.bin %> <%= command.id %> --subject=user-123",
1079
+ "<%= config.bin %> <%= command.id %> --subject=user-123 --expires-in-seconds=3600"
1080
+ ],
1081
+ "flags": {
1082
+ "expires-in-seconds": {
1083
+ "description": "Expiration time in seconds. Default is 43,200 (12 hours).",
1084
+ "name": "expires-in-seconds",
1085
+ "required": false,
1086
+ "default": 43200,
1087
+ "hasDynamicHelp": false,
1088
+ "multiple": false,
1089
+ "type": "option"
1090
+ },
1091
+ "kid": {
1092
+ "description": "[Self-hosted only] Key ID of the key to use for signing the token. If not provided, the first key will be used.",
1093
+ "name": "kid",
1094
+ "required": false,
1095
+ "hasDynamicHelp": false,
1096
+ "multiple": false,
1097
+ "type": "option"
1098
+ },
1099
+ "subject": {
1100
+ "description": "Subject of the token.",
1101
+ "name": "subject",
1102
+ "required": true,
1103
+ "hasDynamicHelp": false,
1104
+ "multiple": false,
1105
+ "type": "option"
1106
+ },
1107
+ "api-url": {
1108
+ "description": "[Self-hosted] PowerSync API URL. When set, context is treated as self-hosted (exclusive with --instance-id). Resolved: flag → cli.yaml → API_URL.",
1109
+ "exclusive": [
1110
+ "instance-id",
1111
+ "org-id",
1112
+ "project-id"
1113
+ ],
1114
+ "helpGroup": "SELF_HOSTED_PROJECT",
1115
+ "name": "api-url",
1116
+ "required": false,
1117
+ "hasDynamicHelp": false,
1118
+ "multiple": false,
1119
+ "type": "option"
1120
+ },
1121
+ "instance-id": {
1122
+ "dependsOn": [
1123
+ "project-id"
1124
+ ],
1125
+ "description": "[Cloud] PowerSync Cloud instance ID (BSON ObjectID). When set, context is treated as cloud (exclusive with --api-url). Resolved: flag → cli.yaml → INSTANCE_ID.",
1126
+ "helpGroup": "CLOUD_PROJECT",
1127
+ "name": "instance-id",
1128
+ "required": false,
1129
+ "hasDynamicHelp": false,
1130
+ "multiple": false,
1131
+ "type": "option"
1132
+ },
1133
+ "org-id": {
1134
+ "description": "[Cloud] Organization ID (optional). Defaults to the token’s single org when only one is available; pass explicitly if the token has multiple orgs. Resolved: flag → cli.yaml → ORG_ID.",
1135
+ "helpGroup": "CLOUD_PROJECT",
1136
+ "name": "org-id",
1137
+ "required": false,
1138
+ "hasDynamicHelp": false,
1139
+ "multiple": false,
1140
+ "type": "option"
1141
+ },
1142
+ "project-id": {
1143
+ "description": "[Cloud] Project ID. Resolved: flag → cli.yaml → PROJECT_ID.",
1144
+ "helpGroup": "CLOUD_PROJECT",
1145
+ "name": "project-id",
1146
+ "required": false,
1147
+ "hasDynamicHelp": false,
1148
+ "multiple": false,
1149
+ "type": "option"
1150
+ },
1151
+ "directory": {
1152
+ "description": "Directory containing PowerSync config. Defaults to \"powersync\". This is required if multiple powersync config files are present in subdirectories of the current working directory.",
1153
+ "helpGroup": "PROJECT",
1154
+ "name": "directory",
1155
+ "default": "powersync",
1156
+ "hasDynamicHelp": false,
1157
+ "multiple": false,
1158
+ "type": "option"
1159
+ }
1160
+ },
1161
+ "hasDynamicHelp": false,
1162
+ "hiddenAliases": [],
1163
+ "id": "generate:token",
1164
+ "pluginAlias": "powersync",
1165
+ "pluginName": "powersync",
1166
+ "pluginType": "core",
1167
+ "strict": true,
1168
+ "summary": "Generate a development JWT for client connections.",
1169
+ "enableJsonFlag": false,
1170
+ "commandHelpGroup": "INSTANCE",
1171
+ "isESM": true,
1172
+ "relativePath": [
1173
+ "dist",
1174
+ "commands",
1175
+ "generate",
1176
+ "token.js"
1177
+ ]
1178
+ },
1179
+ "init:cloud": {
1180
+ "aliases": [],
1181
+ "args": {},
1182
+ "description": "Copy a Cloud template into a config directory (default powersync/). Edit service.yaml then run link cloud and deploy.",
1183
+ "examples": [
1184
+ "<%= config.bin %> <%= command.id %>",
1185
+ "<%= config.bin %> <%= command.id %> --directory=powersync"
1186
+ ],
1187
+ "flags": {
1188
+ "directory": {
1189
+ "description": "Directory containing PowerSync config. Defaults to \"powersync\". This is required if multiple powersync config files are present in subdirectories of the current working directory.",
1190
+ "helpGroup": "PROJECT",
1191
+ "name": "directory",
1192
+ "default": "powersync",
1193
+ "hasDynamicHelp": false,
1194
+ "multiple": false,
1195
+ "type": "option"
1196
+ }
1197
+ },
1198
+ "hasDynamicHelp": false,
1199
+ "hiddenAliases": [],
1200
+ "id": "init:cloud",
1201
+ "pluginAlias": "powersync",
1202
+ "pluginName": "powersync",
1203
+ "pluginType": "core",
1204
+ "strict": true,
1205
+ "summary": "Scaffold a PowerSync Cloud config directory from a template.",
1206
+ "enableJsonFlag": false,
1207
+ "commandHelpGroup": "PROJECT SETUP",
1208
+ "isESM": true,
1209
+ "relativePath": [
1210
+ "dist",
1211
+ "commands",
1212
+ "init",
1213
+ "cloud.js"
1214
+ ]
1215
+ },
1216
+ "init": {
1217
+ "aliases": [],
1218
+ "args": {},
1219
+ "description": "Scaffold a PowerSync config directory from a template. Use init cloud or init self-hosted. For Cloud, edit service.yaml then run link cloud and deploy.",
1220
+ "examples": [
1221
+ "<%= config.bin %> <%= command.id %>"
1222
+ ],
1223
+ "flags": {},
1224
+ "hasDynamicHelp": false,
1225
+ "hidden": true,
1226
+ "hiddenAliases": [],
1227
+ "id": "init",
1228
+ "pluginAlias": "powersync",
1229
+ "pluginName": "powersync",
1230
+ "pluginType": "core",
1231
+ "strict": true,
1232
+ "summary": "Scaffold a PowerSync config directory from a template.",
1233
+ "enableJsonFlag": false,
1234
+ "isESM": true,
1235
+ "relativePath": [
1236
+ "dist",
1237
+ "commands",
1238
+ "init",
1239
+ "index.js"
1240
+ ]
1241
+ },
1242
+ "init:self-hosted": {
1243
+ "aliases": [],
1244
+ "args": {},
1245
+ "description": "Copy a self-hosted template into a config directory (default powersync/). Configure service.yaml with your self-hosted instance details.",
1246
+ "examples": [
1247
+ "<%= config.bin %> <%= command.id %>",
1248
+ "<%= config.bin %> <%= command.id %> --directory=powersync"
1249
+ ],
1250
+ "flags": {
1251
+ "directory": {
1252
+ "description": "Directory containing PowerSync config. Defaults to \"powersync\". This is required if multiple powersync config files are present in subdirectories of the current working directory.",
1253
+ "helpGroup": "PROJECT",
1254
+ "name": "directory",
1255
+ "default": "powersync",
1256
+ "hasDynamicHelp": false,
1257
+ "multiple": false,
1258
+ "type": "option"
1259
+ }
1260
+ },
1261
+ "hasDynamicHelp": false,
1262
+ "hiddenAliases": [],
1263
+ "id": "init:self-hosted",
1264
+ "pluginAlias": "powersync",
1265
+ "pluginName": "powersync",
1266
+ "pluginType": "core",
1267
+ "strict": true,
1268
+ "summary": "Scaffold a PowerSync self-hosted config directory from a template.",
1269
+ "enableJsonFlag": false,
1270
+ "commandHelpGroup": "PROJECT SETUP",
1271
+ "isESM": true,
1272
+ "relativePath": [
1273
+ "dist",
1274
+ "commands",
1275
+ "init",
1276
+ "self-hosted.js"
1277
+ ]
1278
+ },
1279
+ "link:cloud": {
1280
+ "aliases": [],
1281
+ "args": {},
1282
+ "description": "Write or update cli.yaml with a Cloud instance (instance-id, org-id, project-id). Use --create to create a new instance from service.yaml name/region and link it; omit --instance-id when using --create. Org ID is optional when the token has a single organization.",
1283
+ "examples": [
1284
+ "<%= config.bin %> <%= command.id %> --project-id=<project-id>",
1285
+ "<%= config.bin %> <%= command.id %> --create --project-id=<project-id>",
1286
+ "<%= config.bin %> <%= command.id %> --instance-id=<id> --project-id=<project-id> --org-id=<org-id>"
1287
+ ],
1288
+ "flags": {
1289
+ "create": {
1290
+ "description": "Create a new Cloud instance in the given org and project, then link. Do not supply --instance-id when using --create.",
1291
+ "name": "create",
1292
+ "allowNo": false,
1293
+ "type": "boolean"
1294
+ },
1295
+ "instance-id": {
1296
+ "description": "PowerSync Cloud instance ID. Omit when using --create. Resolved: flag → INSTANCE_ID → cli.yaml.",
1297
+ "name": "instance-id",
1298
+ "required": false,
1299
+ "hasDynamicHelp": false,
1300
+ "multiple": false,
1301
+ "type": "option"
1302
+ },
1303
+ "org-id": {
1304
+ "description": "Organization ID. Optional when the token has a single org; required when the token has multiple orgs. Resolved: flag → ORG_ID → cli.yaml.",
1305
+ "name": "org-id",
1306
+ "required": false,
1307
+ "hasDynamicHelp": false,
1308
+ "multiple": false,
1309
+ "type": "option"
1310
+ },
1311
+ "project-id": {
1312
+ "description": "Project ID. Resolved: flag → PROJECT_ID → cli.yaml.",
1313
+ "name": "project-id",
1314
+ "required": true,
1315
+ "hasDynamicHelp": false,
1316
+ "multiple": false,
1317
+ "type": "option"
1318
+ },
1319
+ "directory": {
1320
+ "description": "Directory containing PowerSync config. Defaults to \"powersync\". This is required if multiple powersync config files are present in subdirectories of the current working directory.",
1321
+ "helpGroup": "PROJECT",
1322
+ "name": "directory",
1323
+ "default": "powersync",
1324
+ "hasDynamicHelp": false,
1325
+ "multiple": false,
1326
+ "type": "option"
1327
+ }
1328
+ },
1329
+ "hasDynamicHelp": false,
1330
+ "hiddenAliases": [],
1331
+ "id": "link:cloud",
1332
+ "pluginAlias": "powersync",
1333
+ "pluginName": "powersync",
1334
+ "pluginType": "core",
1335
+ "strict": true,
1336
+ "summary": "[Cloud only] Link to a PowerSync Cloud instance (or create one with --create).",
1337
+ "enableJsonFlag": false,
1338
+ "commandHelpGroup": "PROJECT SETUP",
1339
+ "isESM": true,
1340
+ "relativePath": [
1341
+ "dist",
1342
+ "commands",
1343
+ "link",
1344
+ "cloud.js"
1345
+ ]
1346
+ },
1347
+ "link": {
1348
+ "aliases": [],
1349
+ "args": {},
1350
+ "description": "Write cli.yaml so this directory's config is bound to a PowerSync instance. Once linked, commands use that instance without passing IDs. Use link cloud or link self-hosted.",
1351
+ "examples": [
1352
+ "<%= config.bin %> <%= command.id %>"
1353
+ ],
1354
+ "flags": {},
1355
+ "hasDynamicHelp": false,
1356
+ "hidden": true,
1357
+ "hiddenAliases": [],
1358
+ "id": "link",
1359
+ "pluginAlias": "powersync",
1360
+ "pluginName": "powersync",
1361
+ "pluginType": "core",
1362
+ "strict": true,
1363
+ "summary": "Bind this directory to a Cloud or self-hosted instance (writes cli.yaml).",
1364
+ "enableJsonFlag": false,
1365
+ "isESM": true,
1366
+ "relativePath": [
1367
+ "dist",
1368
+ "commands",
1369
+ "link",
1370
+ "index.js"
1371
+ ]
1372
+ },
1373
+ "link:self-hosted": {
1374
+ "aliases": [],
1375
+ "args": {},
1376
+ "description": "Links a self hosted PowerSync instance by API URL.\nAPI Keys can be specified via input or specified in the PS_ADMIN_TOKEN environment variable.",
1377
+ "examples": [
1378
+ "<%= config.bin %> <%= command.id %> --api-url=https://powersync.example.com"
1379
+ ],
1380
+ "flags": {
1381
+ "api-url": {
1382
+ "description": "Self-hosted PowerSync API base URL (e.g. https://powersync.example.com).",
1383
+ "name": "api-url",
1384
+ "required": true,
1385
+ "hasDynamicHelp": false,
1386
+ "multiple": false,
1387
+ "type": "option"
1388
+ },
1389
+ "directory": {
1390
+ "description": "Directory containing PowerSync config. Defaults to \"powersync\". This is required if multiple powersync config files are present in subdirectories of the current working directory.",
1391
+ "helpGroup": "PROJECT",
1392
+ "name": "directory",
1393
+ "default": "powersync",
1394
+ "hasDynamicHelp": false,
1395
+ "multiple": false,
1396
+ "type": "option"
1397
+ }
1398
+ },
1399
+ "hasDynamicHelp": false,
1400
+ "hiddenAliases": [],
1401
+ "id": "link:self-hosted",
1402
+ "pluginAlias": "powersync",
1403
+ "pluginName": "powersync",
1404
+ "pluginType": "core",
1405
+ "strict": true,
1406
+ "summary": "Link to a self-hosted PowerSync instance by API URL.",
1407
+ "enableJsonFlag": false,
1408
+ "commandHelpGroup": "PROJECT SETUP",
1409
+ "isESM": true,
1410
+ "relativePath": [
1411
+ "dist",
1412
+ "commands",
1413
+ "link",
1414
+ "self-hosted.js"
1415
+ ]
1416
+ },
1417
+ "migrate": {
1418
+ "aliases": [],
1419
+ "args": {},
1420
+ "description": "Migrate PowerSync config to newer formats. Use migrate sync-rules to convert Sync Rules to Sync Streams.",
1421
+ "flags": {},
1422
+ "hasDynamicHelp": false,
1423
+ "hidden": true,
1424
+ "hiddenAliases": [],
1425
+ "id": "migrate",
1426
+ "pluginAlias": "powersync",
1427
+ "pluginName": "powersync",
1428
+ "pluginType": "core",
1429
+ "strict": true,
1430
+ "summary": "Migrate config to newer formats (e.g. Sync Rules → Sync Streams).",
1431
+ "enableJsonFlag": false,
1432
+ "isESM": true,
1433
+ "relativePath": [
1434
+ "dist",
1435
+ "commands",
1436
+ "migrate",
1437
+ "index.js"
1438
+ ]
1439
+ },
1440
+ "migrate:sync-rules": {
1441
+ "aliases": [],
1442
+ "args": {},
1443
+ "description": "Migrates Sync Rules to Sync Streams",
1444
+ "flags": {
1445
+ "input-file": {
1446
+ "description": "Path to the input sync rules file. Defaults to the project sync-config.yaml file.",
1447
+ "name": "input-file",
1448
+ "required": false,
1449
+ "hasDynamicHelp": false,
1450
+ "multiple": false,
1451
+ "type": "option"
1452
+ },
1453
+ "output-file": {
1454
+ "description": "Path to the output sync streams file. Defaults to overwrite the input file.",
1455
+ "name": "output-file",
1456
+ "required": false,
1457
+ "hasDynamicHelp": false,
1458
+ "multiple": false,
1459
+ "type": "option"
1460
+ },
1461
+ "api-url": {
1462
+ "description": "[Self-hosted] PowerSync API URL. When set, context is treated as self-hosted (exclusive with --instance-id). Resolved: flag → cli.yaml → API_URL.",
1463
+ "exclusive": [
1464
+ "instance-id",
1465
+ "org-id",
1466
+ "project-id"
1467
+ ],
1468
+ "helpGroup": "SELF_HOSTED_PROJECT",
1469
+ "name": "api-url",
1470
+ "required": false,
1471
+ "hasDynamicHelp": false,
1472
+ "multiple": false,
1473
+ "type": "option"
1474
+ },
1475
+ "instance-id": {
1476
+ "dependsOn": [
1477
+ "project-id"
1478
+ ],
1479
+ "description": "[Cloud] PowerSync Cloud instance ID (BSON ObjectID). When set, context is treated as cloud (exclusive with --api-url). Resolved: flag → cli.yaml → INSTANCE_ID.",
1480
+ "helpGroup": "CLOUD_PROJECT",
1481
+ "name": "instance-id",
1482
+ "required": false,
1483
+ "hasDynamicHelp": false,
1484
+ "multiple": false,
1485
+ "type": "option"
1486
+ },
1487
+ "org-id": {
1488
+ "description": "[Cloud] Organization ID (optional). Defaults to the token’s single org when only one is available; pass explicitly if the token has multiple orgs. Resolved: flag → cli.yaml → ORG_ID.",
1489
+ "helpGroup": "CLOUD_PROJECT",
1490
+ "name": "org-id",
1491
+ "required": false,
1492
+ "hasDynamicHelp": false,
1493
+ "multiple": false,
1494
+ "type": "option"
1495
+ },
1496
+ "project-id": {
1497
+ "description": "[Cloud] Project ID. Resolved: flag → cli.yaml → PROJECT_ID.",
1498
+ "helpGroup": "CLOUD_PROJECT",
1499
+ "name": "project-id",
1500
+ "required": false,
1501
+ "hasDynamicHelp": false,
1502
+ "multiple": false,
1503
+ "type": "option"
1504
+ },
1505
+ "directory": {
1506
+ "description": "Directory containing PowerSync config. Defaults to \"powersync\". This is required if multiple powersync config files are present in subdirectories of the current working directory.",
1507
+ "helpGroup": "PROJECT",
1508
+ "name": "directory",
1509
+ "default": "powersync",
1510
+ "hasDynamicHelp": false,
1511
+ "multiple": false,
1512
+ "type": "option"
1513
+ }
1514
+ },
1515
+ "hasDynamicHelp": false,
1516
+ "hiddenAliases": [],
1517
+ "id": "migrate:sync-rules",
1518
+ "pluginAlias": "powersync",
1519
+ "pluginName": "powersync",
1520
+ "pluginType": "core",
1521
+ "strict": true,
1522
+ "summary": "Migrates Sync Rules to Sync Streams",
1523
+ "enableJsonFlag": false,
1524
+ "commandHelpGroup": "INSTANCE",
1525
+ "isESM": true,
1526
+ "relativePath": [
1527
+ "dist",
1528
+ "commands",
1529
+ "migrate",
1530
+ "sync-rules.js"
1531
+ ]
1532
+ },
1533
+ "pull": {
1534
+ "aliases": [],
1535
+ "args": {},
1536
+ "description": "Download current config from PowerSync Cloud into local YAML files. Use pull instance; pass --instance-id and --project-id when the directory is not yet linked (--org-id is optional when the token has a single organization).",
1537
+ "examples": [
1538
+ "<%= config.bin %> <%= command.id %>"
1539
+ ],
1540
+ "flags": {},
1541
+ "hasDynamicHelp": false,
1542
+ "hidden": true,
1543
+ "hiddenAliases": [],
1544
+ "id": "pull",
1545
+ "pluginAlias": "powersync",
1546
+ "pluginName": "powersync",
1547
+ "pluginType": "core",
1548
+ "strict": true,
1549
+ "summary": "[Cloud only] Download Cloud config into local service.yaml and sync-config.yaml.",
1550
+ "enableJsonFlag": false,
1551
+ "isESM": true,
1552
+ "relativePath": [
1553
+ "dist",
1554
+ "commands",
1555
+ "pull",
1556
+ "index.js"
1557
+ ]
1558
+ },
1559
+ "pull:instance": {
1560
+ "aliases": [],
1561
+ "args": {},
1562
+ "description": "Fetch an existing Cloud instance by ID: create the config directory if needed, write cli.yaml, and download service.yaml and sync-config.yaml. Pass --instance-id and --project-id when the directory is not yet linked; --org-id is optional when the token has a single organization. Cloud only.",
1563
+ "examples": [
1564
+ "<%= config.bin %> <%= command.id %>",
1565
+ "<%= config.bin %> <%= command.id %> --instance-id=<id> --project-id=<id>",
1566
+ "<%= config.bin %> <%= command.id %> --instance-id=<id> --project-id=<id> --org-id=<org-id>"
1567
+ ],
1568
+ "flags": {
1569
+ "directory": {
1570
+ "description": "Directory containing PowerSync config. Defaults to \"powersync\". This is required if multiple powersync config files are present in subdirectories of the current working directory.",
1571
+ "helpGroup": "PROJECT",
1572
+ "name": "directory",
1573
+ "default": "powersync",
1574
+ "hasDynamicHelp": false,
1575
+ "multiple": false,
1576
+ "type": "option"
1577
+ },
1578
+ "instance-id": {
1579
+ "dependsOn": [
1580
+ "project-id"
1581
+ ],
1582
+ "description": "PowerSync Cloud instance ID. Manually passed if the current context has not been linked.",
1583
+ "helpGroup": "CLOUD_PROJECT",
1584
+ "name": "instance-id",
1585
+ "required": false,
1586
+ "hasDynamicHelp": false,
1587
+ "multiple": false,
1588
+ "type": "option"
1589
+ },
1590
+ "org-id": {
1591
+ "description": "Organization ID (optional). Defaults to the token’s single org when only one is available; pass explicitly if the token has multiple orgs.",
1592
+ "helpGroup": "CLOUD_PROJECT",
1593
+ "name": "org-id",
1594
+ "required": false,
1595
+ "hasDynamicHelp": false,
1596
+ "multiple": false,
1597
+ "type": "option"
1598
+ },
1599
+ "project-id": {
1600
+ "description": "Project ID. Manually passed if the current context has not been linked.",
1601
+ "helpGroup": "CLOUD_PROJECT",
1602
+ "name": "project-id",
1603
+ "required": false,
1604
+ "hasDynamicHelp": false,
1605
+ "multiple": false,
1606
+ "type": "option"
1607
+ }
1608
+ },
1609
+ "hasDynamicHelp": false,
1610
+ "hiddenAliases": [],
1611
+ "id": "pull:instance",
1612
+ "pluginAlias": "powersync",
1613
+ "pluginName": "powersync",
1614
+ "pluginType": "core",
1615
+ "strict": true,
1616
+ "summary": "[Cloud only] Pull an existing Cloud instance: link and download config into local service.yaml and sync-config.yaml.",
1617
+ "enableJsonFlag": false,
1618
+ "commandHelpGroup": "PROJECT SETUP",
1619
+ "isESM": true,
1620
+ "relativePath": [
1621
+ "dist",
1622
+ "commands",
1623
+ "pull",
1624
+ "instance.js"
1625
+ ]
1626
+ }
1627
+ },
1628
+ "version": "0.0.0-dev-20260305082615"
1629
+ }