@memberjunction/cli 3.0.0 → 3.1.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.
@@ -94,38 +94,6 @@
94
94
  "index.js"
95
95
  ]
96
96
  },
97
- "clean": {
98
- "aliases": [],
99
- "args": {},
100
- "description": "Resets the MemberJunction database to a pre-installation state",
101
- "examples": [
102
- "<%= config.bin %> <%= command.id %>\n"
103
- ],
104
- "flags": {
105
- "verbose": {
106
- "char": "v",
107
- "description": "Enable additional logging",
108
- "name": "verbose",
109
- "allowNo": false,
110
- "type": "boolean"
111
- }
112
- },
113
- "hasDynamicHelp": false,
114
- "hiddenAliases": [],
115
- "id": "clean",
116
- "pluginAlias": "@memberjunction/cli",
117
- "pluginName": "@memberjunction/cli",
118
- "pluginType": "core",
119
- "strict": true,
120
- "enableJsonFlag": false,
121
- "isESM": false,
122
- "relativePath": [
123
- "dist",
124
- "commands",
125
- "clean",
126
- "index.js"
127
- ]
128
- },
129
97
  "codegen": {
130
98
  "aliases": [],
131
99
  "args": {},
@@ -157,10 +125,10 @@
157
125
  "index.js"
158
126
  ]
159
127
  },
160
- "install": {
128
+ "clean": {
161
129
  "aliases": [],
162
130
  "args": {},
163
- "description": "Install MemberJunction",
131
+ "description": "Resets the MemberJunction database to a pre-installation state",
164
132
  "examples": [
165
133
  "<%= config.bin %> <%= command.id %>\n"
166
134
  ],
@@ -175,7 +143,7 @@
175
143
  },
176
144
  "hasDynamicHelp": false,
177
145
  "hiddenAliases": [],
178
- "id": "install",
146
+ "id": "clean",
179
147
  "pluginAlias": "@memberjunction/cli",
180
148
  "pluginName": "@memberjunction/cli",
181
149
  "pluginType": "core",
@@ -185,40 +153,42 @@
185
153
  "relativePath": [
186
154
  "dist",
187
155
  "commands",
188
- "install",
156
+ "clean",
189
157
  "index.js"
190
158
  ]
191
159
  },
