@memberjunction/cli 2.122.0 → 2.122.1

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 (2) hide show
  1. package/oclif.manifest.json +543 -543
  2. package/package.json +8 -8
@@ -157,57 +157,30 @@
157
157
  "index.js"
158
158
  ]
159
159
  },
160
- "install": {
161
- "aliases": [],
162
- "args": {},
163
- "description": "Install MemberJunction",
164
- "examples": [
165
- "<%= config.bin %> <%= command.id %>\n"
166
- ],
167
- "flags": {
168
- "verbose": {
169
- "char": "v",
170
- "description": "Enable additional logging",
171
- "name": "verbose",
172
- "allowNo": false,
173
- "type": "boolean"
174
- }
175
- },
176
- "hasDynamicHelp": false,
177
- "hiddenAliases": [],
178
- "id": "install",
179
- "pluginAlias": "@memberjunction/cli",
180
- "pluginName": "@memberjunction/cli",
181
- "pluginType": "core",
182
- "strict": true,
183
- "enableJsonFlag": false,
184
- "isESM": false,
185
- "relativePath": [
186
- "dist",
187
- "commands",
188
- "install",
189
- "index.js"
190
- ]
191
- },
192
- "migrate": {
160
+ "dbdoc:analyze": {
193
161
  "aliases": [],
194
162
  "args": {},
195
- "description": "Migrate MemberJunction database to latest version",
163
+ "description": "Analyze database and generate documentation (delegates to db-auto-doc analyze)",
196
164
  "examples": [
197
- "<%= config.bin %> <%= command.id %>\n"
165
+ "<%= config.bin %> <%= command.id %>",
166
+ "<%= config.bin %> <%= command.id %> --resume ./output/run-6/state.json",
167
+ "<%= config.bin %> <%= command.id %> --config ./my-config.json"
198
168
  ],
199
169
  "flags": {
200
- "verbose": {
201
- "char": "v",
202
- "description": "Enable additional logging",
203
- "name": "verbose",
204
- "allowNo": false,
205
- "type": "boolean"
170
+ "resume": {
171
+ "char": "r",
172
+ "description": "Resume from an existing state file",
173
+ "name": "resume",
174
+ "required": false,
175
+ "hasDynamicHelp": false,
176
+ "multiple": false,
177
+ "type": "option"
206
178
  },
207
- "tag": {
208
- "char": "t",
209
- "description": "Version tag to use for running remote migrations",
210
- "name": "tag",
179
+ "config": {
180
+ "char": "c",
181
+ "description": "Path to config file",
182
+ "name": "config",
183
+ "default": "./config.json",
211
184
  "hasDynamicHelp": false,
212
185
  "multiple": false,
213
186
  "type": "option"
@@ -215,7 +188,7 @@
215
188
  },
216
189
  "hasDynamicHelp": false,
217
190
  "hiddenAliases": [],
218
- "id": "migrate",
191
+ "id": "dbdoc:analyze",
219
192
  "pluginAlias": "@memberjunction/cli",
220
193
  "pluginName": "@memberjunction/cli",
221
194
  "pluginType": "core",
@@ -225,88 +198,105 @@
225
198
  "relativePath": [
226
199
  "dist",
227
200
  "commands",
228
- "migrate",
229
- "index.js"
201
+ "dbdoc",
202
+ "analyze.js"
230
203
  ]
231
204
  },
232
- "sync:file-reset": {
205
+ "dbdoc:export-sample-queries": {
233
206
  "aliases": [],
234
207
  "args": {},
235
- "description": "Reset file metadata sections",
208
+ "description": "Export sample queries to MemberJunction metadata format (delegates to db-auto-doc export-sample-queries)",
236
209
  "examples": [
237
- "<%= config.bin %> <%= command.id %>",
238
- "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
239
- "<%= config.bin %> <%= command.id %> --sections=\"dependencies,references\"",
240
- "<%= config.bin %> <%= command.id %> --all"
210
+ "<%= config.bin %> <%= command.id %> --input ./output/sample-queries.json --output ./metadata/queries/.queries.json",
211
+ "<%= config.bin %> <%= command.id %> --input ./sample-queries.json --output ./metadata/queries/.queries.json --separate-sql-files",
212
+ "<%= config.bin %> <%= command.id %> --input ./sample-queries.json --output ./queries/.queries.json --category \"Database Documentation\"",
213
+ "<%= config.bin %> <%= command.id %> --input ./sample-queries.json --output ./queries/.queries.json --status Pending --min-confidence 0.8"
241
214
  ],
242
215
  "flags": {
243
- "dir": {
244
- "description": "Specific entity directory to reset",
245
- "name": "dir",
216
+ "input": {
217
+ "char": "i",
218
+ "description": "Path to sample-queries.json file generated by generate-queries command",
219
+ "name": "input",
220
+ "required": true,
246
221
  "hasDynamicHelp": false,
247
222
  "multiple": false,
248
223
  "type": "option"
249
224
  },
250
- "sections": {
251
- "description": "Comma-separated list of sections to reset (dependencies,references,related,lookup)",
252
- "name": "sections",
225
+ "output": {
226
+ "char": "o",
227
+ "description": "Output path for the .queries.json metadata file",
228
+ "name": "output",
229
+ "required": true,
253
230
  "hasDynamicHelp": false,
254
231
  "multiple": false,
255
232
  "type": "option"
256
233
  },
257
- "all": {
258
- "description": "Reset all metadata sections",
259
- "name": "all",
234
+ "separate-sql-files": {
235
+ "description": "Write SQL to separate files and use @file: references",
236
+ "name": "separate-sql-files",
260
237
  "allowNo": false,
261
238
  "type": "boolean"
262
239
  },
263
- "dry-run": {
264
- "description": "Show what would be reset without actually resetting",
265
- "name": "dry-run",
240
+ "sql-dir": {
241
+ "description": "Directory for SQL files when using --separate-sql-files (relative to output file)",
242
+ "name": "sql-dir",
243
+ "default": "SQL",
244
+ "hasDynamicHelp": false,
245
+ "multiple": false,
246
+ "type": "option"
247
+ },
248
+ "category": {
249
+ "description": "Category name for @lookup reference (e.g., \"Database Documentation\")",
250
+ "name": "category",
251
+ "required": false,
252
+ "hasDynamicHelp": false,
253
+ "multiple": false,
254
+ "type": "option"
255
+ },
256
+ "status": {
257
+ "description": "Status to assign to exported queries",
258
+ "name": "status",
259
+ "default": "Pending",
260
+ "hasDynamicHelp": false,
261
+ "multiple": false,
262
+ "options": [
263
+ "Approved",
264
+ "Pending",
265
+ "Rejected",
266
+ "Expired"
267
+ ],
268
+ "type": "option"
269
+ },
270
+ "min-confidence": {
271
+ "description": "Minimum confidence threshold to export (0-1)",
272
+ "name": "min-confidence",
273
+ "default": "0",
274
+ "hasDynamicHelp": false,
275
+ "multiple": false,
276
+ "type": "option"
277
+ },
278
+ "validated-only": {
279
+ "description": "Only export queries that were successfully validated",
280
+ "name": "validated-only",
266
281
  "allowNo": false,
267
282
  "type": "boolean"
268
283
  },
269
- "force": {
270
- "description": "Skip confirmation prompts",
271
- "name": "force",
284
+ "append": {
285
+ "description": "Append to existing metadata file instead of overwriting",
286
+ "name": "append",
272
287
  "allowNo": false,
273
288
  "type": "boolean"
274
289
  },
275
- "verbose": {
276
- "char": "v",
277
- "description": "Show detailed output",
278
- "name": "verbose",
290
+ "include-primary-key": {
291
+ "description": "Include primaryKey and sync fields (for updating existing records)",
292
+ "name": "include-primary-key",
279
293
  "allowNo": false,
280
294
  "type": "boolean"
281
295
  }
282
296
  },
283
297
  "hasDynamicHelp": false,
284
298
  "hiddenAliases": [],
285
- "id": "sync:file-reset",
286
- "pluginAlias": "@memberjunction/cli",
287
- "pluginName": "@memberjunction/cli",
288
- "pluginType": "core",
289
- "strict": true,
290
- "enableJsonFlag": false,
291
- "isESM": false,
292
- "relativePath": [
293
- "dist",
294
- "commands",
295
- "sync",
296
- "file-reset.js"
297
- ]
298
- },
299
- "sync:init": {
300
- "aliases": [],
301
- "args": {},
302
- "description": "Initialize a directory for metadata synchronization",
303
- "examples": [
304
- "<%= config.bin %> <%= command.id %>"
305
- ],
306
- "flags": {},
307
- "hasDynamicHelp": false,
308
- "hiddenAliases": [],
309
- "id": "sync:init",
299
+ "id": "dbdoc:export-sample-queries",
310
300
  "pluginAlias": "@memberjunction/cli",
311
301
  "pluginName": "@memberjunction/cli",
312
302
  "pluginType": "core",
@@ -316,119 +306,92 @@
316
306
  "relativePath": [
317
307
  "dist",
318
308
  "commands",
319
- "sync",
320
- "init.js"
309
+ "dbdoc",
310
+ "export-sample-queries.js"
321
311
  ]
322
312
  },
323
- "sync:pull": {
313
+ "dbdoc:export": {
324
314
  "aliases": [],
325
315
  "args": {},
326
- "description": "Pull metadata from database to local files",
316
+ "description": "Export documentation in multiple formats (delegates to db-auto-doc export)",
327
317
  "examples": [
328
- "<%= config.bin %> <%= command.id %> --entity=\"AI Prompts\"",
329
- "<%= config.bin %> <%= command.id %> --entity=\"AI Prompts\" --filter=\"CategoryID='customer-service-id'\"",
330
- "<%= config.bin %> <%= command.id %> --entity=\"AI Agents\" --merge-strategy=overwrite",
331
- "<%= config.bin %> <%= command.id %> --entity=\"Actions\" --target-dir=./custom-actions --no-validate",
332
- "<%= config.bin %> <%= command.id %> --entity=\"Templates\" --dry-run --verbose",
333
- "<%= config.bin %> <%= command.id %> --entity=\"AI Prompts\" --exclude-fields=InternalNotes,DebugInfo"
318
+ "<%= config.bin %> <%= command.id %> --state-file=./db-doc-state.json",
319
+ "<%= config.bin %> <%= command.id %> --sql",
320
+ "<%= config.bin %> <%= command.id %> --markdown",
321
+ "<%= config.bin %> <%= command.id %> --html",
322
+ "<%= config.bin %> <%= command.id %> --csv",
323
+ "<%= config.bin %> <%= command.id %> --mermaid",
324
+ "<%= config.bin %> <%= command.id %> --sql --markdown --html --csv --mermaid --apply"
334
325
  ],
335
326
  "flags": {
336
- "entity": {
337
- "description": "Entity name to pull",
338
- "name": "entity",
339
- "required": true,
327
+ "state-file": {
328
+ "char": "s",
329
+ "description": "Path to state JSON file",
330
+ "name": "state-file",
340
331
  "hasDynamicHelp": false,
341
332
  "multiple": false,
342
333
  "type": "option"
343
334
  },
344
- "filter": {
345
- "description": "Additional filter for pulling specific records",
346
- "name": "filter",
335
+ "output-dir": {
336
+ "char": "o",
337
+ "description": "Output directory for generated files",
338
+ "name": "output-dir",
347
339
  "hasDynamicHelp": false,
348
340
  "multiple": false,
349
341
  "type": "option"
350
342
  },
351
- "dry-run": {
352
- "description": "Show what would be pulled without actually pulling",
353
- "name": "dry-run",
343
+ "sql": {
344
+ "description": "Generate SQL script",
345
+ "name": "sql",
354
346
  "allowNo": false,
355
347
  "type": "boolean"
356
348
  },
357
- "multi-file": {
358
- "description": "Create a single file with multiple records (provide filename)",
359
- "name": "multi-file",
360
- "hasDynamicHelp": false,
361
- "multiple": false,
362
- "type": "option"
363
- },
364
- "verbose": {
365
- "char": "v",
366
- "description": "Show detailed output",
367
- "name": "verbose",
349
+ "markdown": {
350
+ "description": "Generate Markdown documentation",
351
+ "name": "markdown",
368
352
  "allowNo": false,
369
353
  "type": "boolean"
370
354
  },
371
- "no-validate": {
372
- "description": "Skip validation before pull",
373
- "name": "no-validate",
355
+ "html": {
356
+ "description": "Generate interactive HTML documentation",
357
+ "name": "html",
374
358
  "allowNo": false,
375
359
  "type": "boolean"
376
360
  },
377
- "update-existing": {
378
- "description": "Update existing records during pull",
379
- "name": "update-existing",
361
+ "csv": {
362
+ "description": "Generate CSV exports (tables and columns)",
363
+ "name": "csv",
380
364
  "allowNo": false,
381
365
  "type": "boolean"
382
366
  },
383
- "create-new": {
384
- "description": "Create new files for records not found locally",
385
- "name": "create-new",
367
+ "mermaid": {
368
+ "description": "Generate Mermaid ERD diagram files",
369
+ "name": "mermaid",
386
370
  "allowNo": false,
387
371
  "type": "boolean"
388
372
  },
389
- "backup-before-update": {
390
- "description": "Create backups before updating files",
391
- "name": "backup-before-update",
373
+ "report": {
374
+ "description": "Generate analysis report",
375
+ "name": "report",
392
376
  "allowNo": false,
393
377
  "type": "boolean"
394
378
  },
395
- "merge-strategy": {
396
- "description": "Merge strategy for updates",
397
- "name": "merge-strategy",
398
- "default": "merge",
399
- "hasDynamicHelp": false,
400
- "multiple": false,
401
- "options": [
402
- "merge",
403
- "overwrite",
404
- "skip"
405
- ],
406
- "type": "option"
407
- },
408
- "backup-directory": {
409
- "description": "Custom backup directory (default: .backups)",
410
- "name": "backup-directory",
411
- "hasDynamicHelp": false,
412
- "multiple": false,
413
- "type": "option"
414
- },
415
- "preserve-fields": {
416
- "description": "Comma-separated list of fields to preserve during updates",
417
- "name": "preserve-fields",
418
- "hasDynamicHelp": false,
419
- "multiple": true,
420
- "type": "option"
379
+ "apply": {
380
+ "description": "Apply SQL to database",
381
+ "name": "apply",
382
+ "allowNo": false,
383
+ "type": "boolean"
421
384
  },
422
- "exclude-fields": {
423
- "description": "Comma-separated list of fields to exclude from pull",
424
- "name": "exclude-fields",
425
- "hasDynamicHelp": false,
426
- "multiple": true,
427
- "type": "option"
385
+ "approved-only": {
386
+ "description": "Only export approved items",
387
+ "name": "approved-only",
388
+ "allowNo": false,
389
+ "type": "boolean"
428
390
  },
429
- "target-dir": {
430
- "description": "Specific target directory (overrides auto-discovery)",
431
- "name": "target-dir",
391
+ "confidence-threshold": {
392
+ "description": "Minimum confidence threshold",
393
+ "name": "confidence-threshold",
394
+ "default": "0",
432
395
  "hasDynamicHelp": false,
433
396
  "multiple": false,
434
397
  "type": "option"
@@ -436,7 +399,7 @@
436
399
  },
437
400
  "hasDynamicHelp": false,
438
401
  "hiddenAliases": [],
439
- "id": "sync:pull",
402
+ "id": "dbdoc:export",
440
403
  "pluginAlias": "@memberjunction/cli",
441
404
  "pluginName": "@memberjunction/cli",
442
405
  "pluginType": "core",
@@ -446,71 +409,57 @@
446
409
  "relativePath": [
447
410
  "dist",
448
411
  "commands",
449
- "sync",
450
- "pull.js"
412
+ "dbdoc",
413
+ "export.js"
451
414
  ]
452
415
  },
453
- "sync:push": {
416
+ "dbdoc:generate-queries": {
454
417
  "aliases": [],
455
418
  "args": {},
456
- "description": "Push local file changes to the database",
419
+ "description": "Generate sample SQL queries from existing analysis state (delegates to db-auto-doc generate-queries)",
457
420
  "examples": [
458
- "<%= config.bin %> <%= command.id %>",
459
- "<%= config.bin %> <%= command.id %> --dry-run",
460
- "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
461
- "<%= config.bin %> <%= command.id %> --ci"
421
+ "<%= config.bin %> <%= command.id %> --from-state ./output/run-1/state.json",
422
+ "<%= config.bin %> <%= command.id %> --from-state ./output/run-1/state.json --output-dir ./queries",
423
+ "<%= config.bin %> <%= command.id %> --from-state ./output/run-1/state.json --queries-per-table 10"
462
424
  ],
463
425
  "flags": {
464
- "dir": {
465
- "description": "Specific entity directory to push",
466
- "name": "dir",
426
+ "from-state": {
427
+ "description": "Path to existing state.json file from previous analysis",
428
+ "name": "from-state",
429
+ "required": true,
467
430
  "hasDynamicHelp": false,
468
431
  "multiple": false,
469
432
  "type": "option"
470
433
  },
471
- "dry-run": {
472
- "description": "Show what would be pushed without actually pushing",
473
- "name": "dry-run",
474
- "allowNo": false,
475
- "type": "boolean"
476
- },
477
- "ci": {
478
- "description": "CI mode - no prompts, fail on issues",
479
- "name": "ci",
480
- "allowNo": false,
481
- "type": "boolean"
482
- },
483
- "verbose": {
484
- "char": "v",
485
- "description": "Show detailed field-level output",
486
- "name": "verbose",
487
- "allowNo": false,
488
- "type": "boolean"
489
- },
490
- "no-validate": {
491
- "description": "Skip validation before push",
492
- "name": "no-validate",
493
- "allowNo": false,
494
- "type": "boolean"
434
+ "output-dir": {
435
+ "description": "Output directory for generated queries",
436
+ "name": "output-dir",
437
+ "required": false,
438
+ "hasDynamicHelp": false,
439
+ "multiple": false,
440
+ "type": "option"
495
441
  },
496
- "parallel-batch-size": {
497
- "description": "Number of records to process in parallel (default: 10)",
498
- "name": "parallel-batch-size",
499
- "default": 10,
442
+ "config": {
443
+ "char": "c",
444
+ "description": "Path to config file (for database connection and AI settings)",
445
+ "name": "config",
446
+ "default": "./config.json",
500
447
  "hasDynamicHelp": false,
501
448
  "multiple": false,
502
449
  "type": "option"
503
450
  },
504
- "include": {
505
- "description": "Only process these directories (comma-separated, supports patterns)",
506
- "name": "include",
451
+ "queries-per-table": {
452
+ "description": "Number of queries to generate per table",
453
+ "name": "queries-per-table",
454
+ "required": false,
507
455
  "hasDynamicHelp": false,
508
456
  "multiple": false,
509
457
  "type": "option"
510
458
  },
511
- "exclude": {
512
- "description": "Skip these directories (comma-separated, supports patterns)",
513
- "name": "exclude",
459
+ "max-execution-time": {
460
+ "description": "Maximum execution time for query validation (ms)",
461
+ "name": "max-execution-time",
462
+ "required": false,
514
463
  "hasDynamicHelp": false,
515
464
  "multiple": false,
516
465
  "type": "option"
@@ -518,7 +467,7 @@
518
467
  },
519
468
  "hasDynamicHelp": false,
520
469
  "hiddenAliases": [],
521
- "id": "sync:push",
470
+ "id": "dbdoc:generate-queries",
522
471
  "pluginAlias": "@memberjunction/cli",
523
472
  "pluginName": "@memberjunction/cli",
524
473
  "pluginType": "core",
@@ -528,52 +477,76 @@
528
477
  "relativePath": [
529
478
  "dist",
530
479
  "commands",
531
- "sync",
532
- "push.js"
480
+ "dbdoc",
481
+ "generate-queries.js"
533
482
  ]
534
483
  },
535
- "sync:status": {
484
+ "dbdoc": {
536
485
  "aliases": [],
537
486
  "args": {},
538
- "description": "Show status of local files vs database",
487
+ "description": "AI-powered database documentation generator",
488
+ "flags": {},
489
+ "hasDynamicHelp": false,
490
+ "hidden": false,
491
+ "hiddenAliases": [],
492
+ "id": "dbdoc",
493
+ "pluginAlias": "@memberjunction/cli",
494
+ "pluginName": "@memberjunction/cli",
495
+ "pluginType": "core",
496
+ "strict": true,
497
+ "enableJsonFlag": false,
498
+ "isESM": false,
499
+ "relativePath": [
500
+ "dist",
501
+ "commands",
502
+ "dbdoc",
503
+ "index.js"
504
+ ]
505
+ },
506
+ "dbdoc:init": {
507
+ "aliases": [],
508
+ "args": {},
509
+ "description": "Initialize DBAutoDoc project (delegates to db-auto-doc init)",
510
+ "examples": [
511
+ "<%= config.bin %> <%= command.id %>"
512
+ ],
513
+ "flags": {},
514
+ "hasDynamicHelp": false,
515
+ "hiddenAliases": [],
516
+ "id": "dbdoc:init",
517
+ "pluginAlias": "@memberjunction/cli",
518
+ "pluginName": "@memberjunction/cli",
519
+ "pluginType": "core",
520
+ "strict": true,
521
+ "enableJsonFlag": false,
522
+ "isESM": false,
523
+ "relativePath": [
524
+ "dist",
525
+ "commands",
526
+ "dbdoc",
527
+ "init.js"
528
+ ]
529
+ },
530
+ "dbdoc:reset": {
531
+ "aliases": [],
532
+ "args": {},
533
+ "description": "Reset analysis state (delegates to db-auto-doc reset)",
539
534
  "examples": [
540
535
  "<%= config.bin %> <%= command.id %>",
541
- "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
542
- "<%= config.bin %> <%= command.id %> --verbose"
536
+ "<%= config.bin %> <%= command.id %> --force"
543
537
  ],
544
538
  "flags": {
545
- "dir": {
546
- "description": "Specific entity directory to check status",
547
- "name": "dir",
548
- "hasDynamicHelp": false,
549
- "multiple": false,
550
- "type": "option"
551
- },
552
- "verbose": {
553
- "char": "v",
554
- "description": "Show detailed field-level differences",
555
- "name": "verbose",
539
+ "force": {
540
+ "char": "f",
541
+ "description": "Force reset without confirmation",
542
+ "name": "force",
556
543
  "allowNo": false,
557
544
  "type": "boolean"
558
- },
559
- "include": {
560
- "description": "Only process these directories (comma-separated, supports patterns)",
561
- "name": "include",
562
- "hasDynamicHelp": false,
563
- "multiple": false,
564
- "type": "option"
565
- },
566
- "exclude": {
567
- "description": "Skip these directories (comma-separated, supports patterns)",
568
- "name": "exclude",
569
- "hasDynamicHelp": false,
570
- "multiple": false,
571
- "type": "option"
572
545
  }
573
546
  },
574
547
  "hasDynamicHelp": false,
575
548
  "hiddenAliases": [],
576
- "id": "sync:status",
549
+ "id": "dbdoc:reset",
577
550
  "pluginAlias": "@memberjunction/cli",
578
551
  "pluginName": "@memberjunction/cli",
579
552
  "pluginType": "core",
@@ -583,44 +556,23 @@
583
556
  "relativePath": [
584
557
  "dist",
585
558
  "commands",
586
- "sync",
587
- "status.js"
559
+ "dbdoc",
560
+ "reset.js"
588
561
  ]
589
562
  },
590
- "sync:validate": {
563
+ "dbdoc:status": {
591
564
  "aliases": [],
592
565
  "args": {},
593
- "description": "Validate metadata files",
566
+ "description": "Show analysis status and progress (delegates to db-auto-doc status)",
594
567
  "examples": [
595
568
  "<%= config.bin %> <%= command.id %>",
596
- "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
597
- "<%= config.bin %> <%= command.id %> --save-report",
598
- "<%= config.bin %> <%= command.id %> --verbose"
569
+ "<%= config.bin %> <%= command.id %> --state-file ./custom-state.json"
599
570
  ],
600
571
  "flags": {
601
- "dir": {
602
- "description": "Specific entity directory to validate",
603
- "name": "dir",
604
- "hasDynamicHelp": false,
605
- "multiple": false,
606
- "type": "option"
607
- },
608
- "verbose": {
609
- "char": "v",
610
- "description": "Show detailed validation output",
611
- "name": "verbose",
612
- "allowNo": false,
613
- "type": "boolean"
614
- },
615
- "save-report": {
616
- "description": "Save validation report as markdown file",
617
- "name": "save-report",
618
- "allowNo": false,
619
- "type": "boolean"
620
- },
621
- "output": {
622
- "description": "Output file path for validation report (default: validation-report.md)",
623
- "name": "output",
572
+ "state-file": {
573
+ "char": "s",
574
+ "description": "Path to state JSON file",
575
+ "name": "state-file",
624
576
  "hasDynamicHelp": false,
625
577
  "multiple": false,
626
578
  "type": "option"
@@ -628,7 +580,7 @@
628
580
  },
629
581
  "hasDynamicHelp": false,
630
582
  "hiddenAliases": [],
631
- "id": "sync:validate",
583
+ "id": "dbdoc:status",
632
584
  "pluginAlias": "@memberjunction/cli",
633
585
  "pluginName": "@memberjunction/cli",
634
586
  "pluginType": "core",
@@ -638,44 +590,21 @@
638
590
  "relativePath": [
639
591
  "dist",
640
592
  "commands",
641
- "sync",
642
- "validate.js"
593
+ "dbdoc",
594
+ "status.js"
643
595
  ]
644
596
  },
645
- "sync:watch": {
597
+ "install": {
646
598
  "aliases": [],
647
599
  "args": {},
648
- "description": "Watch for file changes and sync automatically",
600
+ "description": "Install MemberJunction",
649
601
  "examples": [
650
- "<%= config.bin %> <%= command.id %>",
651
- "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
652
- "<%= config.bin %> <%= command.id %> --debounce=1000",
653
- "<%= config.bin %> <%= command.id %> --no-validate"
602
+ "<%= config.bin %> <%= command.id %>\n"
654
603
  ],
655
604
  "flags": {
656
- "dir": {
657
- "description": "Specific entity directory to watch",
658
- "name": "dir",
659
- "hasDynamicHelp": false,
660
- "multiple": false,
661
- "type": "option"
662
- },
663
- "debounce": {
664
- "description": "Debounce delay in milliseconds (default: 500)",
665
- "name": "debounce",
666
- "hasDynamicHelp": false,
667
- "multiple": false,
668
- "type": "option"
669
- },
670
- "no-validate": {
671
- "description": "Skip validation before sync",
672
- "name": "no-validate",
673
- "allowNo": false,
674
- "type": "boolean"
675
- },
676
605
  "verbose": {
677
606
  "char": "v",
678
- "description": "Show detailed output",
607
+ "description": "Enable additional logging",
679
608
  "name": "verbose",
680
609
  "allowNo": false,
681
610
  "type": "boolean"
@@ -683,7 +612,7 @@
683
612
  },
684
613
  "hasDynamicHelp": false,
685
614
  "hiddenAliases": [],
686
- "id": "sync:watch",
615
+ "id": "install",
687
616
  "pluginAlias": "@memberjunction/cli",
688
617
  "pluginName": "@memberjunction/cli",
689
618
  "pluginType": "core",
@@ -693,34 +622,29 @@
693
622
  "relativePath": [
694
623
  "dist",
695
624
  "commands",
696
- "sync",
697
- "watch.js"
625
+ "install",
626
+ "index.js"
698
627
  ]
699
628
  },
700
- "dbdoc:analyze": {
629
+ "migrate": {
701
630
  "aliases": [],
702
631
  "args": {},
703
- "description": "Analyze database and generate documentation (delegates to db-auto-doc analyze)",
704
- "examples": [
705
- "<%= config.bin %> <%= command.id %>",
706
- "<%= config.bin %> <%= command.id %> --resume ./output/run-6/state.json",
707
- "<%= config.bin %> <%= command.id %> --config ./my-config.json"
632
+ "description": "Migrate MemberJunction database to latest version",
633
+ "examples": [
634
+ "<%= config.bin %> <%= command.id %>\n"
708
635
  ],
709
636
  "flags": {
710
- "resume": {
711
- "char": "r",
712
- "description": "Resume from an existing state file",
713
- "name": "resume",
714
- "required": false,
715
- "hasDynamicHelp": false,
716
- "multiple": false,
717
- "type": "option"
637
+ "verbose": {
638
+ "char": "v",
639
+ "description": "Enable additional logging",
640
+ "name": "verbose",
641
+ "allowNo": false,
642
+ "type": "boolean"
718
643
  },
719
- "config": {
720
- "char": "c",
721
- "description": "Path to config file",
722
- "name": "config",
723
- "default": "./config.json",
644
+ "tag": {
645
+ "char": "t",
646
+ "description": "Version tag to use for running remote migrations",
647
+ "name": "tag",
724
648
  "hasDynamicHelp": false,
725
649
  "multiple": false,
726
650
  "type": "option"
@@ -728,7 +652,7 @@
728
652
  },
729
653
  "hasDynamicHelp": false,
730
654
  "hiddenAliases": [],
731
- "id": "dbdoc:analyze",
655
+ "id": "migrate",
732
656
  "pluginAlias": "@memberjunction/cli",
733
657
  "pluginName": "@memberjunction/cli",
734
658
  "pluginType": "core",
@@ -738,105 +662,64 @@
738
662
  "relativePath": [
739
663
  "dist",
740
664
  "commands",
741
- "dbdoc",
742
- "analyze.js"
665
+ "migrate",
666
+ "index.js"
743
667
  ]
744
668
  },
745
- "dbdoc:export-sample-queries": {
669
+ "sync:file-reset": {
746
670
  "aliases": [],
747
671
  "args": {},
748
- "description": "Export sample queries to MemberJunction metadata format (delegates to db-auto-doc export-sample-queries)",
672
+ "description": "Reset file metadata sections",
749
673
  "examples": [
750
- "<%= config.bin %> <%= command.id %> --input ./output/sample-queries.json --output ./metadata/queries/.queries.json",
751
- "<%= config.bin %> <%= command.id %> --input ./sample-queries.json --output ./metadata/queries/.queries.json --separate-sql-files",
752
- "<%= config.bin %> <%= command.id %> --input ./sample-queries.json --output ./queries/.queries.json --category \"Database Documentation\"",
753
- "<%= config.bin %> <%= command.id %> --input ./sample-queries.json --output ./queries/.queries.json --status Pending --min-confidence 0.8"
674
+ "<%= config.bin %> <%= command.id %>",
675
+ "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
676
+ "<%= config.bin %> <%= command.id %> --sections=\"dependencies,references\"",
677
+ "<%= config.bin %> <%= command.id %> --all"
754
678
  ],
755
679
  "flags": {
756
- "input": {
757
- "char": "i",
758
- "description": "Path to sample-queries.json file generated by generate-queries command",
759
- "name": "input",
760
- "required": true,
680
+ "dir": {
681
+ "description": "Specific entity directory to reset",
682
+ "name": "dir",
761
683
  "hasDynamicHelp": false,
762
684
  "multiple": false,
763
685
  "type": "option"
764
686
  },
765
- "output": {
766
- "char": "o",
767
- "description": "Output path for the .queries.json metadata file",
768
- "name": "output",
769
- "required": true,
687
+ "sections": {
688
+ "description": "Comma-separated list of sections to reset (dependencies,references,related,lookup)",
689
+ "name": "sections",
770
690
  "hasDynamicHelp": false,
771
691
  "multiple": false,
772
692
  "type": "option"
773
693
  },
774
- "separate-sql-files": {
775
- "description": "Write SQL to separate files and use @file: references",
776
- "name": "separate-sql-files",
694
+ "all": {
695
+ "description": "Reset all metadata sections",
696
+ "name": "all",
777
697
  "allowNo": false,
778
698
  "type": "boolean"
779
699
  },
780
- "sql-dir": {
781
- "description": "Directory for SQL files when using --separate-sql-files (relative to output file)",
782
- "name": "sql-dir",
783
- "default": "SQL",
784
- "hasDynamicHelp": false,
785
- "multiple": false,
786
- "type": "option"
787
- },
788
- "category": {
789
- "description": "Category name for @lookup reference (e.g., \"Database Documentation\")",
790
- "name": "category",
791
- "required": false,
792
- "hasDynamicHelp": false,
793
- "multiple": false,
794
- "type": "option"
795
- },
796
- "status": {
797
- "description": "Status to assign to exported queries",
798
- "name": "status",
799
- "default": "Pending",
800
- "hasDynamicHelp": false,
801
- "multiple": false,
802
- "options": [
803
- "Approved",
804
- "Pending",
805
- "Rejected",
806
- "Expired"
807
- ],
808
- "type": "option"
809
- },
810
- "min-confidence": {
811
- "description": "Minimum confidence threshold to export (0-1)",
812
- "name": "min-confidence",
813
- "default": "0",
814
- "hasDynamicHelp": false,
815
- "multiple": false,
816
- "type": "option"
817
- },
818
- "validated-only": {
819
- "description": "Only export queries that were successfully validated",
820
- "name": "validated-only",
700
+ "dry-run": {
701
+ "description": "Show what would be reset without actually resetting",
702
+ "name": "dry-run",
821
703
  "allowNo": false,
822
704
  "type": "boolean"
823
705
  },
824
- "append": {
825
- "description": "Append to existing metadata file instead of overwriting",
826
- "name": "append",
706
+ "force": {
707
+ "description": "Skip confirmation prompts",
708
+ "name": "force",
827
709
  "allowNo": false,
828
710
  "type": "boolean"
829
711
  },
830
- "include-primary-key": {
831
- "description": "Include primaryKey and sync fields (for updating existing records)",
832
- "name": "include-primary-key",
712
+ "verbose": {
713
+ "char": "v",
714
+ "description": "Show detailed output",
715
+ "name": "verbose",
833
716
  "allowNo": false,
834
717
  "type": "boolean"
835
718
  }
836
719
  },
837
720
  "hasDynamicHelp": false,
838
721
  "hiddenAliases": [],
839
- "id": "dbdoc:export-sample-queries",
722
+ "id": "sync:file-reset",
840
723
  "pluginAlias": "@memberjunction/cli",
841
724
  "pluginName": "@memberjunction/cli",
842
725
  "pluginType": "core",
@@ -846,92 +729,143 @@
846
729
  "relativePath": [
847
730
  "dist",
848
731
  "commands",
849
- "dbdoc",
850
- "export-sample-queries.js"
732
+ "sync",
733
+ "file-reset.js"
851
734
  ]
852
735
  },
853
- "dbdoc:export": {
736
+ "sync:init": {
854
737
  "aliases": [],
855
738
  "args": {},
856
- "description": "Export documentation in multiple formats (delegates to db-auto-doc export)",
739
+ "description": "Initialize a directory for metadata synchronization",
857
740
  "examples": [
858
- "<%= config.bin %> <%= command.id %> --state-file=./db-doc-state.json",
859
- "<%= config.bin %> <%= command.id %> --sql",
860
- "<%= config.bin %> <%= command.id %> --markdown",
861
- "<%= config.bin %> <%= command.id %> --html",
862
- "<%= config.bin %> <%= command.id %> --csv",
863
- "<%= config.bin %> <%= command.id %> --mermaid",
864
- "<%= config.bin %> <%= command.id %> --sql --markdown --html --csv --mermaid --apply"
741
+ "<%= config.bin %> <%= command.id %>"
742
+ ],
743
+ "flags": {},
744
+ "hasDynamicHelp": false,
745
+ "hiddenAliases": [],
746
+ "id": "sync:init",
747
+ "pluginAlias": "@memberjunction/cli",
748
+ "pluginName": "@memberjunction/cli",
749
+ "pluginType": "core",
750
+ "strict": true,
751
+ "enableJsonFlag": false,
752
+ "isESM": false,
753
+ "relativePath": [
754
+ "dist",
755
+ "commands",
756
+ "sync",
757
+ "init.js"
758
+ ]
759
+ },
760
+ "sync:pull": {
761
+ "aliases": [],
762
+ "args": {},
763
+ "description": "Pull metadata from database to local files",
764
+ "examples": [
765
+ "<%= config.bin %> <%= command.id %> --entity=\"AI Prompts\"",
766
+ "<%= config.bin %> <%= command.id %> --entity=\"AI Prompts\" --filter=\"CategoryID='customer-service-id'\"",
767
+ "<%= config.bin %> <%= command.id %> --entity=\"AI Agents\" --merge-strategy=overwrite",
768
+ "<%= config.bin %> <%= command.id %> --entity=\"Actions\" --target-dir=./custom-actions --no-validate",
769
+ "<%= config.bin %> <%= command.id %> --entity=\"Templates\" --dry-run --verbose",
770
+ "<%= config.bin %> <%= command.id %> --entity=\"AI Prompts\" --exclude-fields=InternalNotes,DebugInfo"
865
771
  ],
866
772
  "flags": {
867
- "state-file": {
868
- "char": "s",
869
- "description": "Path to state JSON file",
870
- "name": "state-file",
773
+ "entity": {
774
+ "description": "Entity name to pull",
775
+ "name": "entity",
776
+ "required": true,
871
777
  "hasDynamicHelp": false,
872
778
  "multiple": false,
873
779
  "type": "option"
874
780
  },
875
- "output-dir": {
876
- "char": "o",
877
- "description": "Output directory for generated files",
878
- "name": "output-dir",
781
+ "filter": {
782
+ "description": "Additional filter for pulling specific records",
783
+ "name": "filter",
879
784
  "hasDynamicHelp": false,
880
785
  "multiple": false,
881
786
  "type": "option"
882
787
  },
883
- "sql": {
884
- "description": "Generate SQL script",
885
- "name": "sql",
788
+ "dry-run": {
789
+ "description": "Show what would be pulled without actually pulling",
790
+ "name": "dry-run",
886
791
  "allowNo": false,
887
792
  "type": "boolean"
888
793
  },
889
- "markdown": {
890
- "description": "Generate Markdown documentation",
891
- "name": "markdown",
892
- "allowNo": false,
893
- "type": "boolean"
794
+ "multi-file": {
795
+ "description": "Create a single file with multiple records (provide filename)",
796
+ "name": "multi-file",
797
+ "hasDynamicHelp": false,
798
+ "multiple": false,
799
+ "type": "option"
894
800
  },
895
- "html": {
896
- "description": "Generate interactive HTML documentation",
897
- "name": "html",
801
+ "verbose": {
802
+ "char": "v",
803
+ "description": "Show detailed output",
804
+ "name": "verbose",
898
805
  "allowNo": false,
899
806
  "type": "boolean"
900
807
  },
901
- "csv": {
902
- "description": "Generate CSV exports (tables and columns)",
903
- "name": "csv",
808
+ "no-validate": {
809
+ "description": "Skip validation before pull",
810
+ "name": "no-validate",
904
811
  "allowNo": false,
905
812
  "type": "boolean"
906
813
  },
907
- "mermaid": {
908
- "description": "Generate Mermaid ERD diagram files",
909
- "name": "mermaid",
814
+ "update-existing": {
815
+ "description": "Update existing records during pull",
816
+ "name": "update-existing",
910
817
  "allowNo": false,
911
818
  "type": "boolean"
912
819
  },
913
- "report": {
914
- "description": "Generate analysis report",
915
- "name": "report",
820
+ "create-new": {
821
+ "description": "Create new files for records not found locally",
822
+ "name": "create-new",
916
823
  "allowNo": false,
917
824
  "type": "boolean"
918
825
  },
919
- "apply": {
920
- "description": "Apply SQL to database",
921
- "name": "apply",
826
+ "backup-before-update": {
827
+ "description": "Create backups before updating files",
828
+ "name": "backup-before-update",
922
829
  "allowNo": false,
923
830
  "type": "boolean"
924
831
  },
925
- "approved-only": {
926
- "description": "Only export approved items",
927
- "name": "approved-only",
928
- "allowNo": false,
929
- "type": "boolean"
832
+ "merge-strategy": {
833
+ "description": "Merge strategy for updates",
834
+ "name": "merge-strategy",
835
+ "default": "merge",
836
+ "hasDynamicHelp": false,
837
+ "multiple": false,
838
+ "options": [
839
+ "merge",
840
+ "overwrite",
841
+ "skip"
842
+ ],
843
+ "type": "option"
844
+ },
845
+ "backup-directory": {
846
+ "description": "Custom backup directory (default: .backups)",
847
+ "name": "backup-directory",
848
+ "hasDynamicHelp": false,
849
+ "multiple": false,
850
+ "type": "option"
851
+ },
852
+ "preserve-fields": {
853
+ "description": "Comma-separated list of fields to preserve during updates",
854
+ "name": "preserve-fields",
855
+ "hasDynamicHelp": false,
856
+ "multiple": true,
857
+ "type": "option"
858
+ },
859
+ "exclude-fields": {
860
+ "description": "Comma-separated list of fields to exclude from pull",
861
+ "name": "exclude-fields",
862
+ "hasDynamicHelp": false,
863
+ "multiple": true,
864
+ "type": "option"
930
865
  },
931
- "confidence-threshold": {
932
- "description": "Minimum confidence threshold",
933
- "name": "confidence-threshold",
934
- "default": "0",
866
+ "target-dir": {
867
+ "description": "Specific target directory (overrides auto-discovery)",
868
+ "name": "target-dir",
935
869
  "hasDynamicHelp": false,
936
870
  "multiple": false,
937
871
  "type": "option"
@@ -939,7 +873,7 @@
939
873
  },
940
874
  "hasDynamicHelp": false,
941
875
  "hiddenAliases": [],
942
- "id": "dbdoc:export",
876
+ "id": "sync:pull",
943
877
  "pluginAlias": "@memberjunction/cli",
944
878
  "pluginName": "@memberjunction/cli",
945
879
  "pluginType": "core",
@@ -949,57 +883,71 @@
949
883
  "relativePath": [
950
884
  "dist",
951
885
  "commands",
952
- "dbdoc",
953
- "export.js"
886
+ "sync",
887
+ "pull.js"
954
888
  ]
955
889
  },
956
- "dbdoc:generate-queries": {
890
+ "sync:push": {
957
891
  "aliases": [],
958
892
  "args": {},
959
- "description": "Generate sample SQL queries from existing analysis state (delegates to db-auto-doc generate-queries)",
893
+ "description": "Push local file changes to the database",
960
894
  "examples": [
961
- "<%= config.bin %> <%= command.id %> --from-state ./output/run-1/state.json",
962
- "<%= config.bin %> <%= command.id %> --from-state ./output/run-1/state.json --output-dir ./queries",
963
- "<%= config.bin %> <%= command.id %> --from-state ./output/run-1/state.json --queries-per-table 10"
895
+ "<%= config.bin %> <%= command.id %>",
896
+ "<%= config.bin %> <%= command.id %> --dry-run",
897
+ "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
898
+ "<%= config.bin %> <%= command.id %> --ci"
964
899
  ],
965
900
  "flags": {
966
- "from-state": {
967
- "description": "Path to existing state.json file from previous analysis",
968
- "name": "from-state",
969
- "required": true,
901
+ "dir": {
902
+ "description": "Specific entity directory to push",
903
+ "name": "dir",
970
904
  "hasDynamicHelp": false,
971
905
  "multiple": false,
972
906
  "type": "option"
973
907
  },
974
- "output-dir": {
975
- "description": "Output directory for generated queries",
976
- "name": "output-dir",
977
- "required": false,
978
- "hasDynamicHelp": false,
979
- "multiple": false,
980
- "type": "option"
908
+ "dry-run": {
909
+ "description": "Show what would be pushed without actually pushing",
910
+ "name": "dry-run",
911
+ "allowNo": false,
912
+ "type": "boolean"
981
913
  },
982
- "config": {
983
- "char": "c",
984
- "description": "Path to config file (for database connection and AI settings)",
985
- "name": "config",
986
- "default": "./config.json",
914
+ "ci": {
915
+ "description": "CI mode - no prompts, fail on issues",
916
+ "name": "ci",
917
+ "allowNo": false,
918
+ "type": "boolean"
919
+ },
920
+ "verbose": {
921
+ "char": "v",
922
+ "description": "Show detailed field-level output",
923
+ "name": "verbose",
924
+ "allowNo": false,
925
+ "type": "boolean"
926
+ },
927
+ "no-validate": {
928
+ "description": "Skip validation before push",
929
+ "name": "no-validate",
930
+ "allowNo": false,
931
+ "type": "boolean"
932
+ },
933
+ "parallel-batch-size": {
934
+ "description": "Number of records to process in parallel (default: 10)",
935
+ "name": "parallel-batch-size",
936
+ "default": 10,
987
937
  "hasDynamicHelp": false,
988
938
  "multiple": false,
989
939
  "type": "option"
990
940
  },
991
- "queries-per-table": {
992
- "description": "Number of queries to generate per table",
993
- "name": "queries-per-table",
994
- "required": false,
941
+ "include": {
942
+ "description": "Only process these directories (comma-separated, supports patterns)",
943
+ "name": "include",
995
944
  "hasDynamicHelp": false,
996
945
  "multiple": false,
997
946
  "type": "option"
998
947
  },
999
- "max-execution-time": {
1000
- "description": "Maximum execution time for query validation (ms)",
1001
- "name": "max-execution-time",
1002
- "required": false,
948
+ "exclude": {
949
+ "description": "Skip these directories (comma-separated, supports patterns)",
950
+ "name": "exclude",
1003
951
  "hasDynamicHelp": false,
1004
952
  "multiple": false,
1005
953
  "type": "option"
@@ -1007,29 +955,7 @@
1007
955
  },
1008
956
  "hasDynamicHelp": false,
1009
957
  "hiddenAliases": [],
1010
- "id": "dbdoc:generate-queries",
1011
- "pluginAlias": "@memberjunction/cli",
1012
- "pluginName": "@memberjunction/cli",
1013
- "pluginType": "core",
1014
- "strict": true,
1015
- "enableJsonFlag": false,
1016
- "isESM": false,
1017
- "relativePath": [
1018
- "dist",
1019
- "commands",
1020
- "dbdoc",
1021
- "generate-queries.js"
1022
- ]
1023
- },
1024
- "dbdoc": {
1025
- "aliases": [],
1026
- "args": {},
1027
- "description": "AI-powered database documentation generator",
1028
- "flags": {},
1029
- "hasDynamicHelp": false,
1030
- "hidden": false,
1031
- "hiddenAliases": [],
1032
- "id": "dbdoc",
958
+ "id": "sync:push",
1033
959
  "pluginAlias": "@memberjunction/cli",
1034
960
  "pluginName": "@memberjunction/cli",
1035
961
  "pluginType": "core",
@@ -1039,21 +965,52 @@
1039
965
  "relativePath": [
1040
966
  "dist",
1041
967
  "commands",
1042
- "dbdoc",
1043
- "index.js"
968
+ "sync",
969
+ "push.js"
1044
970
  ]
1045
971
  },
1046
- "dbdoc:init": {
972
+ "sync:status": {
1047
973
  "aliases": [],
1048
974
  "args": {},
1049
- "description": "Initialize DBAutoDoc project (delegates to db-auto-doc init)",
975
+ "description": "Show status of local files vs database",
1050
976
  "examples": [
1051
- "<%= config.bin %> <%= command.id %>"
977
+ "<%= config.bin %> <%= command.id %>",
978
+ "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
979
+ "<%= config.bin %> <%= command.id %> --verbose"
1052
980
  ],
1053
- "flags": {},
981
+ "flags": {
982
+ "dir": {
983
+ "description": "Specific entity directory to check status",
984
+ "name": "dir",
985
+ "hasDynamicHelp": false,
986
+ "multiple": false,
987
+ "type": "option"
988
+ },
989
+ "verbose": {
990
+ "char": "v",
991
+ "description": "Show detailed field-level differences",
992
+ "name": "verbose",
993
+ "allowNo": false,
994
+ "type": "boolean"
995
+ },
996
+ "include": {
997
+ "description": "Only process these directories (comma-separated, supports patterns)",
998
+ "name": "include",
999
+ "hasDynamicHelp": false,
1000
+ "multiple": false,
1001
+ "type": "option"
1002
+ },
1003
+ "exclude": {
1004
+ "description": "Skip these directories (comma-separated, supports patterns)",
1005
+ "name": "exclude",
1006
+ "hasDynamicHelp": false,
1007
+ "multiple": false,
1008
+ "type": "option"
1009
+ }
1010
+ },
1054
1011
  "hasDynamicHelp": false,
1055
1012
  "hiddenAliases": [],
1056
- "id": "dbdoc:init",
1013
+ "id": "sync:status",
1057
1014
  "pluginAlias": "@memberjunction/cli",
1058
1015
  "pluginName": "@memberjunction/cli",
1059
1016
  "pluginType": "core",
@@ -1063,30 +1020,52 @@
1063
1020
  "relativePath": [
1064
1021
  "dist",
1065
1022
  "commands",
1066
- "dbdoc",
1067
- "init.js"
1023
+ "sync",
1024
+ "status.js"
1068
1025
  ]
1069
1026
  },
1070
- "dbdoc:reset": {
1027
+ "sync:validate": {
1071
1028
  "aliases": [],
1072
1029
  "args": {},
1073
- "description": "Reset analysis state (delegates to db-auto-doc reset)",
1030
+ "description": "Validate metadata files",
1074
1031
  "examples": [
1075
1032
  "<%= config.bin %> <%= command.id %>",
1076
- "<%= config.bin %> <%= command.id %> --force"
1033
+ "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
1034
+ "<%= config.bin %> <%= command.id %> --save-report",
1035
+ "<%= config.bin %> <%= command.id %> --verbose"
1077
1036
  ],
1078
1037
  "flags": {
1079
- "force": {
1080
- "char": "f",
1081
- "description": "Force reset without confirmation",
1082
- "name": "force",
1038
+ "dir": {
1039
+ "description": "Specific entity directory to validate",
1040
+ "name": "dir",
1041
+ "hasDynamicHelp": false,
1042
+ "multiple": false,
1043
+ "type": "option"
1044
+ },
1045
+ "verbose": {
1046
+ "char": "v",
1047
+ "description": "Show detailed validation output",
1048
+ "name": "verbose",
1049
+ "allowNo": false,
1050
+ "type": "boolean"
1051
+ },
1052
+ "save-report": {
1053
+ "description": "Save validation report as markdown file",
1054
+ "name": "save-report",
1083
1055
  "allowNo": false,
1084
1056
  "type": "boolean"
1057
+ },
1058
+ "output": {
1059
+ "description": "Output file path for validation report (default: validation-report.md)",
1060
+ "name": "output",
1061
+ "hasDynamicHelp": false,
1062
+ "multiple": false,
1063
+ "type": "option"
1085
1064
  }
1086
1065
  },
1087
1066
  "hasDynamicHelp": false,
1088
1067
  "hiddenAliases": [],
1089
- "id": "dbdoc:reset",
1068
+ "id": "sync:validate",
1090
1069
  "pluginAlias": "@memberjunction/cli",
1091
1070
  "pluginName": "@memberjunction/cli",
1092
1071
  "pluginType": "core",
@@ -1096,31 +1075,52 @@
1096
1075
  "relativePath": [
1097
1076
  "dist",
1098
1077
  "commands",
1099
- "dbdoc",
1100
- "reset.js"
1078
+ "sync",
1079
+ "validate.js"
1101
1080
  ]
1102
1081
  },
1103
- "dbdoc:status": {
1082
+ "sync:watch": {
1104
1083
  "aliases": [],
1105
1084
  "args": {},
1106
- "description": "Show analysis status and progress (delegates to db-auto-doc status)",
1085
+ "description": "Watch for file changes and sync automatically",
1107
1086
  "examples": [
1108
1087
  "<%= config.bin %> <%= command.id %>",
1109
- "<%= config.bin %> <%= command.id %> --state-file ./custom-state.json"
1088
+ "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
1089
+ "<%= config.bin %> <%= command.id %> --debounce=1000",
1090
+ "<%= config.bin %> <%= command.id %> --no-validate"
1110
1091
  ],
1111
1092
  "flags": {
1112
- "state-file": {
1113
- "char": "s",
1114
- "description": "Path to state JSON file",
1115
- "name": "state-file",
1093
+ "dir": {
1094
+ "description": "Specific entity directory to watch",
1095
+ "name": "dir",
1096
+ "hasDynamicHelp": false,
1097
+ "multiple": false,
1098
+ "type": "option"
1099
+ },
1100
+ "debounce": {
1101
+ "description": "Debounce delay in milliseconds (default: 500)",
1102
+ "name": "debounce",
1116
1103
  "hasDynamicHelp": false,
1117
1104
  "multiple": false,
1118
1105
  "type": "option"
1106
+ },
1107
+ "no-validate": {
1108
+ "description": "Skip validation before sync",
1109
+ "name": "no-validate",
1110
+ "allowNo": false,
1111
+ "type": "boolean"
1112
+ },
1113
+ "verbose": {
1114
+ "char": "v",
1115
+ "description": "Show detailed output",
1116
+ "name": "verbose",
1117
+ "allowNo": false,
1118
+ "type": "boolean"
1119
1119
  }
1120
1120
  },
1121
1121
  "hasDynamicHelp": false,
1122
1122
  "hiddenAliases": [],
1123
- "id": "dbdoc:status",
1123
+ "id": "sync:watch",
1124
1124
  "pluginAlias": "@memberjunction/cli",
1125
1125
  "pluginName": "@memberjunction/cli",
1126
1126
  "pluginType": "core",
@@ -1130,8 +1130,8 @@
1130
1130
  "relativePath": [
1131
1131
  "dist",
1132
1132
  "commands",
1133
- "dbdoc",
1134
- "status.js"
1133
+ "sync",
1134
+ "watch.js"
1135
1135
  ]
1136
1136
  },
1137
1137
  "test:compare": {
@@ -2285,5 +2285,5 @@
2285
2285
  ]
2286
2286
  }
2287
2287
  },
2288
- "version": "2.122.0"
2288
+ "version": "2.122.1"
2289
2289
  }