192
- "querygen:export": {
160
+ "dbdoc:analyze": {
193
161
  "aliases": [],
194
162
  "args": {},
195
- "description": "Export queries from database to metadata files",
163
+ "description": "Analyze database and generate documentation (delegates to db-auto-doc analyze)",
196
164
  "examples": [
197
165
  "<%= config.bin %> <%= command.id %>",
198
- "<%= config.bin %> <%= command.id %> --output ./metadata/queries",
199
- "<%= config.bin %> <%= command.id %> --verbose"
166
+ "<%= config.bin %> <%= command.id %> --resume ./output/run-6/state.json",
167
+ "<%= config.bin %> <%= command.id %> --config ./my-config.json"
200
168
  ],
201
169
  "flags": {
202
- "output": {
203
- "char": "o",
204
- "description": "Output directory",
205
- "name": "output",
206
- "default": "./metadata/queries",
170
+ "resume": {
171
+ "char": "r",
172
+ "description": "Resume from an existing state file",
173
+ "name": "resume",
174
+ "required": false,
207
175
  "hasDynamicHelp": false,
208
176
  "multiple": false,
209
177
  "type": "option"
210
178
  },
211
- "verbose": {
212
- "char": "v",
213
- "description": "Verbose output",
214
- "name": "verbose",
215
- "allowNo": false,
216
- "type": "boolean"
179
+ "config": {
180
+ "char": "c",
181
+ "description": "Path to config file",
182
+ "name": "config",
183
+ "default": "./config.json",
184
+ "hasDynamicHelp": false,
185
+ "multiple": false,
186
+ "type": "option"
217
187
  }
218
188
  },
219
189
  "hasDynamicHelp": false,
220
190
  "hiddenAliases": [],
221
- "id": "querygen:export",
191
+ "id": "dbdoc:analyze",
222
192
  "pluginAlias": "@memberjunction/cli",
223
193
  "pluginName": "@memberjunction/cli",
224
194
  "pluginType": "core",
@@ -228,126 +198,105 @@
228
198
  "relativePath": [
229
199
  "dist",
230
200
  "commands",
231
- "querygen",
232
- "export.js"
201
+ "dbdoc",
202
+ "analyze.js"
233
203
  ]
234
204
  },
235
- "querygen:generate": {
205
+ "dbdoc:export-sample-queries": {
236
206
  "aliases": [],
237
207
  "args": {},
238
- "description": "Generate SQL query templates for entities using AI",
208
+ "description": "Export sample queries to MemberJunction metadata format (delegates to db-auto-doc export-sample-queries)",
239
209
  "examples": [
240
- "<%= config.bin %> <%= command.id %>",
241
- "<%= config.bin %> <%= command.id %> --entities \"Customers,Orders\"",
242
- "<%= config.bin %> <%= command.id %> --max-entities 5 --verbose",
243
- "<%= config.bin %> <%= command.id %> --mode database"
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"
244
214
  ],
245
215
  "flags": {
246
- "entities": {
247
- "char": "e",
248
- "description": "Specific entities to generate queries for (comma-separated)",
249
- "name": "entities",
250
- "hasDynamicHelp": false,
251
- "multiple": false,
252
- "type": "option"
253
- },
254
- "exclude-entities": {
255
- "char": "x",
256
- "description": "Entities to exclude (comma-separated)",
257
- "name": "exclude-entities",
258
- "hasDynamicHelp": false,
259
- "multiple": false,
260
- "type": "option"
261
- },
262
- "exclude-schemas": {
263
- "char": "s",
264
- "description": "Schemas to exclude (comma-separated)",
265
- "name": "exclude-schemas",
216
+ "input": {
217
+ "char": "i",
218
+ "description": "Path to sample-queries.json file generated by generate-queries command",
219
+ "name": "input",
220
+ "required": true,
266
221
  "hasDynamicHelp": false,
267
222
  "multiple": false,
268
223
  "type": "option"
269
224
  },
270
- "max-entities": {
271
- "char": "m",
272
- "description": "Max entities per group",
273
- "name": "max-entities",
274
- "default": 3,
225
+ "output": {
226
+ "char": "o",
227
+ "description": "Output path for the .queries.json metadata file",
228
+ "name": "output",
229
+ "required": true,
275
230
  "hasDynamicHelp": false,
276
231
  "multiple": false,
277
232
  "type": "option"
278
233
  },
279
- "target-groups": {
280
- "char": "t",
281
- "description": "Target number of entity groups to generate",
282
- "name": "target-groups",
283
- "default": 75,
284
- "hasDynamicHelp": false,
285
- "multiple": false,
286
- "type": "option"
234
+ "separate-sql-files": {
235
+ "description": "Write SQL to separate files and use @file: references",
236
+ "name": "separate-sql-files",
237
+ "allowNo": false,
238
+ "type": "boolean"
287
239
  },
288
- "max-refinements": {
289
- "char": "r",
290
- "description": "Max refinement iterations",
291
- "name": "max-refinements",
292
- "default": 3,
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",
293
244
  "hasDynamicHelp": false,
294
245
  "multiple": false,
295
246
  "type": "option"
296
247
  },
297
- "max-fixes": {
298
- "char": "f",
299
- "description": "Max error-fixing attempts",
300
- "name": "max-fixes",
301
- "default": 5,
248
+ "category": {
249
+ "description": "Category name for @lookup reference (e.g., \"Database Documentation\")",
250
+ "name": "category",
251
+ "required": false,
302
252
  "hasDynamicHelp": false,
303
253
  "multiple": false,
304
254
  "type": "option"
305
255
  },
306
- "model": {
307
- "description": "Preferred AI model",
308
- "name": "model",
256
+ "status": {
257
+ "description": "Status to assign to exported queries",
258
+ "name": "status",
259
+ "default": "Pending",
309
260
  "hasDynamicHelp": false,
310
261
  "multiple": false,
262
+ "options": [
263
+ "Approved",
264
+ "Pending",
265
+ "Rejected",
266
+ "Expired"
267
+ ],
311
268
  "type": "option"
312
269
  },
313
- "vendor": {
314
- "description": "Preferred AI vendor",
315
- "name": "vendor",
270
+ "min-confidence": {
271
+ "description": "Minimum confidence threshold to export (0-1)",
272
+ "name": "min-confidence",
273
+ "default": "0",
316
274
  "hasDynamicHelp": false,
317
275
  "multiple": false,
318
276
  "type": "option"
319
277
  },
320
- "output": {
321
- "char": "o",
322
- "description": "Output directory",
323
- "name": "output",
324
- "hasDynamicHelp": false,
325
- "multiple": false,
326
- "type": "option"
278
+ "validated-only": {
279
+ "description": "Only export queries that were successfully validated",
280
+ "name": "validated-only",
281
+ "allowNo": false,
282
+ "type": "boolean"
327
283
  },
328
- "mode": {
329
- "description": "Output mode: metadata|database|both",
330
- "name": "mode",
331
- "hasDynamicHelp": false,
332
- "multiple": false,
333
- "options": [
334
- "metadata",
335
- "database",
336
- "both"
337
- ],
338
- "type": "option"
284
+ "append": {
285
+ "description": "Append to existing metadata file instead of overwriting",
286
+ "name": "append",
287
+ "allowNo": false,
288
+ "type": "boolean"
339
289
  },
340
- "verbose": {
341
- "char": "v",
342
- "description": "Verbose output",
343
- "name": "verbose",
290
+ "include-primary-key": {
291
+ "description": "Include primaryKey and sync fields (for updating existing records)",
292
+ "name": "include-primary-key",
344
293
  "allowNo": false,
345
294
  "type": "boolean"
346
295
  }
347
296
  },
348
297
  "hasDynamicHelp": false,
349
298
  "hiddenAliases": [],
350
- "id": "querygen:generate",
299
+ "id": "dbdoc:export-sample-queries",
351
300
  "pluginAlias": "@memberjunction/cli",
352
301
  "pluginName": "@memberjunction/cli",
353
302
  "pluginType": "core",
@@ -357,40 +306,100 @@
357
306
  "relativePath": [
358
307
  "dist",
359
308
  "commands",
360
- "querygen",
361
- "generate.js"
309
+ "dbdoc",
310
+ "export-sample-queries.js"
362
311
  ]
363
312
  },
364
- "querygen:validate": {
313
+ "dbdoc:export": {
365
314
  "aliases": [],
366
315
  "args": {},
367
- "description": "Validate existing query templates",
316
+ "description": "Export documentation in multiple formats (delegates to db-auto-doc export)",
368
317
  "examples": [
369
- "<%= config.bin %> <%= command.id %>",
370
- "<%= config.bin %> <%= command.id %> --path ./metadata/queries",
371
- "<%= config.bin %> <%= command.id %> --verbose"
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"
372
325
  ],
373
326
  "flags": {
374
- "path": {
375
- "char": "p",
376
- "description": "Path to queries metadata file or directory",
377
- "name": "path",
378
- "default": "./metadata/queries",
327
+ "state-file": {
328
+ "char": "s",
329
+ "description": "Path to state JSON file",
330
+ "name": "state-file",
379
331
  "hasDynamicHelp": false,
380
332
  "multiple": false,
381
333
  "type": "option"
382
334
  },
383
- "verbose": {
384
- "char": "v",
385
- "description": "Verbose output",
386
- "name": "verbose",
335
+ "output-dir": {
336
+ "char": "o",
337
+ "description": "Output directory for generated files",
338
+ "name": "output-dir",
339
+ "hasDynamicHelp": false,
340
+ "multiple": false,
341
+ "type": "option"
342
+ },
343
+ "sql": {
344
+ "description": "Generate SQL script",
345
+ "name": "sql",
387
346
  "allowNo": false,
388
347
  "type": "boolean"
389
- }
348
+ },
349
+ "markdown": {
350
+ "description": "Generate Markdown documentation",
351
+ "name": "markdown",
352
+ "allowNo": false,
353
+ "type": "boolean"
354
+ },
355
+ "html": {
356
+ "description": "Generate interactive HTML documentation",
357
+ "name": "html",
358
+ "allowNo": false,
359
+ "type": "boolean"
360
+ },
361
+ "csv": {
362
+ "description": "Generate CSV exports (tables and columns)",
363
+ "name": "csv",
364
+ "allowNo": false,
365
+ "type": "boolean"
366
+ },
367
+ "mermaid": {
368
+ "description": "Generate Mermaid ERD diagram files",
369
+ "name": "mermaid",
370
+ "allowNo": false,
371
+ "type": "boolean"
372
+ },
373
+ "report": {
374
+ "description": "Generate analysis report",
375
+ "name": "report",
376
+ "allowNo": false,
377
+ "type": "boolean"
378
+ },
379
+ "apply": {
380
+ "description": "Apply SQL to database",
381
+ "name": "apply",
382
+ "allowNo": false,
383
+ "type": "boolean"
384
+ },
385
+ "approved-only": {
386
+ "description": "Only export approved items",
387
+ "name": "approved-only",
388
+ "allowNo": false,
389
+ "type": "boolean"
390
+ },
391
+ "confidence-threshold": {
392
+ "description": "Minimum confidence threshold",
393
+ "name": "confidence-threshold",
394
+ "default": "0",
395
+ "hasDynamicHelp": false,
396
+ "multiple": false,
397
+ "type": "option"
398
+ }
390
399
  },
391
400
  "hasDynamicHelp": false,
392
401
  "hiddenAliases": [],
393
- "id": "querygen:validate",
402
+ "id": "dbdoc:export",
394
403
  "pluginAlias": "@memberjunction/cli",
395
404
  "pluginName": "@memberjunction/cli",
396
405
  "pluginType": "core",
@@ -400,64 +409,65 @@
400
409
  "relativePath": [
401
410
  "dist",
402
411
  "commands",
403
- "querygen",
404
- "validate.js"
412
+ "dbdoc",
413
+ "export.js"
405
414
  ]
406
415
  },
407
- "sync:file-reset": {
416
+ "dbdoc:generate-queries": {
408
417
  "aliases": [],
409
418
  "args": {},
410
- "description": "Reset file metadata sections",
419
+ "description": "Generate sample SQL queries from existing analysis state (delegates to db-auto-doc generate-queries)",
411
420
  "examples": [
412
- "<%= config.bin %> <%= command.id %>",
413
- "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
414
- "<%= config.bin %> <%= command.id %> --sections=\"dependencies,references\"",
415
- "<%= config.bin %> <%= command.id %> --all"
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"
416
424
  ],
417
425
  "flags": {
418
- "dir": {
419
- "description": "Specific entity directory to reset",
420
- "name": "dir",
426
+ "from-state": {
427
+ "description": "Path to existing state.json file from previous analysis",
428
+ "name": "from-state",
429
+ "required": true,
421
430
  "hasDynamicHelp": false,
422
431
  "multiple": false,
423
432
  "type": "option"
424
433
  },
425
- "sections": {
426
- "description": "Comma-separated list of sections to reset (dependencies,references,related,lookup)",
427
- "name": "sections",
434
+ "output-dir": {
435
+ "description": "Output directory for generated queries",
436
+ "name": "output-dir",
437
+ "required": false,
428
438
  "hasDynamicHelp": false,
429
439
  "multiple": false,
430
440
  "type": "option"
431
441
  },
432
- "all": {
433
- "description": "Reset all metadata sections",
434
- "name": "all",
435
- "allowNo": false,
436
- "type": "boolean"
437
- },
438
- "dry-run": {
439
- "description": "Show what would be reset without actually resetting",
440
- "name": "dry-run",
441
- "allowNo": false,
442
- "type": "boolean"
442
+ "config": {
443
+ "char": "c",
444
+ "description": "Path to config file (for database connection and AI settings)",
445
+ "name": "config",
446
+ "default": "./config.json",
447
+ "hasDynamicHelp": false,
448
+ "multiple": false,
449
+ "type": "option"
443
450
  },
444
- "force": {
445
- "description": "Skip confirmation prompts",
446
- "name": "force",
447
- "allowNo": false,
448
- "type": "boolean"
451
+ "queries-per-table": {
452
+ "description": "Number of queries to generate per table",
453
+ "name": "queries-per-table",
454
+ "required": false,
455
+ "hasDynamicHelp": false,
456
+ "multiple": false,
457
+ "type": "option"
449
458
  },
450
- "verbose": {
451
- "char": "v",
452
- "description": "Show detailed output",
453
- "name": "verbose",
454
- "allowNo": false,
455
- "type": "boolean"
459
+ "max-execution-time": {
460
+ "description": "Maximum execution time for query validation (ms)",
461
+ "name": "max-execution-time",
462
+ "required": false,
463
+ "hasDynamicHelp": false,
464
+ "multiple": false,
465
+ "type": "option"
456
466
  }
457
467
  },
458
468
  "hasDynamicHelp": false,
459
469
  "hiddenAliases": [],
460
- "id": "sync:file-reset",
470
+ "id": "dbdoc:generate-queries",
461
471
  "pluginAlias": "@memberjunction/cli",
462
472
  "pluginName": "@memberjunction/cli",
463
473
  "pluginType": "core",
@@ -467,21 +477,43 @@
467
477
  "relativePath": [
468
478
  "dist",
469
479
  "commands",
470
- "sync",
471
- "file-reset.js"
480
+ "dbdoc",
481
+ "generate-queries.js"
472
482
  ]
473
483
  },
474
- "sync:init": {
484
+ "dbdoc": {
475
485
  "aliases": [],
476
486
  "args": {},
477
- "description": "Initialize a directory for metadata synchronization",
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)",
478
510
  "examples": [
479
511
  "<%= config.bin %> <%= command.id %>"
480
512
  ],
481
513
  "flags": {},
482
514
  "hasDynamicHelp": false,
483
515
  "hiddenAliases": [],
484
- "id": "sync:init",
516
+ "id": "dbdoc:init",
485
517
  "pluginAlias": "@memberjunction/cli",
486
518
  "pluginName": "@memberjunction/cli",
487
519
  "pluginType": "core",
@@ -491,119 +523,56 @@
491
523
  "relativePath": [
492
524
  "dist",
493
525
  "commands",
494
- "sync",
526
+ "dbdoc",
495
527
  "init.js"
496
528
  ]
497
529
  },
498
- "sync:pull": {
530
+ "dbdoc:reset": {
499
531
  "aliases": [],
500
532
  "args": {},
501
- "description": "Pull metadata from database to local files",
533
+ "description": "Reset analysis state (delegates to db-auto-doc reset)",
502
534
  "examples": [
503
- "<%= config.bin %> <%= command.id %> --entity=\"AI Prompts\"",
504
- "<%= config.bin %> <%= command.id %> --entity=\"AI Prompts\" --filter=\"CategoryID='customer-service-id'\"",
505
- "<%= config.bin %> <%= command.id %> --entity=\"AI Agents\" --merge-strategy=overwrite",
506
- "<%= config.bin %> <%= command.id %> --entity=\"Actions\" --target-dir=./custom-actions --no-validate",
507
- "<%= config.bin %> <%= command.id %> --entity=\"Templates\" --dry-run --verbose",
508
- "<%= config.bin %> <%= command.id %> --entity=\"AI Prompts\" --exclude-fields=InternalNotes,DebugInfo"
535
+ "<%= config.bin %> <%= command.id %>",
536
+ "<%= config.bin %> <%= command.id %> --force"
509
537
  ],
510
538
  "flags": {
511
- "entity": {
512
- "description": "Entity name to pull",
513
- "name": "entity",
514
- "required": true,
515
- "hasDynamicHelp": false,
516
- "multiple": false,
517
- "type": "option"
518
- },
519
- "filter": {
520
- "description": "Additional filter for pulling specific records",
521
- "name": "filter",
522
- "hasDynamicHelp": false,
523
- "multiple": false,
524
- "type": "option"
525
- },
526
- "dry-run": {
527
- "description": "Show what would be pulled without actually pulling",
528
- "name": "dry-run",
539
+ "force": {
540
+ "char": "f",
541
+ "description": "Force reset without confirmation",
542
+ "name": "force",
529
543
  "allowNo": false,
530
544
  "type": "boolean"
531
- },
532
- "multi-file": {
533
- "description": "Create a single file with multiple records (provide filename)",
534
- "name": "multi-file",
535
- "hasDynamicHelp": false,
536
- "multiple": false,
537
- "type": "option"
538
- },
539
- "verbose": {
540
- "char": "v",
541
- "description": "Show detailed output",
542
- "name": "verbose",
543
- "allowNo": false,
544
- "type": "boolean"
545
- },
546
- "no-validate": {
547
- "description": "Skip validation before pull",
548
- "name": "no-validate",
549
- "allowNo": false,
550
- "type": "boolean"
551
- },
552
- "update-existing": {
553
- "description": "Update existing records during pull",
554
- "name": "update-existing",
555
- "allowNo": false,
556
- "type": "boolean"
557
- },
558
- "create-new": {
559
- "description": "Create new files for records not found locally",
560
- "name": "create-new",
561
- "allowNo": false,
562
- "type": "boolean"
563
- },
564
- "backup-before-update": {
565
- "description": "Create backups before updating files",
566
- "name": "backup-before-update",
567
- "allowNo": false,
568
- "type": "boolean"
569
- },
570
- "merge-strategy": {
571
- "description": "Merge strategy for updates",
572
- "name": "merge-strategy",
573
- "default": "merge",
574
- "hasDynamicHelp": false,
575
- "multiple": false,
576
- "options": [
577
- "merge",
578
- "overwrite",
579
- "skip"
580
- ],
581
- "type": "option"
582
- },
583
- "backup-directory": {
584
- "description": "Custom backup directory (default: .backups)",
585
- "name": "backup-directory",
586
- "hasDynamicHelp": false,
587
- "multiple": false,
588
- "type": "option"
589
- },
590
- "preserve-fields": {
591
- "description": "Comma-separated list of fields to preserve during updates",
592
- "name": "preserve-fields",
593
- "hasDynamicHelp": false,
594
- "multiple": true,
595
- "type": "option"
596
- },
597
- "exclude-fields": {
598
- "description": "Comma-separated list of fields to exclude from pull",
599
- "name": "exclude-fields",
600
- "hasDynamicHelp": false,
601
- "multiple": true,
602
- "type": "option"
603
- },
604
- "target-dir": {
605
- "description": "Specific target directory (overrides auto-discovery)",
606
- "name": "target-dir",
545
+ }
546
+ },
547
+ "hasDynamicHelp": false,
548
+ "hiddenAliases": [],
549
+ "id": "dbdoc:reset",
550
+ "pluginAlias": "@memberjunction/cli",
551
+ "pluginName": "@memberjunction/cli",
552
+ "pluginType": "core",
553
+ "strict": true,
554
+ "enableJsonFlag": false,
555
+ "isESM": false,
556
+ "relativePath": [
557
+ "dist",
558
+ "commands",
559
+ "dbdoc",
560
+ "reset.js"
561
+ ]
562
+ },
563
+ "dbdoc:status": {
564
+ "aliases": [],
565
+ "args": {},
566
+ "description": "Show analysis status and progress (delegates to db-auto-doc status)",
567
+ "examples": [
568
+ "<%= config.bin %> <%= command.id %>",
569
+ "<%= config.bin %> <%= command.id %> --state-file ./custom-state.json"
570
+ ],
571
+ "flags": {
572
+ "state-file": {
573
+ "char": "s",
574
+ "description": "Path to state JSON file",
575
+ "name": "state-file",
607
576
  "hasDynamicHelp": false,
608
577
  "multiple": false,
609
578
  "type": "option"
@@ -611,7 +580,7 @@
611
580
  },
612
581
  "hasDynamicHelp": false,
613
582
  "hiddenAliases": [],
614
- "id": "sync:pull",
583
+ "id": "dbdoc:status",
615
584
  "pluginAlias": "@memberjunction/cli",
616
585
  "pluginName": "@memberjunction/cli",
617
586
  "pluginType": "core",
@@ -621,79 +590,29 @@
621
590
  "relativePath": [
622
591
  "dist",
623
592
  "commands",
624
- "sync",
625
- "pull.js"
593
+ "dbdoc",
594
+ "status.js"
626
595
  ]
627
596
  },
628
- "sync:push": {
597
+ "install": {
629
598
  "aliases": [],
630
599
  "args": {},
631
- "description": "Push local file changes to the database",
600
+ "description": "Install MemberJunction",
632
601
  "examples": [
633
- "<%= config.bin %> <%= command.id %>",
634
- "<%= config.bin %> <%= command.id %> --dry-run",
635
- "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
636
- "<%= config.bin %> <%= command.id %> --ci"
602
+ "<%= config.bin %> <%= command.id %>\n"
637
603
  ],
638
604
  "flags": {
639
- "dir": {
640
- "description": "Specific entity directory to push",
641
- "name": "dir",
642
- "hasDynamicHelp": false,
643
- "multiple": false,
644
- "type": "option"
645
- },
646
- "dry-run": {
647
- "description": "Show what would be pushed without actually pushing",
648
- "name": "dry-run",
649
- "allowNo": false,
650
- "type": "boolean"
651
- },
652
- "ci": {
653
- "description": "CI mode - no prompts, fail on issues",
654
- "name": "ci",
655
- "allowNo": false,
656
- "type": "boolean"
657
- },
658
605
  "verbose": {
659
606
  "char": "v",
660
- "description": "Show detailed field-level output",
607
+ "description": "Enable additional logging",
661
608
  "name": "verbose",
662
609
  "allowNo": false,
663
610
  "type": "boolean"
664
- },
665
- "no-validate": {
666
- "description": "Skip validation before push",
667
- "name": "no-validate",
668
- "allowNo": false,
669
- "type": "boolean"
670
- },
671
- "parallel-batch-size": {
672
- "description": "Number of records to process in parallel (default: 10)",
673
- "name": "parallel-batch-size",
674
- "default": 10,
675
- "hasDynamicHelp": false,
676
- "multiple": false,
677
- "type": "option"
678
- },
679
- "include": {
680
- "description": "Only process these directories (comma-separated, supports patterns)",
681
- "name": "include",
682
- "hasDynamicHelp": false,
683
- "multiple": false,
684
- "type": "option"
685
- },
686
- "exclude": {
687
- "description": "Skip these directories (comma-separated, supports patterns)",
688
- "name": "exclude",
689
- "hasDynamicHelp": false,
690
- "multiple": false,
691
- "type": "option"
692
611
  }
693
612
  },
694
613
  "hasDynamicHelp": false,
695
614
  "hiddenAliases": [],
696
- "id": "sync:push",
615
+ "id": "install",
697
616
  "pluginAlias": "@memberjunction/cli",
698
617
  "pluginName": "@memberjunction/cli",
699
618
  "pluginType": "core",
@@ -703,44 +622,29 @@
703
622
  "relativePath": [
704
623
  "dist",
705
624
  "commands",
706
- "sync",
707
- "push.js"
625
+ "install",
626
+ "index.js"
708
627
  ]
709
628
  },
710
- "sync:status": {
629
+ "migrate": {
711
630
  "aliases": [],
712
631
  "args": {},
713
- "description": "Show status of local files vs database",
632
+ "description": "Migrate MemberJunction database to latest version",
714
633
  "examples": [
715
- "<%= config.bin %> <%= command.id %>",
716
- "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
717
- "<%= config.bin %> <%= command.id %> --verbose"
634
+ "<%= config.bin %> <%= command.id %>\n"
718
635
  ],
719
636
  "flags": {
720
- "dir": {
721
- "description": "Specific entity directory to check status",
722
- "name": "dir",
723
- "hasDynamicHelp": false,
724
- "multiple": false,
725
- "type": "option"
726
- },
727
637
  "verbose": {
728
638
  "char": "v",
729
- "description": "Show detailed field-level differences",
639
+ "description": "Enable additional logging",
730
640
  "name": "verbose",
731
641
  "allowNo": false,
732
642
  "type": "boolean"
733
643
  },
734
- "include": {
735
- "description": "Only process these directories (comma-separated, supports patterns)",
736
- "name": "include",
737
- "hasDynamicHelp": false,
738
- "multiple": false,
739
- "type": "option"
740
- },
741
- "exclude": {
742
- "description": "Skip these directories (comma-separated, supports patterns)",
743
- "name": "exclude",
644
+ "tag": {
645
+ "char": "t",
646
+ "description": "Version tag to use for running remote migrations",
647
+ "name": "tag",
744
648
  "hasDynamicHelp": false,
745
649
  "multiple": false,
746
650
  "type": "option"
@@ -748,7 +652,7 @@
748
652
  },
749
653
  "hasDynamicHelp": false,
750
654
  "hiddenAliases": [],
751
- "id": "sync:status",
655
+ "id": "migrate",
752
656
  "pluginAlias": "@memberjunction/cli",
753
657
  "pluginName": "@memberjunction/cli",
754
658
  "pluginType": "core",
@@ -758,52 +662,40 @@
758
662
  "relativePath": [
759
663
  "dist",
760
664
  "commands",
761
- "sync",
762
- "status.js"
665
+ "migrate",
666
+ "index.js"
763
667
  ]
764
668
  },
765
- "sync:validate": {
669
+ "querygen:export": {
766
670
  "aliases": [],
767
671
  "args": {},
768
- "description": "Validate metadata files",
672
+ "description": "Export queries from database to metadata files",
769
673
  "examples": [
770
674
  "<%= config.bin %> <%= command.id %>",
771
- "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
772
- "<%= config.bin %> <%= command.id %> --save-report",
675
+ "<%= config.bin %> <%= command.id %> --output ./metadata/queries",
773
676
  "<%= config.bin %> <%= command.id %> --verbose"
774
677
  ],
775
678
  "flags": {
776
- "dir": {
777
- "description": "Specific entity directory to validate",
778
- "name": "dir",
679
+ "output": {
680
+ "char": "o",
681
+ "description": "Output directory",
682
+ "name": "output",
683
+ "default": "./metadata/queries",
779
684
  "hasDynamicHelp": false,
780
685
  "multiple": false,
781
686
  "type": "option"
782
687
  },
783
688
  "verbose": {
784
689
  "char": "v",
785
- "description": "Show detailed validation output",
690
+ "description": "Verbose output",
786
691
  "name": "verbose",
787
692
  "allowNo": false,
788
693
  "type": "boolean"
789
- },
790
- "save-report": {
791
- "description": "Save validation report as markdown file",
792
- "name": "save-report",
793
- "allowNo": false,
794
- "type": "boolean"
795
- },
796
- "output": {
797
- "description": "Output file path for validation report (default: validation-report.md)",
798
- "name": "output",
799
- "hasDynamicHelp": false,
800
- "multiple": false,
801
- "type": "option"
802
694
  }
803
695
  },
804
696
  "hasDynamicHelp": false,
805
697
  "hiddenAliases": [],
806
- "id": "sync:validate",
698
+ "id": "querygen:export",
807
699
  "pluginAlias": "@memberjunction/cli",
808
700
  "pluginName": "@memberjunction/cli",
809
701
  "pluginType": "core",
@@ -813,133 +705,118 @@
813
705
  "relativePath": [
814
706
  "dist",
815
707
  "commands",
816
- "sync",
817
- "validate.js"
708
+ "querygen",
709
+ "export.js"
818
710
  ]
819
711
  },
820
- "sync:watch": {
712
+ "querygen:generate": {
821
713
  "aliases": [],
822
714
  "args": {},
823
- "description": "Watch for file changes and sync automatically",
715
+ "description": "Generate SQL query templates for entities using AI",
824
716
  "examples": [
825
717
  "<%= config.bin %> <%= command.id %>",
826
- "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
827
- "<%= config.bin %> <%= command.id %> --debounce=1000",
828
- "<%= config.bin %> <%= command.id %> --no-validate"
718
+ "<%= config.bin %> <%= command.id %> --entities \"Customers,Orders\"",
719
+ "<%= config.bin %> <%= command.id %> --max-entities 5 --verbose",
720
+ "<%= config.bin %> <%= command.id %> --mode database"
829
721
  ],
830
722
  "flags": {
831
- "dir": {
832
- "description": "Specific entity directory to watch",
833
- "name": "dir",
723
+ "entities": {
724
+ "char": "e",
725
+ "description": "Specific entities to generate queries for (comma-separated)",
726
+ "name": "entities",
834
727
  "hasDynamicHelp": false,
835
728
  "multiple": false,
836
729
  "type": "option"
837
730
  },
838
- "debounce": {
839
- "description": "Debounce delay in milliseconds (default: 500)",
840
- "name": "debounce",
731
+ "exclude-entities": {
732
+ "char": "x",
733
+ "description": "Entities to exclude (comma-separated)",
734
+ "name": "exclude-entities",
841
735
  "hasDynamicHelp": false,
842
736
  "multiple": false,
843
737
  "type": "option"
844
738
  },
845
- "no-validate": {
846
- "description": "Skip validation before sync",
847
- "name": "no-validate",
848
- "allowNo": false,
849
- "type": "boolean"
739
+ "exclude-schemas": {
740
+ "char": "s",
741
+ "description": "Schemas to exclude (comma-separated)",
742
+ "name": "exclude-schemas",
743
+ "hasDynamicHelp": false,
744
+ "multiple": false,
745
+ "type": "option"
850
746
  },
851
- "verbose": {
852
- "char": "v",
853
- "description": "Show detailed output",
854
- "name": "verbose",
855
- "allowNo": false,
856
- "type": "boolean"
857
- }
858
- },
859
- "hasDynamicHelp": false,
860
- "hiddenAliases": [],
861
- "id": "sync:watch",
862
- "pluginAlias": "@memberjunction/cli",
863
- "pluginName": "@memberjunction/cli",
864
- "pluginType": "core",
865
- "strict": true,
866
- "enableJsonFlag": false,
867
- "isESM": false,
868
- "relativePath": [
869
- "dist",
870
- "commands",
871
- "sync",
872
- "watch.js"
873
- ]
874
- },
875
- "test:compare": {
876
- "aliases": [],
877
- "args": {
878
- "runId1": {
879
- "description": "First test run ID to compare",
880
- "name": "runId1",
881
- "required": false
882
- },
883
- "runId2": {
884
- "description": "Second test run ID to compare",
885
- "name": "runId2",
886
- "required": false
887
- }
888
- },
889
- "description": "Compare test runs for regression detection",
890
- "examples": [
891
- "<%= config.bin %> <%= command.id %> <run-id-1> <run-id-2>",
892
- "<%= config.bin %> <%= command.id %> --baseline=<run-id> --current=<run-id>",
893
- "<%= config.bin %> <%= command.id %> --suite=<suite-id> --since=\"2024-01-01\"",
894
- "<%= config.bin %> <%= command.id %> <run-id-1> <run-id-2> --format=json"
895
- ],
896
- "flags": {
897
- "version": {
898
- "char": "v",
899
- "description": "Compare runs by version",
900
- "name": "version",
747
+ "max-entities": {
748
+ "char": "m",
749
+ "description": "Max entities per group",
750
+ "name": "max-entities",
751
+ "default": 3,
901
752
  "hasDynamicHelp": false,
902
- "multiple": true,
753
+ "multiple": false,
903
754
  "type": "option"
904
755
  },
905
- "commit": {
906
- "char": "c",
907
- "description": "Compare runs by git commit",
908
- "name": "commit",
756
+ "target-groups": {
757
+ "char": "t",
758
+ "description": "Target number of entity groups to generate",
759
+ "name": "target-groups",
760
+ "default": 75,
909
761
  "hasDynamicHelp": false,
910
- "multiple": true,
762
+ "multiple": false,
911
763
  "type": "option"
912
764
  },
913
- "diff-only": {
914
- "description": "Show only differences",
915
- "name": "diff-only",
916
- "allowNo": false,
917
- "type": "boolean"
765
+ "max-refinements": {
766
+ "char": "r",
767
+ "description": "Max refinement iterations",
768
+ "name": "max-refinements",
769
+ "default": 3,
770
+ "hasDynamicHelp": false,
771
+ "multiple": false,
772
+ "type": "option"
918
773
  },
919
- "format": {
774
+ "max-fixes": {
920
775
  "char": "f",
921
- "description": "Output format",
922
- "name": "format",
923
- "default": "console",
776
+ "description": "Max error-fixing attempts",
777
+ "name": "max-fixes",
778
+ "default": 5,
779
+ "hasDynamicHelp": false,
780
+ "multiple": false,
781
+ "type": "option"
782
+ },
783
+ "model": {
784
+ "description": "Preferred AI model",
785
+ "name": "model",
786
+ "hasDynamicHelp": false,
787
+ "multiple": false,
788
+ "type": "option"
789
+ },
790
+ "vendor": {
791
+ "description": "Preferred AI vendor",
792
+ "name": "vendor",
924
793
  "hasDynamicHelp": false,
925
794
  "multiple": false,
926
- "options": [
927
- "console",
928
- "json",
929
- "markdown"
930
- ],
931
795
  "type": "option"
932
796
  },
933
797
  "output": {
934
798
  "char": "o",
935
- "description": "Output file path",
799
+ "description": "Output directory",
936
800
  "name": "output",
937
801
  "hasDynamicHelp": false,
938
802
  "multiple": false,
939
803
  "type": "option"
940
804
  },
805
+ "mode": {
806
+ "description": "Output mode: metadata|database|both",
807
+ "name": "mode",
808
+ "hasDynamicHelp": false,
809
+ "multiple": false,
810
+ "options": [
811
+ "metadata",
812
+ "database",
813
+ "both"
814
+ ],
815
+ "type": "option"
816
+ },
941
817
  "verbose": {
942
- "description": "Show detailed information",
818
+ "char": "v",
819
+ "description": "Verbose output",
943
820
  "name": "verbose",
944
821
  "allowNo": false,
945
822
  "type": "boolean"
@@ -947,7 +824,7 @@
947
824
  },
948
825
  "hasDynamicHelp": false,
949
826
  "hiddenAliases": [],
950
- "id": "test:compare",
827
+ "id": "querygen:generate",
951
828
  "pluginAlias": "@memberjunction/cli",
952
829
  "pluginName": "@memberjunction/cli",
953
830
  "pluginType": "core",
@@ -957,78 +834,99 @@
957
834
  "relativePath": [
958
835
  "dist",
959
836
  "commands",
960
- "test",
961
- "compare.js"
837
+ "querygen",
838
+ "generate.js"
962
839
  ]
963
840
  },
964
- "test:history": {
841
+ "querygen:validate": {
965
842
  "aliases": [],
966
843
  "args": {},
967
- "description": "View test execution history",
844
+ "description": "Validate existing query templates",
968
845
  "examples": [
969
846
  "<%= config.bin %> <%= command.id %>",
970
- "<%= config.bin %> <%= command.id %> --test=<test-id>",
971
- "<%= config.bin %> <%= command.id %> --suite=<suite-id>",
972
- "<%= config.bin %> <%= command.id %> --since=\"2024-01-01\"",
973
- "<%= config.bin %> <%= command.id %> --limit=50"
847
+ "<%= config.bin %> <%= command.id %> --path ./metadata/queries",
848
+ "<%= config.bin %> <%= command.id %> --verbose"
974
849
  ],
975
850
  "flags": {
976
- "test": {
977
- "char": "t",
978
- "description": "Filter by test ID",
979
- "name": "test",
851
+ "path": {
852
+ "char": "p",
853
+ "description": "Path to queries metadata file or directory",
854
+ "name": "path",
855
+ "default": "./metadata/queries",
980
856
  "hasDynamicHelp": false,
981
857
  "multiple": false,
982
858
  "type": "option"
983
859
  },
984
- "recent": {
985
- "char": "r",
986
- "description": "Number of recent runs to show",
987
- "name": "recent",
860
+ "verbose": {
861
+ "char": "v",
862
+ "description": "Verbose output",
863
+ "name": "verbose",
864
+ "allowNo": false,
865
+ "type": "boolean"
866
+ }
867
+ },
868
+ "hasDynamicHelp": false,
869
+ "hiddenAliases": [],
870
+ "id": "querygen:validate",
871
+ "pluginAlias": "@memberjunction/cli",
872
+ "pluginName": "@memberjunction/cli",
873
+ "pluginType": "core",
874
+ "strict": true,
875
+ "enableJsonFlag": false,
876
+ "isESM": false,
877
+ "relativePath": [
878
+ "dist",
879
+ "commands",
880
+ "querygen",
881
+ "validate.js"
882
+ ]
883
+ },
884
+ "sync:file-reset": {
885
+ "aliases": [],
886
+ "args": {},
887
+ "description": "Reset file metadata sections",
888
+ "examples": [
889
+ "<%= config.bin %> <%= command.id %>",
890
+ "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
891
+ "<%= config.bin %> <%= command.id %> --sections=\"dependencies,references\"",
892
+ "<%= config.bin %> <%= command.id %> --all"
893
+ ],
894
+ "flags": {
895
+ "dir": {
896
+ "description": "Specific entity directory to reset",
897
+ "name": "dir",
988
898
  "hasDynamicHelp": false,
989
899
  "multiple": false,
990
900
  "type": "option"
991
901
  },
992
- "from": {
993
- "description": "Show history from date (YYYY-MM-DD)",
994
- "name": "from",
902
+ "sections": {
903
+ "description": "Comma-separated list of sections to reset (dependencies,references,related,lookup)",
904
+ "name": "sections",
995
905
  "hasDynamicHelp": false,
996
906
  "multiple": false,
997
907
  "type": "option"
998
908
  },
999
- "status": {
1000
- "char": "s",
1001
- "description": "Filter by status",
1002
- "name": "status",
1003
- "hasDynamicHelp": false,
1004
- "multiple": false,
1005
- "type": "option"
909
+ "all": {
910
+ "description": "Reset all metadata sections",
911
+ "name": "all",
912
+ "allowNo": false,
913
+ "type": "boolean"
1006
914
  },
1007
- "format": {
1008
- "char": "f",
1009
- "description": "Output format",
1010
- "name": "format",
1011
- "default": "console",
1012
- "hasDynamicHelp": false,
1013
- "multiple": false,
1014
- "options": [
1015
- "console",
1016
- "json",
1017
- "markdown"
1018
- ],
1019
- "type": "option"
915
+ "dry-run": {
916
+ "description": "Show what would be reset without actually resetting",
917
+ "name": "dry-run",
918
+ "allowNo": false,
919
+ "type": "boolean"
1020
920
  },
1021
- "output": {
1022
- "char": "o",
1023
- "description": "Output file path",
1024
- "name": "output",
1025
- "hasDynamicHelp": false,
1026
- "multiple": false,
1027
- "type": "option"
921
+ "force": {
922
+ "description": "Skip confirmation prompts",
923
+ "name": "force",
924
+ "allowNo": false,
925
+ "type": "boolean"
1028
926
  },
1029
927
  "verbose": {
1030
928
  "char": "v",
1031
- "description": "Show detailed information",
929
+ "description": "Show detailed output",
1032
930
  "name": "verbose",
1033
931
  "allowNo": false,
1034
932
  "type": "boolean"
@@ -1036,7 +934,7 @@
1036
934
  },
1037
935
  "hasDynamicHelp": false,
1038
936
  "hiddenAliases": [],
1039
- "id": "test:history",
937
+ "id": "sync:file-reset",
1040
938
  "pluginAlias": "@memberjunction/cli",
1041
939
  "pluginName": "@memberjunction/cli",
1042
940
  "pluginType": "core",
@@ -1046,26 +944,21 @@
1046
944
  "relativePath": [
1047
945
  "dist",
1048
946
  "commands",
1049
- "test",
1050
- "history.js"
947
+ "sync",
948
+ "file-reset.js"
1051
949
  ]
1052
950
  },
1053
- "test": {
951
+ "sync:init": {
1054
952
  "aliases": [],
1055
953
  "args": {},
1056
- "description": "MemberJunction Testing Framework - Execute and manage tests",
954
+ "description": "Initialize a directory for metadata synchronization",
1057
955
  "examples": [
1058
- "<%= config.bin %> <%= command.id %> run <test-id>",
1059
- "<%= config.bin %> <%= command.id %> run --name=\"Active Members Count\"",
1060
- "<%= config.bin %> <%= command.id %> suite <suite-id>",
1061
- "<%= config.bin %> <%= command.id %> list",
1062
- "<%= config.bin %> <%= command.id %> list --suites",
1063
- "<%= config.bin %> <%= command.id %> validate --all"
956
+ "<%= config.bin %> <%= command.id %>"
1064
957
  ],
1065
958
  "flags": {},
1066
959
  "hasDynamicHelp": false,
1067
960
  "hiddenAliases": [],
1068
- "id": "test",
961
+ "id": "sync:init",
1069
962
  "pluginAlias": "@memberjunction/cli",
1070
963
  "pluginName": "@memberjunction/cli",
1071
964
  "pluginType": "core",
@@ -1075,91 +968,127 @@
1075
968
  "relativePath": [
1076
969
  "dist",
1077
970
  "commands",
1078
- "test",
1079
- "index.js"
971
+ "sync",
972
+ "init.js"
1080
973
  ]
1081
974
  },
1082
- "test:list": {
975
+ "sync:pull": {
1083
976
  "aliases": [],
1084
977
  "args": {},
1085
- "description": "List available tests, suites, and types",
978
+ "description": "Pull metadata from database to local files",
1086
979
  "examples": [
1087
- "<%= config.bin %> <%= command.id %>",
1088
- "<%= config.bin %> <%= command.id %> --suites",
1089
- "<%= config.bin %> <%= command.id %> --types",
1090
- "<%= config.bin %> <%= command.id %> --type=agent-eval",
1091
- "<%= config.bin %> <%= command.id %> --tag=smoke",
1092
- "<%= config.bin %> <%= command.id %> --status=active --verbose"
980
+ "<%= config.bin %> <%= command.id %> --entity=\"AI Prompts\"",
981
+ "<%= config.bin %> <%= command.id %> --entity=\"AI Prompts\" --filter=\"CategoryID='customer-service-id'\"",
982
+ "<%= config.bin %> <%= command.id %> --entity=\"AI Agents\" --merge-strategy=overwrite",
983
+ "<%= config.bin %> <%= command.id %> --entity=\"Actions\" --target-dir=./custom-actions --no-validate",
984
+ "<%= config.bin %> <%= command.id %> --entity=\"Templates\" --dry-run --verbose",
985
+ "<%= config.bin %> <%= command.id %> --entity=\"AI Prompts\" --exclude-fields=InternalNotes,DebugInfo"
1093
986
  ],
1094
987
  "flags": {
1095
- "suites": {
1096
- "description": "List test suites instead of tests",
1097
- "name": "suites",
1098
- "allowNo": false,
1099
- "type": "boolean"
1100
- },
1101
- "types": {
1102
- "description": "List test types",
1103
- "name": "types",
1104
- "allowNo": false,
1105
- "type": "boolean"
1106
- },
1107
- "type": {
1108
- "char": "t",
1109
- "description": "Filter by test type",
1110
- "name": "type",
988
+ "entity": {
989
+ "description": "Entity name to pull",
990
+ "name": "entity",
991
+ "required": true,
1111
992
  "hasDynamicHelp": false,
1112
993
  "multiple": false,
1113
994
  "type": "option"
1114
995
  },
1115
- "tag": {
1116
- "description": "Filter by tag",
1117
- "name": "tag",
996
+ "filter": {
997
+ "description": "Additional filter for pulling specific records",
998
+ "name": "filter",
1118
999
  "hasDynamicHelp": false,
1119
1000
  "multiple": false,
1120
1001
  "type": "option"
1121
1002
  },
1122
- "status": {
1123
- "char": "s",
1124
- "description": "Filter by status",
1125
- "name": "status",
1003
+ "dry-run": {
1004
+ "description": "Show what would be pulled without actually pulling",
1005
+ "name": "dry-run",
1006
+ "allowNo": false,
1007
+ "type": "boolean"
1008
+ },
1009
+ "multi-file": {
1010
+ "description": "Create a single file with multiple records (provide filename)",
1011
+ "name": "multi-file",
1126
1012
  "hasDynamicHelp": false,
1127
1013
  "multiple": false,
1128
1014
  "type": "option"
1129
1015
  },
1130
- "format": {
1131
- "char": "f",
1132
- "description": "Output format",
1133
- "name": "format",
1134
- "default": "console",
1016
+ "verbose": {
1017
+ "char": "v",
1018
+ "description": "Show detailed output",
1019
+ "name": "verbose",
1020
+ "allowNo": false,
1021
+ "type": "boolean"
1022
+ },
1023
+ "no-validate": {
1024
+ "description": "Skip validation before pull",
1025
+ "name": "no-validate",
1026
+ "allowNo": false,
1027
+ "type": "boolean"
1028
+ },
1029
+ "update-existing": {
1030
+ "description": "Update existing records during pull",
1031
+ "name": "update-existing",
1032
+ "allowNo": false,
1033
+ "type": "boolean"
1034
+ },
1035
+ "create-new": {
1036
+ "description": "Create new files for records not found locally",
1037
+ "name": "create-new",
1038
+ "allowNo": false,
1039
+ "type": "boolean"
1040
+ },
1041
+ "backup-before-update": {
1042
+ "description": "Create backups before updating files",
1043
+ "name": "backup-before-update",
1044
+ "allowNo": false,
1045
+ "type": "boolean"
1046
+ },
1047
+ "merge-strategy": {
1048
+ "description": "Merge strategy for updates",
1049
+ "name": "merge-strategy",
1050
+ "default": "merge",
1135
1051
  "hasDynamicHelp": false,
1136
1052
  "multiple": false,
1137
1053
  "options": [
1138
- "console",
1139
- "json",
1140
- "markdown"
1054
+ "merge",
1055
+ "overwrite",
1056
+ "skip"
1141
1057
  ],
1142
1058
  "type": "option"
1143
1059
  },
1144
- "output": {
1145
- "char": "o",
1146
- "description": "Output file path",
1147
- "name": "output",
1060
+ "backup-directory": {
1061
+ "description": "Custom backup directory (default: .backups)",
1062
+ "name": "backup-directory",
1148
1063
  "hasDynamicHelp": false,
1149
1064
  "multiple": false,
1150
1065
  "type": "option"
1151
1066
  },
1152
- "verbose": {
1153
- "char": "v",
1154
- "description": "Show detailed information",
1155
- "name": "verbose",
1156
- "allowNo": false,
1157
- "type": "boolean"
1067
+ "preserve-fields": {
1068
+ "description": "Comma-separated list of fields to preserve during updates",
1069
+ "name": "preserve-fields",
1070
+ "hasDynamicHelp": false,
1071
+ "multiple": true,
1072
+ "type": "option"
1073
+ },
1074
+ "exclude-fields": {
1075
+ "description": "Comma-separated list of fields to exclude from pull",
1076
+ "name": "exclude-fields",
1077
+ "hasDynamicHelp": false,
1078
+ "multiple": true,
1079
+ "type": "option"
1080
+ },
1081
+ "target-dir": {
1082
+ "description": "Specific target directory (overrides auto-discovery)",
1083
+ "name": "target-dir",
1084
+ "hasDynamicHelp": false,
1085
+ "multiple": false,
1086
+ "type": "option"
1158
1087
  }
1159
1088
  },
1160
1089
  "hasDynamicHelp": false,
1161
1090
  "hiddenAliases": [],
1162
- "id": "test:list",
1091
+ "id": "sync:pull",
1163
1092
  "pluginAlias": "@memberjunction/cli",
1164
1093
  "pluginName": "@memberjunction/cli",
1165
1094
  "pluginType": "core",
@@ -1169,83 +1098,79 @@
1169
1098
  "relativePath": [
1170
1099
  "dist",
1171
1100
  "commands",
1172
- "test",
1173
- "list.js"
1101
+ "sync",
1102
+ "pull.js"
1174
1103
  ]
1175
1104
  },
1176
- "test:run": {
1105
+ "sync:push": {
1177
1106
  "aliases": [],
1178
- "args": {
1179
- "testId": {
1180
- "description": "Test ID to execute",
1181
- "name": "testId",
1182
- "required": false
1183
- }
1184
- },
1185
- "description": "Execute a single test by ID or name",
1107
+ "args": {},
1108
+ "description": "Push local file changes to the database",
1186
1109
  "examples": [
1187
- "<%= config.bin %> <%= command.id %> <test-id>",
1188
- "<%= config.bin %> <%= command.id %> --name=\"Active Members Count\"",
1189
- "<%= config.bin %> <%= command.id %> <test-id> --environment=staging",
1190
- "<%= config.bin %> <%= command.id %> <test-id> --format=json --output=results.json",
1191
- "<%= config.bin %> <%= command.id %> <test-id> --dry-run"
1110
+ "<%= config.bin %> <%= command.id %>",
1111
+ "<%= config.bin %> <%= command.id %> --dry-run",
1112
+ "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
1113
+ "<%= config.bin %> <%= command.id %> --ci"
1192
1114
  ],
1193
1115
  "flags": {
1194
- "name": {
1195
- "char": "n",
1196
- "description": "Test name to execute",
1197
- "name": "name",
1116
+ "dir": {
1117
+ "description": "Specific entity directory to push",
1118
+ "name": "dir",
1198
1119
  "hasDynamicHelp": false,
1199
1120
  "multiple": false,
1200
1121
  "type": "option"
1201
1122
  },
1202
- "environment": {
1203
- "char": "e",
1204
- "description": "Environment context (dev, staging, prod)",
1205
- "name": "environment",
1123
+ "dry-run": {
1124
+ "description": "Show what would be pushed without actually pushing",
1125
+ "name": "dry-run",
1126
+ "allowNo": false,
1127
+ "type": "boolean"
1128
+ },
1129
+ "ci": {
1130
+ "description": "CI mode - no prompts, fail on issues",
1131
+ "name": "ci",
1132
+ "allowNo": false,
1133
+ "type": "boolean"
1134
+ },
1135
+ "verbose": {
1136
+ "char": "v",
1137
+ "description": "Show detailed field-level output",
1138
+ "name": "verbose",
1139
+ "allowNo": false,
1140
+ "type": "boolean"
1141
+ },
1142
+ "no-validate": {
1143
+ "description": "Skip validation before push",
1144
+ "name": "no-validate",
1145
+ "allowNo": false,
1146
+ "type": "boolean"
1147
+ },
1148
+ "parallel-batch-size": {
1149
+ "description": "Number of records to process in parallel (default: 10)",
1150
+ "name": "parallel-batch-size",
1151
+ "default": 10,
1206
1152
  "hasDynamicHelp": false,
1207
1153
  "multiple": false,
1208
1154
  "type": "option"
1209
1155
  },
1210
- "format": {
1211
- "char": "f",
1212
- "description": "Output format",
1213
- "name": "format",
1214
- "default": "console",
1156
+ "include": {
1157
+ "description": "Only process these directories (comma-separated, supports patterns)",
1158
+ "name": "include",
1215
1159
  "hasDynamicHelp": false,
1216
1160
  "multiple": false,
1217
- "options": [
1218
- "console",
1219
- "json",
1220
- "markdown"
1221
- ],
1222
1161
  "type": "option"
1223
1162
  },
1224
- "output": {
1225
- "char": "o",
1226
- "description": "Output file path",
1227
- "name": "output",
1163
+ "exclude": {
1164
+ "description": "Skip these directories (comma-separated, supports patterns)",
1165
+ "name": "exclude",
1228
1166
  "hasDynamicHelp": false,
1229
1167
  "multiple": false,
1230
1168
  "type": "option"
1231
- },
1232
- "dry-run": {
1233
- "description": "Validate without executing",
1234
- "name": "dry-run",
1235
- "allowNo": false,
1236
- "type": "boolean"
1237
- },
1238
- "verbose": {
1239
- "char": "v",
1240
- "description": "Show detailed execution information",
1241
- "name": "verbose",
1242
- "allowNo": false,
1243
- "type": "boolean"
1244
1169
  }
1245
1170
  },
1246
1171
  "hasDynamicHelp": false,
1247
1172
  "hiddenAliases": [],
1248
- "id": "test:run",
1173
+ "id": "sync:push",
1249
1174
  "pluginAlias": "@memberjunction/cli",
1250
1175
  "pluginName": "@memberjunction/cli",
1251
1176
  "pluginType": "core",
@@ -1255,68 +1180,52 @@
1255
1180
  "relativePath": [
1256
1181
  "dist",
1257
1182
  "commands",
1258
- "test",
1259
- "run.js"
1183
+ "sync",
1184
+ "push.js"
1260
1185
  ]
1261
1186
  },
1262
- "test:suite": {
1187
+ "sync:status": {
1263
1188
  "aliases": [],
1264
- "args": {
1265
- "suiteId": {
1266
- "description": "Test suite ID to execute",
1267
- "name": "suiteId",
1268
- "required": false
1269
- }
1270
- },
1271
- "description": "Execute a test suite",
1189
+ "args": {},
1190
+ "description": "Show status of local files vs database",
1272
1191
  "examples": [
1273
- "<%= config.bin %> <%= command.id %> <suite-id>",
1274
- "<%= config.bin %> <%= command.id %> --name=\"Agent Quality Suite\"",
1275
- "<%= config.bin %> <%= command.id %> <suite-id> --format=json",
1276
- "<%= config.bin %> <%= command.id %> <suite-id> --output=suite-results.json"
1192
+ "<%= config.bin %> <%= command.id %>",
1193
+ "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
1194
+ "<%= config.bin %> <%= command.id %> --verbose"
1277
1195
  ],
1278
1196
  "flags": {
1279
- "name": {
1280
- "char": "n",
1281
- "description": "Test suite name to execute",
1282
- "name": "name",
1283
- "hasDynamicHelp": false,
1284
- "multiple": false,
1285
- "type": "option"
1286
- },
1287
- "format": {
1288
- "char": "f",
1289
- "description": "Output format",
1290
- "name": "format",
1291
- "default": "console",
1292
- "hasDynamicHelp": false,
1293
- "multiple": false,
1294
- "options": [
1295
- "console",
1296
- "json",
1297
- "markdown"
1298
- ],
1299
- "type": "option"
1300
- },
1301
- "output": {
1302
- "char": "o",
1303
- "description": "Output file path",
1304
- "name": "output",
1197
+ "dir": {
1198
+ "description": "Specific entity directory to check status",
1199
+ "name": "dir",
1305
1200
  "hasDynamicHelp": false,
1306
1201
  "multiple": false,
1307
1202
  "type": "option"
1308
1203
  },
1309
1204
  "verbose": {
1310
1205
  "char": "v",
1311
- "description": "Show detailed execution information",
1206
+ "description": "Show detailed field-level differences",
1312
1207
  "name": "verbose",
1313
1208
  "allowNo": false,
1314
1209
  "type": "boolean"
1210
+ },
1211
+ "include": {
1212
+ "description": "Only process these directories (comma-separated, supports patterns)",
1213
+ "name": "include",
1214
+ "hasDynamicHelp": false,
1215
+ "multiple": false,
1216
+ "type": "option"
1217
+ },
1218
+ "exclude": {
1219
+ "description": "Skip these directories (comma-separated, supports patterns)",
1220
+ "name": "exclude",
1221
+ "hasDynamicHelp": false,
1222
+ "multiple": false,
1223
+ "type": "option"
1315
1224
  }
1316
1225
  },
1317
1226
  "hasDynamicHelp": false,
1318
1227
  "hiddenAliases": [],
1319
- "id": "test:suite",
1228
+ "id": "sync:status",
1320
1229
  "pluginAlias": "@memberjunction/cli",
1321
1230
  "pluginName": "@memberjunction/cli",
1322
1231
  "pluginType": "core",
@@ -1326,82 +1235,52 @@
1326
1235
  "relativePath": [
1327
1236
  "dist",
1328
1237
  "commands",
1329
- "test",
1330
- "suite.js"
1238
+ "sync",
1239
+ "status.js"
1331
1240
  ]
1332
1241
  },
1333
- "test:validate": {
1242
+ "sync:validate": {
1334
1243
  "aliases": [],
1335
- "args": {
1336
- "testId": {
1337
- "description": "Test ID to validate",
1338
- "name": "testId",
1339
- "required": false
1340
- }
1341
- },
1342
- "description": "Validate test definitions without executing",
1244
+ "args": {},
1245
+ "description": "Validate metadata files",
1343
1246
  "examples": [
1344
- "<%= config.bin %> <%= command.id %> <test-id>",
1345
- "<%= config.bin %> <%= command.id %> --all",
1346
- "<%= config.bin %> <%= command.id %> --type=agent-eval",
1347
- "<%= config.bin %> <%= command.id %> --all --save-report",
1348
- "<%= config.bin %> <%= command.id %> --all --output=validation-report.md"
1247
+ "<%= config.bin %> <%= command.id %>",
1248
+ "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
1249
+ "<%= config.bin %> <%= command.id %> --save-report",
1250
+ "<%= config.bin %> <%= command.id %> --verbose"
1349
1251
  ],
1350
1252
  "flags": {
1351
- "all": {
1352
- "char": "a",
1353
- "description": "Validate all tests",
1354
- "name": "all",
1355
- "allowNo": false,
1356
- "type": "boolean"
1357
- },
1358
- "type": {
1359
- "char": "t",
1360
- "description": "Validate tests by type",
1361
- "name": "type",
1253
+ "dir": {
1254
+ "description": "Specific entity directory to validate",
1255
+ "name": "dir",
1362
1256
  "hasDynamicHelp": false,
1363
1257
  "multiple": false,
1364
1258
  "type": "option"
1365
1259
  },
1260
+ "verbose": {
1261
+ "char": "v",
1262
+ "description": "Show detailed validation output",
1263
+ "name": "verbose",
1264
+ "allowNo": false,
1265
+ "type": "boolean"
1266
+ },
1366
1267
  "save-report": {
1367
- "description": "Save validation report to file",
1268
+ "description": "Save validation report as markdown file",
1368
1269
  "name": "save-report",
1369
1270
  "allowNo": false,
1370
1271
  "type": "boolean"
1371
1272
  },
1372
- "format": {
1373
- "char": "f",
1374
- "description": "Output format",
1375
- "name": "format",
1376
- "default": "console",
1377
- "hasDynamicHelp": false,
1378
- "multiple": false,
1379
- "options": [
1380
- "console",
1381
- "json",
1382
- "markdown"
1383
- ],
1384
- "type": "option"
1385
- },
1386
1273
  "output": {
1387
- "char": "o",
1388
- "description": "Output file path",
1274
+ "description": "Output file path for validation report (default: validation-report.md)",
1389
1275
  "name": "output",
1390
1276
  "hasDynamicHelp": false,
1391
1277
  "multiple": false,
1392
1278
  "type": "option"
1393
- },
1394
- "verbose": {
1395
- "char": "v",
1396
- "description": "Show detailed information",
1397
- "name": "verbose",
1398
- "allowNo": false,
1399
- "type": "boolean"
1400
1279
  }
1401
1280
  },
1402
1281
  "hasDynamicHelp": false,
1403
1282
  "hiddenAliases": [],
1404
- "id": "test:validate",
1283
+ "id": "sync:validate",
1405
1284
  "pluginAlias": "@memberjunction/cli",
1406
1285
  "pluginName": "@memberjunction/cli",
1407
1286
  "pluginType": "core",
@@ -1411,38 +1290,52 @@
1411
1290
  "relativePath": [
1412
1291
  "dist",
1413
1292
  "commands",
1414
- "test",
1293
+ "sync",
1415
1294
  "validate.js"
1416
1295
  ]
1417
1296
  },
1418
- "ai:actions:list": {
1297
+ "sync:watch": {
1419
1298
  "aliases": [],
1420
1299
  "args": {},
1421
- "description": "List available AI actions",
1300
+ "description": "Watch for file changes and sync automatically",
1422
1301
  "examples": [
1423
1302
  "<%= config.bin %> <%= command.id %>",
1424
- "<%= config.bin %> <%= command.id %> --output=table",
1425
- "<%= config.bin %> <%= command.id %> --output=json"
1303
+ "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
1304
+ "<%= config.bin %> <%= command.id %> --debounce=1000",
1305
+ "<%= config.bin %> <%= command.id %> --no-validate"
1426
1306
  ],
1427
1307
  "flags": {
1428
- "output": {
1429
- "char": "o",
1430
- "description": "Output format",
1431
- "name": "output",
1432
- "default": "compact",
1308
+ "dir": {
1309
+ "description": "Specific entity directory to watch",
1310
+ "name": "dir",
1311
+ "hasDynamicHelp": false,
1312
+ "multiple": false,
1313
+ "type": "option"
1314
+ },
1315
+ "debounce": {
1316
+ "description": "Debounce delay in milliseconds (default: 500)",
1317
+ "name": "debounce",
1433
1318
  "hasDynamicHelp": false,
1434
1319
  "multiple": false,
1435
- "options": [
1436
- "compact",
1437
- "json",
1438
- "table"
1439
- ],
1440
1320
  "type": "option"
1321
+ },
1322
+ "no-validate": {
1323
+ "description": "Skip validation before sync",
1324
+ "name": "no-validate",
1325
+ "allowNo": false,
1326
+ "type": "boolean"
1327
+ },
1328
+ "verbose": {
1329
+ "char": "v",
1330
+ "description": "Show detailed output",
1331
+ "name": "verbose",
1332
+ "allowNo": false,
1333
+ "type": "boolean"
1441
1334
  }
1442
1335
  },
1443
1336
  "hasDynamicHelp": false,
1444
1337
  "hiddenAliases": [],
1445
- "id": "ai:actions:list",
1338
+ "id": "sync:watch",
1446
1339
  "pluginAlias": "@memberjunction/cli",
1447
1340
  "pluginName": "@memberjunction/cli",
1448
1341
  "pluginType": "core",
@@ -1452,78 +1345,86 @@
1452
1345
  "relativePath": [
1453
1346
  "dist",
1454
1347
  "commands",
1455
- "ai",
1456
- "actions",
1457
- "list.js"
1348
+ "sync",
1349
+ "watch.js"
1458
1350
  ]
1459
1351
  },
1460
- "ai:actions:run": {
1352
+ "test:compare": {
1461
1353
  "aliases": [],
1462
- "args": {},
1463
- "description": "Execute an AI action with parameters",
1354
+ "args": {
1355
+ "runId1": {
1356
+ "description": "First test run ID to compare",
1357
+ "name": "runId1",
1358
+ "required": false
1359
+ },
1360
+ "runId2": {
1361
+ "description": "Second test run ID to compare",
1362
+ "name": "runId2",
1363
+ "required": false
1364
+ }
1365
+ },
1366
+ "description": "Compare test runs for regression detection",
1464
1367
  "examples": [
1465
- "<%= config.bin %> <%= command.id %> -n \"Get Weather\" --param \"Location=Boston\"",
1466
- "<%= config.bin %> <%= command.id %> -n \"Get Stock Price\" --param \"Ticker=AAPL\"",
1467
- "<%= config.bin %> <%= command.id %> -n \"Send Single Message\" --param \"To=user@example.com\" --param \"Subject=Test\" --param \"Body=Hello\" --param \"MessageType=Email\" --param \"Provider=SendGrid\"",
1468
- "<%= config.bin %> <%= command.id %> -n \"Calculate Expression\" --param \"Expression=2+2*3\" --dry-run"
1368
+ "<%= config.bin %> <%= command.id %> <run-id-1> <run-id-2>",
1369
+ "<%= config.bin %> <%= command.id %> --baseline=<run-id> --current=<run-id>",
1370
+ "<%= config.bin %> <%= command.id %> --suite=<suite-id> --since=\"2024-01-01\"",
1371
+ "<%= config.bin %> <%= command.id %> <run-id-1> <run-id-2> --format=json"
1469
1372
  ],
1470
1373
  "flags": {
1471
- "name": {
1472
- "char": "n",
1473
- "description": "Action name",
1474
- "name": "name",
1475
- "required": true,
1374
+ "version": {
1375
+ "char": "v",
1376
+ "description": "Compare runs by version",
1377
+ "name": "version",
1476
1378
  "hasDynamicHelp": false,
1477
- "multiple": false,
1379
+ "multiple": true,
1478
1380
  "type": "option"
1479
1381
  },
1480
- "param": {
1481
- "char": "p",
1482
- "description": "Action parameters in key=value format",
1483
- "name": "param",
1382
+ "commit": {
1383
+ "char": "c",
1384
+ "description": "Compare runs by git commit",
1385
+ "name": "commit",
1484
1386
  "hasDynamicHelp": false,
1485
1387
  "multiple": true,
1486
1388
  "type": "option"
1487
1389
  },
1488
- "dry-run": {
1489
- "description": "Validate without executing",
1490
- "name": "dry-run",
1390
+ "diff-only": {
1391
+ "description": "Show only differences",
1392
+ "name": "diff-only",
1491
1393
  "allowNo": false,
1492
1394
  "type": "boolean"
1493
1395
  },
1494
- "output": {
1495
- "char": "o",
1396
+ "format": {
1397
+ "char": "f",
1496
1398
  "description": "Output format",
1497
- "name": "output",
1498
- "default": "compact",
1399
+ "name": "format",
1400
+ "default": "console",
1499
1401
  "hasDynamicHelp": false,
1500
1402
  "multiple": false,
1501
1403
  "options": [
1502
- "compact",
1404
+ "console",
1503
1405
  "json",
1504
- "table"
1406
+ "markdown"
1505
1407
  ],
1506
1408
  "type": "option"
1507
1409
  },
1410
+ "output": {
1411
+ "char": "o",
1412
+ "description": "Output file path",
1413
+ "name": "output",
1414
+ "hasDynamicHelp": false,
1415
+ "multiple": false,
1416
+ "type": "option"
1417
+ },
1508
1418
  "verbose": {
1509
- "char": "v",
1510
- "description": "Show detailed execution information",
1419
+ "description": "Show detailed information",
1511
1420
  "name": "verbose",
1512
1421
  "allowNo": false,
1513
1422
  "type": "boolean"
1514
- },
1515
- "timeout": {
1516
- "description": "Execution timeout in milliseconds",
1517
- "name": "timeout",
1518
- "default": 300000,
1519
- "hasDynamicHelp": false,
1520
- "multiple": false,
1521
- "type": "option"
1522
1423
  }
1523
1424
  },
1524
1425
  "hasDynamicHelp": false,
1525
1426
  "hiddenAliases": [],
1526
- "id": "ai:actions:run",
1427
+ "id": "test:compare",
1527
1428
  "pluginAlias": "@memberjunction/cli",
1528
1429
  "pluginName": "@memberjunction/cli",
1529
1430
  "pluginType": "core",
@@ -1533,38 +1434,86 @@
1533
1434
  "relativePath": [
1534
1435
  "dist",
1535
1436
  "commands",
1536
- "ai",
1537
- "actions",
1538
- "run.js"
1437
+ "test",
1438
+ "compare.js"
1539
1439
  ]
1540
1440
  },
1541
- "migrate": {
1441
+ "test:history": {
1542
1442
  "aliases": [],
1543
1443
  "args": {},
1544
- "description": "Migrate MemberJunction database to latest version",
1444
+ "description": "View test execution history",
1545
1445
  "examples": [
1546
- "<%= config.bin %> <%= command.id %>\n"
1446
+ "<%= config.bin %> <%= command.id %>",
1447
+ "<%= config.bin %> <%= command.id %> --test=<test-id>",
1448
+ "<%= config.bin %> <%= command.id %> --suite=<suite-id>",
1449
+ "<%= config.bin %> <%= command.id %> --since=\"2024-01-01\"",
1450
+ "<%= config.bin %> <%= command.id %> --limit=50"
1547
1451
  ],
1548
1452
  "flags": {
1549
- "verbose": {
1550
- "char": "v",
1551
- "description": "Enable additional logging",
1552
- "name": "verbose",
1553
- "allowNo": false,
1554
- "type": "boolean"
1555
- },
1556
- "tag": {
1453
+ "test": {
1557
1454
  "char": "t",
1558
- "description": "Version tag to use for running remote migrations",
1559
- "name": "tag",
1455
+ "description": "Filter by test ID",
1456
+ "name": "test",
1457
+ "hasDynamicHelp": false,
1458
+ "multiple": false,
1459
+ "type": "option"
1460
+ },
1461
+ "recent": {
1462
+ "char": "r",
1463
+ "description": "Number of recent runs to show",
1464
+ "name": "recent",
1465
+ "hasDynamicHelp": false,
1466
+ "multiple": false,
1467
+ "type": "option"
1468
+ },
1469
+ "from": {
1470
+ "description": "Show history from date (YYYY-MM-DD)",
1471
+ "name": "from",
1472
+ "hasDynamicHelp": false,
1473
+ "multiple": false,
1474
+ "type": "option"
1475
+ },
1476
+ "status": {
1477
+ "char": "s",
1478
+ "description": "Filter by status",
1479
+ "name": "status",
1480
+ "hasDynamicHelp": false,
1481
+ "multiple": false,
1482
+ "type": "option"
1483
+ },
1484
+ "format": {
1485
+ "char": "f",
1486
+ "description": "Output format",
1487
+ "name": "format",
1488
+ "default": "console",
1489
+ "hasDynamicHelp": false,
1490
+ "multiple": false,
1491
+ "options": [
1492
+ "console",
1493
+ "json",
1494
+ "markdown"
1495
+ ],
1496
+ "type": "option"
1497
+ },
1498
+ "output": {
1499
+ "char": "o",
1500
+ "description": "Output file path",
1501
+ "name": "output",
1560
1502
  "hasDynamicHelp": false,
1561
1503
  "multiple": false,
1562
1504
  "type": "option"
1505
+ },
1506
+ "verbose": {
1507
+ "char": "v",
1508
+ "description": "Show detailed information",
1509
+ "name": "verbose",
1510
+ "allowNo": false,
1511
+ "type": "boolean"
1563
1512
  }
1564
1513
  },
1565
1514
  "hasDynamicHelp": false,
1566
1515
  "hiddenAliases": [],
1567
- "id": "migrate",
1516
+ "id": "test:history",
1568
1517
  "pluginAlias": "@memberjunction/cli",
1569
1518
  "pluginName": "@memberjunction/cli",
1570
1519
  "pluginType": "core",
@@ -1574,42 +1523,26 @@
1574
1523
  "relativePath": [
1575
1524
  "dist",
1576
1525
  "commands",
1577
- "migrate",
1578
- "index.js"
1526
+ "test",
1527
+ "history.js"
1579
1528
  ]
1580
1529
  },
1581
- "dbdoc:analyze": {
1530
+ "test": {
1582
1531
  "aliases": [],
1583
1532
  "args": {},
1584
- "description": "Analyze database and generate documentation (delegates to db-auto-doc analyze)",
1533
+ "description": "MemberJunction Testing Framework - Execute and manage tests",
1585
1534
  "examples": [
1586
- "<%= config.bin %> <%= command.id %>",
1587
- "<%= config.bin %> <%= command.id %> --resume ./output/run-6/state.json",
1588
- "<%= config.bin %> <%= command.id %> --config ./my-config.json"
1535
+ "<%= config.bin %> <%= command.id %> run <test-id>",
1536
+ "<%= config.bin %> <%= command.id %> run --name=\"Active Members Count\"",
1537
+ "<%= config.bin %> <%= command.id %> suite <suite-id>",
1538
+ "<%= config.bin %> <%= command.id %> list",
1539
+ "<%= config.bin %> <%= command.id %> list --suites",
1540
+ "<%= config.bin %> <%= command.id %> validate --all"
1589
1541
  ],
1590
- "flags": {
1591
- "resume": {
1592
- "char": "r",
1593
- "description": "Resume from an existing state file",
1594
- "name": "resume",
1595
- "required": false,
1596
- "hasDynamicHelp": false,
1597
- "multiple": false,
1598
- "type": "option"
1599
- },
1600
- "config": {
1601
- "char": "c",
1602
- "description": "Path to config file",
1603
- "name": "config",
1604
- "default": "./config.json",
1605
- "hasDynamicHelp": false,
1606
- "multiple": false,
1607
- "type": "option"
1608
- }
1609
- },
1542
+ "flags": {},
1610
1543
  "hasDynamicHelp": false,
1611
1544
  "hiddenAliases": [],
1612
- "id": "dbdoc:analyze",
1545
+ "id": "test",
1613
1546
  "pluginAlias": "@memberjunction/cli",
1614
1547
  "pluginName": "@memberjunction/cli",
1615
1548
  "pluginType": "core",
@@ -1619,208 +1552,91 @@
1619
1552
  "relativePath": [
1620
1553
  "dist",
1621
1554
  "commands",
1622
- "dbdoc",
1623
- "analyze.js"
1555
+ "test",
1556
+ "index.js"
1624
1557
  ]
1625
1558
  },
1626
- "dbdoc:export-sample-queries": {
1559
+ "test:list": {
1627
1560
  "aliases": [],
1628
1561
  "args": {},
1629
- "description": "Export sample queries to MemberJunction metadata format (delegates to db-auto-doc export-sample-queries)",
1562
+ "description": "List available tests, suites, and types",
1630
1563
  "examples": [
1631
- "<%= config.bin %> <%= command.id %> --input ./output/sample-queries.json --output ./metadata/queries/.queries.json",
1632
- "<%= config.bin %> <%= command.id %> --input ./sample-queries.json --output ./metadata/queries/.queries.json --separate-sql-files",
1633
- "<%= config.bin %> <%= command.id %> --input ./sample-queries.json --output ./queries/.queries.json --category \"Database Documentation\"",
1634
- "<%= config.bin %> <%= command.id %> --input ./sample-queries.json --output ./queries/.queries.json --status Pending --min-confidence 0.8"
1564
+ "<%= config.bin %> <%= command.id %>",
1565
+ "<%= config.bin %> <%= command.id %> --suites",
1566
+ "<%= config.bin %> <%= command.id %> --types",
1567
+ "<%= config.bin %> <%= command.id %> --type=agent-eval",
1568
+ "<%= config.bin %> <%= command.id %> --tag=smoke",
1569
+ "<%= config.bin %> <%= command.id %> --status=active --verbose"
1635
1570
  ],
1636
1571
  "flags": {
1637
- "input": {
1638
- "char": "i",
1639
- "description": "Path to sample-queries.json file generated by generate-queries command",
1640
- "name": "input",
1641
- "required": true,
1642
- "hasDynamicHelp": false,
1643
- "multiple": false,
1644
- "type": "option"
1645
- },
1646
- "output": {
1647
- "char": "o",
1648
- "description": "Output path for the .queries.json metadata file",
1649
- "name": "output",
1650
- "required": true,
1651
- "hasDynamicHelp": false,
1652
- "multiple": false,
1653
- "type": "option"
1572
+ "suites": {
1573
+ "description": "List test suites instead of tests",
1574
+ "name": "suites",
1575
+ "allowNo": false,
1576
+ "type": "boolean"
1654
1577
  },
1655
- "separate-sql-files": {
1656
- "description": "Write SQL to separate files and use @file: references",
1657
- "name": "separate-sql-files",
1578
+ "types": {
1579
+ "description": "List test types",
1580
+ "name": "types",
1658
1581
  "allowNo": false,
1659
1582
  "type": "boolean"
1660
1583
  },
1661
- "sql-dir": {
1662
- "description": "Directory for SQL files when using --separate-sql-files (relative to output file)",
1663
- "name": "sql-dir",
1664
- "default": "SQL",
1584
+ "type": {
1585
+ "char": "t",
1586
+ "description": "Filter by test type",
1587
+ "name": "type",
1665
1588
  "hasDynamicHelp": false,
1666
1589
  "multiple": false,
1667
1590
  "type": "option"
1668
1591
  },
1669
- "category": {
1670
- "description": "Category name for @lookup reference (e.g., \"Database Documentation\")",
1671
- "name": "category",
1672
- "required": false,
1592
+ "tag": {
1593
+ "description": "Filter by tag",
1594
+ "name": "tag",
1673
1595
  "hasDynamicHelp": false,
1674
1596
  "multiple": false,
1675
1597
  "type": "option"
1676
1598
  },
1677
1599
  "status": {
1678
- "description": "Status to assign to exported queries",
1600
+ "char": "s",
1601
+ "description": "Filter by status",
1679
1602
  "name": "status",
1680
- "default": "Pending",
1681
- "hasDynamicHelp": false,
1682
- "multiple": false,
1683
- "options": [
1684
- "Approved",
1685
- "Pending",
1686
- "Rejected",
1687
- "Expired"
1688
- ],
1689
- "type": "option"
1690
- },
1691
- "min-confidence": {
1692
- "description": "Minimum confidence threshold to export (0-1)",
1693
- "name": "min-confidence",
1694
- "default": "0",
1695
1603
  "hasDynamicHelp": false,
1696
1604
  "multiple": false,
1697
1605
  "type": "option"
1698
1606
  },
1699
- "validated-only": {
1700
- "description": "Only export queries that were successfully validated",
1701
- "name": "validated-only",
1702
- "allowNo": false,
1703
- "type": "boolean"
1704
- },
1705
- "append": {
1706
- "description": "Append to existing metadata file instead of overwriting",
1707
- "name": "append",
1708
- "allowNo": false,
1709
- "type": "boolean"
1710
- },
1711
- "include-primary-key": {
1712
- "description": "Include primaryKey and sync fields (for updating existing records)",
1713
- "name": "include-primary-key",
1714
- "allowNo": false,
1715
- "type": "boolean"
1716
- }
1717
- },
1718
- "hasDynamicHelp": false,
1719
- "hiddenAliases": [],
1720
- "id": "dbdoc:export-sample-queries",
1721
- "pluginAlias": "@memberjunction/cli",
1722
- "pluginName": "@memberjunction/cli",
1723
- "pluginType": "core",
1724
- "strict": true,
1725
- "enableJsonFlag": false,
1726
- "isESM": false,
1727
- "relativePath": [
1728
- "dist",
1729
- "commands",
1730
- "dbdoc",
1731
- "export-sample-queries.js"
1732
- ]
1733
- },
1734
- "dbdoc:export": {
1735
- "aliases": [],
1736
- "args": {},
1737
- "description": "Export documentation in multiple formats (delegates to db-auto-doc export)",
1738
- "examples": [
1739
- "<%= config.bin %> <%= command.id %> --state-file=./db-doc-state.json",
1740
- "<%= config.bin %> <%= command.id %> --sql",
1741
- "<%= config.bin %> <%= command.id %> --markdown",
1742
- "<%= config.bin %> <%= command.id %> --html",
1743
- "<%= config.bin %> <%= command.id %> --csv",
1744
- "<%= config.bin %> <%= command.id %> --mermaid",
1745
- "<%= config.bin %> <%= command.id %> --sql --markdown --html --csv --mermaid --apply"
1746
- ],
1747
- "flags": {
1748
- "state-file": {
1749
- "char": "s",
1750
- "description": "Path to state JSON file",
1751
- "name": "state-file",
1607
+ "format": {
1608
+ "char": "f",
1609
+ "description": "Output format",
1610
+ "name": "format",
1611
+ "default": "console",
1752
1612
  "hasDynamicHelp": false,
1753
1613
  "multiple": false,
1614
+ "options": [
1615
+ "console",
1616
+ "json",
1617
+ "markdown"
1618
+ ],
1754
1619
  "type": "option"
1755
1620
  },
1756
- "output-dir": {
1621
+ "output": {
1757
1622
  "char": "o",
1758
- "description": "Output directory for generated files",
1759
- "name": "output-dir",
1623
+ "description": "Output file path",
1624
+ "name": "output",
1760
1625
  "hasDynamicHelp": false,
1761
1626
  "multiple": false,
1762
1627
  "type": "option"
1763
1628
  },
1764
- "sql": {
1765
- "description": "Generate SQL script",
1766
- "name": "sql",
1767
- "allowNo": false,
1768
- "type": "boolean"
1769
- },
1770
- "markdown": {
1771
- "description": "Generate Markdown documentation",
1772
- "name": "markdown",
1773
- "allowNo": false,
1774
- "type": "boolean"
1775
- },
1776
- "html": {
1777
- "description": "Generate interactive HTML documentation",
1778
- "name": "html",
1779
- "allowNo": false,
1780
- "type": "boolean"
1781
- },
1782
- "csv": {
1783
- "description": "Generate CSV exports (tables and columns)",
1784
- "name": "csv",
1785
- "allowNo": false,
1786
- "type": "boolean"
1787
- },
1788
- "mermaid": {
1789
- "description": "Generate Mermaid ERD diagram files",
1790
- "name": "mermaid",
1791
- "allowNo": false,
1792
- "type": "boolean"
1793
- },
1794
- "report": {
1795
- "description": "Generate analysis report",
1796
- "name": "report",
1797
- "allowNo": false,
1798
- "type": "boolean"
1799
- },
1800
- "apply": {
1801
- "description": "Apply SQL to database",
1802
- "name": "apply",
1803
- "allowNo": false,
1804
- "type": "boolean"
1805
- },
1806
- "approved-only": {
1807
- "description": "Only export approved items",
1808
- "name": "approved-only",
1629
+ "verbose": {
1630
+ "char": "v",
1631
+ "description": "Show detailed information",
1632
+ "name": "verbose",
1809
1633
  "allowNo": false,
1810
1634
  "type": "boolean"
1811
- },
1812
- "confidence-threshold": {
1813
- "description": "Minimum confidence threshold",
1814
- "name": "confidence-threshold",
1815
- "default": "0",
1816
- "hasDynamicHelp": false,
1817
- "multiple": false,
1818
- "type": "option"
1819
1635
  }
1820
1636
  },
1821
1637
  "hasDynamicHelp": false,
1822
1638
  "hiddenAliases": [],
1823
- "id": "dbdoc:export",
1639
+ "id": "test:list",
1824
1640
  "pluginAlias": "@memberjunction/cli",
1825
1641
  "pluginName": "@memberjunction/cli",
1826
1642
  "pluginType": "core",
@@ -1830,87 +1646,83 @@
1830
1646
  "relativePath": [
1831
1647
  "dist",
1832
1648
  "commands",
1833
- "dbdoc",
1834
- "export.js"
1649
+ "test",
1650
+ "list.js"
1835
1651
  ]
1836
1652
  },
1837
- "dbdoc:generate-queries": {
1653
+ "test:run": {
1838
1654
  "aliases": [],
1839
- "args": {},
1840
- "description": "Generate sample SQL queries from existing analysis state (delegates to db-auto-doc generate-queries)",
1655
+ "args": {
1656
+ "testId": {
1657
+ "description": "Test ID to execute",
1658
+ "name": "testId",
1659
+ "required": false
1660
+ }
1661
+ },
1662
+ "description": "Execute a single test by ID or name",
1841
1663
  "examples": [
1842
- "<%= config.bin %> <%= command.id %> --from-state ./output/run-1/state.json",
1843
- "<%= config.bin %> <%= command.id %> --from-state ./output/run-1/state.json --output-dir ./queries",
1844
- "<%= config.bin %> <%= command.id %> --from-state ./output/run-1/state.json --queries-per-table 10"
1664
+ "<%= config.bin %> <%= command.id %> <test-id>",
1665
+ "<%= config.bin %> <%= command.id %> --name=\"Active Members Count\"",
1666
+ "<%= config.bin %> <%= command.id %> <test-id> --environment=staging",
1667
+ "<%= config.bin %> <%= command.id %> <test-id> --format=json --output=results.json",
1668
+ "<%= config.bin %> <%= command.id %> <test-id> --dry-run"
1845
1669
  ],
1846
1670
  "flags": {
1847
- "from-state": {
1848
- "description": "Path to existing state.json file from previous analysis",
1849
- "name": "from-state",
1850
- "required": true,
1671
+ "name": {
1672
+ "char": "n",
1673
+ "description": "Test name to execute",
1674
+ "name": "name",
1851
1675
  "hasDynamicHelp": false,
1852
1676
  "multiple": false,
1853
1677
  "type": "option"
1854
1678
  },
1855
- "output-dir": {
1856
- "description": "Output directory for generated queries",
1857
- "name": "output-dir",
1858
- "required": false,
1679
+ "environment": {
1680
+ "char": "e",
1681
+ "description": "Environment context (dev, staging, prod)",
1682
+ "name": "environment",
1859
1683
  "hasDynamicHelp": false,
1860
1684
  "multiple": false,
1861
1685
  "type": "option"
1862
1686
  },
1863
- "config": {
1864
- "char": "c",
1865
- "description": "Path to config file (for database connection and AI settings)",
1866
- "name": "config",
1867
- "default": "./config.json",
1687
+ "format": {
1688
+ "char": "f",
1689
+ "description": "Output format",
1690
+ "name": "format",
1691
+ "default": "console",
1868
1692
  "hasDynamicHelp": false,
1869
1693
  "multiple": false,
1694
+ "options": [
1695
+ "console",
1696
+ "json",
1697
+ "markdown"
1698
+ ],
1870
1699
  "type": "option"
1871
1700
  },
1872
- "queries-per-table": {
1873
- "description": "Number of queries to generate per table",
1874
- "name": "queries-per-table",
1875
- "required": false,
1701
+ "output": {
1702
+ "char": "o",
1703
+ "description": "Output file path",
1704
+ "name": "output",
1876
1705
  "hasDynamicHelp": false,
1877
1706
  "multiple": false,
1878
1707
  "type": "option"
1879
1708
  },
1880
- "max-execution-time": {
1881
- "description": "Maximum execution time for query validation (ms)",
1882
- "name": "max-execution-time",
1883
- "required": false,
1884
- "hasDynamicHelp": false,
1885
- "multiple": false,
1886
- "type": "option"
1709
+ "dry-run": {
1710
+ "description": "Validate without executing",
1711
+ "name": "dry-run",
1712
+ "allowNo": false,
1713
+ "type": "boolean"
1714
+ },
1715
+ "verbose": {
1716
+ "char": "v",
1717
+ "description": "Show detailed execution information",
1718
+ "name": "verbose",
1719
+ "allowNo": false,
1720
+ "type": "boolean"
1887
1721
  }
1888
1722
  },
1889
1723
  "hasDynamicHelp": false,
1890
1724
  "hiddenAliases": [],
1891
- "id": "dbdoc:generate-queries",
1892
- "pluginAlias": "@memberjunction/cli",
1893
- "pluginName": "@memberjunction/cli",
1894
- "pluginType": "core",
1895
- "strict": true,
1896
- "enableJsonFlag": false,
1897
- "isESM": false,
1898
- "relativePath": [
1899
- "dist",
1900
- "commands",
1901
- "dbdoc",
1902
- "generate-queries.js"
1903
- ]
1904
- },
1905
- "dbdoc": {
1906
- "aliases": [],
1907
- "args": {},
1908
- "description": "AI-powered database documentation generator",
1909
- "flags": {},
1910
- "hasDynamicHelp": false,
1911
- "hidden": false,
1912
- "hiddenAliases": [],
1913
- "id": "dbdoc",
1725
+ "id": "test:run",
1914
1726
  "pluginAlias": "@memberjunction/cli",
1915
1727
  "pluginName": "@memberjunction/cli",
1916
1728
  "pluginType": "core",
@@ -1920,21 +1732,68 @@
1920
1732
  "relativePath": [
1921
1733
  "dist",
1922
1734
  "commands",
1923
- "dbdoc",
1924
- "index.js"
1735
+ "test",
1736
+ "run.js"
1925
1737
  ]
1926
1738
  },
1927
- "dbdoc:init": {
1739
+ "test:suite": {
1928
1740
  "aliases": [],
1929
- "args": {},
1930
- "description": "Initialize DBAutoDoc project (delegates to db-auto-doc init)",
1741
+ "args": {
1742
+ "suiteId": {
1743
+ "description": "Test suite ID to execute",
1744
+ "name": "suiteId",
1745
+ "required": false
1746
+ }
1747
+ },
1748
+ "description": "Execute a test suite",
1931
1749
  "examples": [
1932
- "<%= config.bin %> <%= command.id %>"
1750
+ "<%= config.bin %> <%= command.id %> <suite-id>",
1751
+ "<%= config.bin %> <%= command.id %> --name=\"Agent Quality Suite\"",
1752
+ "<%= config.bin %> <%= command.id %> <suite-id> --format=json",
1753
+ "<%= config.bin %> <%= command.id %> <suite-id> --output=suite-results.json"
1933
1754
  ],
1934
- "flags": {},
1755
+ "flags": {
1756
+ "name": {
1757
+ "char": "n",
1758
+ "description": "Test suite name to execute",
1759
+ "name": "name",
1760
+ "hasDynamicHelp": false,
1761
+ "multiple": false,
1762
+ "type": "option"
1763
+ },
1764
+ "format": {
1765
+ "char": "f",
1766
+ "description": "Output format",
1767
+ "name": "format",
1768
+ "default": "console",
1769
+ "hasDynamicHelp": false,
1770
+ "multiple": false,
1771
+ "options": [
1772
+ "console",
1773
+ "json",
1774
+ "markdown"
1775
+ ],
1776
+ "type": "option"
1777
+ },
1778
+ "output": {
1779
+ "char": "o",
1780
+ "description": "Output file path",
1781
+ "name": "output",
1782
+ "hasDynamicHelp": false,
1783
+ "multiple": false,
1784
+ "type": "option"
1785
+ },
1786
+ "verbose": {
1787
+ "char": "v",
1788
+ "description": "Show detailed execution information",
1789
+ "name": "verbose",
1790
+ "allowNo": false,
1791
+ "type": "boolean"
1792
+ }
1793
+ },
1935
1794
  "hasDynamicHelp": false,
1936
1795
  "hiddenAliases": [],
1937
- "id": "dbdoc:init",
1796
+ "id": "test:suite",
1938
1797
  "pluginAlias": "@memberjunction/cli",
1939
1798
  "pluginName": "@memberjunction/cli",
1940
1799
  "pluginType": "core",
@@ -1944,30 +1803,82 @@
1944
1803
  "relativePath": [
1945
1804
  "dist",
1946
1805
  "commands",
1947
- "dbdoc",
1948
- "init.js"
1806
+ "test",
1807
+ "suite.js"
1949
1808
  ]
1950
1809
  },
1951
- "dbdoc:reset": {
1810
+ "test:validate": {
1952
1811
  "aliases": [],
1953
- "args": {},
1954
- "description": "Reset analysis state (delegates to db-auto-doc reset)",
1812
+ "args": {
1813
+ "testId": {
1814
+ "description": "Test ID to validate",
1815
+ "name": "testId",
1816
+ "required": false
1817
+ }
1818
+ },
1819
+ "description": "Validate test definitions without executing",
1955
1820
  "examples": [
1956
- "<%= config.bin %> <%= command.id %>",
1957
- "<%= config.bin %> <%= command.id %> --force"
1821
+ "<%= config.bin %> <%= command.id %> <test-id>",
1822
+ "<%= config.bin %> <%= command.id %> --all",
1823
+ "<%= config.bin %> <%= command.id %> --type=agent-eval",
1824
+ "<%= config.bin %> <%= command.id %> --all --save-report",
1825
+ "<%= config.bin %> <%= command.id %> --all --output=validation-report.md"
1958
1826
  ],
1959
1827
  "flags": {
1960
- "force": {
1828
+ "all": {
1829
+ "char": "a",
1830
+ "description": "Validate all tests",
1831
+ "name": "all",
1832
+ "allowNo": false,
1833
+ "type": "boolean"
1834
+ },
1835
+ "type": {
1836
+ "char": "t",
1837
+ "description": "Validate tests by type",
1838
+ "name": "type",
1839
+ "hasDynamicHelp": false,
1840
+ "multiple": false,
1841
+ "type": "option"
1842
+ },
1843
+ "save-report": {
1844
+ "description": "Save validation report to file",
1845
+ "name": "save-report",
1846
+ "allowNo": false,
1847
+ "type": "boolean"
1848
+ },
1849
+ "format": {
1961
1850
  "char": "f",
1962
- "description": "Force reset without confirmation",
1963
- "name": "force",
1851
+ "description": "Output format",
1852
+ "name": "format",
1853
+ "default": "console",
1854
+ "hasDynamicHelp": false,
1855
+ "multiple": false,
1856
+ "options": [
1857
+ "console",
1858
+ "json",
1859
+ "markdown"
1860
+ ],
1861
+ "type": "option"
1862
+ },
1863
+ "output": {
1864
+ "char": "o",
1865
+ "description": "Output file path",
1866
+ "name": "output",
1867
+ "hasDynamicHelp": false,
1868
+ "multiple": false,
1869
+ "type": "option"
1870
+ },
1871
+ "verbose": {
1872
+ "char": "v",
1873
+ "description": "Show detailed information",
1874
+ "name": "verbose",
1964
1875
  "allowNo": false,
1965
1876
  "type": "boolean"
1966
1877
  }
1967
1878
  },
1968
1879
  "hasDynamicHelp": false,
1969
1880
  "hiddenAliases": [],
1970
- "id": "dbdoc:reset",
1881
+ "id": "test:validate",
1971
1882
  "pluginAlias": "@memberjunction/cli",
1972
1883
  "pluginName": "@memberjunction/cli",
1973
1884
  "pluginType": "core",
@@ -1977,37 +1888,38 @@
1977
1888
  "relativePath": [
1978
1889
  "dist",
1979
1890
  "commands",
1980
- "dbdoc",
1981
- "reset.js"
1891
+ "test",
1892
+ "validate.js"
1982
1893
  ]
1983
1894
  },
1984
- "dbdoc:review": {
1895
+ "ai:actions:list": {
1985
1896
  "aliases": [],
1986
1897
  "args": {},
1987
- "description": "Review and approve AI-generated documentation",
1898
+ "description": "List available AI actions",
1988
1899
  "examples": [
1989
1900
  "<%= config.bin %> <%= command.id %>",
1990
- "<%= config.bin %> <%= command.id %> --schema dbo",
1991
- "<%= config.bin %> <%= command.id %> --unapproved-only"
1901
+ "<%= config.bin %> <%= command.id %> --output=table",
1902
+ "<%= config.bin %> <%= command.id %> --output=json"
1992
1903
  ],
1993
1904
  "flags": {
1994
- "schema": {
1995
- "description": "Review specific schema",
1996
- "name": "schema",
1905
+ "output": {
1906
+ "char": "o",
1907
+ "description": "Output format",
1908
+ "name": "output",
1909
+ "default": "compact",
1997
1910
  "hasDynamicHelp": false,
1998
1911
  "multiple": false,
1912
+ "options": [
1913
+ "compact",
1914
+ "json",
1915
+ "table"
1916
+ ],
1999
1917
  "type": "option"
2000
- },
2001
- "unapproved-only": {
2002
- "description": "Only show unapproved items",
2003
- "name": "unapproved-only",
2004
- "allowNo": false,
2005
- "type": "boolean"
2006
1918
  }
2007
1919
  },
2008
1920
  "hasDynamicHelp": false,
2009
1921
  "hiddenAliases": [],
2010
- "id": "dbdoc:review",
1922
+ "id": "ai:actions:list",
2011
1923
  "pluginAlias": "@memberjunction/cli",
2012
1924
  "pluginName": "@memberjunction/cli",
2013
1925
  "pluginType": "core",
@@ -2017,23 +1929,70 @@
2017
1929
  "relativePath": [
2018
1930
  "dist",
2019
1931
  "commands",
2020
- "dbdoc",
2021
- "review.js"
1932
+ "ai",
1933
+ "actions",
1934
+ "list.js"
2022
1935
  ]
2023
1936
  },
2024
- "dbdoc:status": {
1937
+ "ai:actions:run": {
2025
1938
  "aliases": [],
2026
1939
  "args": {},
2027
- "description": "Show analysis status and progress (delegates to db-auto-doc status)",
1940
+ "description": "Execute an AI action with parameters",
2028
1941
  "examples": [
2029
- "<%= config.bin %> <%= command.id %>",
2030
- "<%= config.bin %> <%= command.id %> --state-file ./custom-state.json"
1942
+ "<%= config.bin %> <%= command.id %> -n \"Get Weather\" --param \"Location=Boston\"",
1943
+ "<%= config.bin %> <%= command.id %> -n \"Get Stock Price\" --param \"Ticker=AAPL\"",
1944
+ "<%= config.bin %> <%= command.id %> -n \"Send Single Message\" --param \"To=user@example.com\" --param \"Subject=Test\" --param \"Body=Hello\" --param \"MessageType=Email\" --param \"Provider=SendGrid\"",
1945
+ "<%= config.bin %> <%= command.id %> -n \"Calculate Expression\" --param \"Expression=2+2*3\" --dry-run"
2031
1946
  ],
2032
1947
  "flags": {
2033
- "state-file": {
2034
- "char": "s",
2035
- "description": "Path to state JSON file",
2036
- "name": "state-file",
1948
+ "name": {
1949
+ "char": "n",
1950
+ "description": "Action name",
1951
+ "name": "name",
1952
+ "required": true,
1953
+ "hasDynamicHelp": false,
1954
+ "multiple": false,
1955
+ "type": "option"
1956
+ },
1957
+ "param": {
1958
+ "char": "p",
1959
+ "description": "Action parameters in key=value format",
1960
+ "name": "param",
1961
+ "hasDynamicHelp": false,
1962
+ "multiple": true,
1963
+ "type": "option"
1964
+ },
1965
+ "dry-run": {
1966
+ "description": "Validate without executing",
1967
+ "name": "dry-run",
1968
+ "allowNo": false,
1969
+ "type": "boolean"
1970
+ },
1971
+ "output": {
1972
+ "char": "o",
1973
+ "description": "Output format",
1974
+ "name": "output",
1975
+ "default": "compact",
1976
+ "hasDynamicHelp": false,
1977
+ "multiple": false,
1978
+ "options": [
1979
+ "compact",
1980
+ "json",
1981
+ "table"
1982
+ ],
1983
+ "type": "option"
1984
+ },
1985
+ "verbose": {
1986
+ "char": "v",
1987
+ "description": "Show detailed execution information",
1988
+ "name": "verbose",
1989
+ "allowNo": false,
1990
+ "type": "boolean"
1991
+ },
1992
+ "timeout": {
1993
+ "description": "Execution timeout in milliseconds",
1994
+ "name": "timeout",
1995
+ "default": 300000,
2037
1996
  "hasDynamicHelp": false,
2038
1997
  "multiple": false,
2039
1998
  "type": "option"
@@ -2041,7 +2000,7 @@
2041
2000
  },
2042
2001
  "hasDynamicHelp": false,
2043
2002
  "hiddenAliases": [],
2044
- "id": "dbdoc:status",
2003
+ "id": "ai:actions:run",
2045
2004
  "pluginAlias": "@memberjunction/cli",
2046
2005
  "pluginName": "@memberjunction/cli",
2047
2006
  "pluginType": "core",
@@ -2051,8 +2010,9 @@
2051
2010
  "relativePath": [
2052
2011
  "dist",
2053
2012
  "commands",
2054
- "dbdoc",
2055
- "status.js"
2013
+ "ai",
2014
+ "actions",
2015
+ "run.js"
2056
2016
  ]
2057
2017
  },
2058
2018
  "ai:agents:list": {
@@ -2540,5 +2500,5 @@
2540
2500
  ]
2541
2501
  }
2542
2502
  },
2543
- "version": "3.0.0"
2503
+ "version": "3.1.1"
2544
2504
  }