@memberjunction/cli 5.2.0 → 5.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/oclif.manifest.json +1074 -1074
  2. package/package.json +11 -11
@@ -320,38 +320,6 @@
320
320
  "upgrade.js"
321
321
  ]
322
322
  },
323
- "clean": {
324
- "aliases": [],
325
- "args": {},
326
- "description": "Resets the MemberJunction database to a pre-installation state",
327
- "examples": [
328
- "<%= config.bin %> <%= command.id %>\n"
329
- ],
330
- "flags": {
331
- "verbose": {
332
- "char": "v",
333
- "description": "Enable additional logging",
334
- "name": "verbose",
335
- "allowNo": false,
336
- "type": "boolean"
337
- }
338
- },
339
- "hasDynamicHelp": false,
340
- "hiddenAliases": [],
341
- "id": "clean",
342
- "pluginAlias": "@memberjunction/cli",
343
- "pluginName": "@memberjunction/cli",
344
- "pluginType": "core",
345
- "strict": true,
346
- "enableJsonFlag": false,
347
- "isESM": true,
348
- "relativePath": [
349
- "dist",
350
- "commands",
351
- "clean",
352
- "index.js"
353
- ]
354
- },
355
323
  "bump": {
356
324
  "aliases": [],
357
325
  "args": {},
@@ -424,6 +392,38 @@
424
392
  "index.js"
425
393
  ]
426
394
  },
395
+ "clean": {
396
+ "aliases": [],
397
+ "args": {},
398
+ "description": "Resets the MemberJunction database to a pre-installation state",
399
+ "examples": [
400
+ "<%= config.bin %> <%= command.id %>\n"
401
+ ],
402
+ "flags": {
403
+ "verbose": {
404
+ "char": "v",
405
+ "description": "Enable additional logging",
406
+ "name": "verbose",
407
+ "allowNo": false,
408
+ "type": "boolean"
409
+ }
410
+ },
411
+ "hasDynamicHelp": false,
412
+ "hiddenAliases": [],
413
+ "id": "clean",
414
+ "pluginAlias": "@memberjunction/cli",
415
+ "pluginName": "@memberjunction/cli",
416
+ "pluginType": "core",
417
+ "strict": true,
418
+ "enableJsonFlag": false,
419
+ "isESM": true,
420
+ "relativePath": [
421
+ "dist",
422
+ "commands",
423
+ "clean",
424
+ "index.js"
425
+ ]
426
+ },
427
427
  "codegen:5-0-fix-entity-names": {
428
428
  "aliases": [],
429
429
  "args": {},
@@ -774,38 +774,25 @@
774
774
  "manifest.js"
775
775
  ]
776
776
  },
777
- "dbdoc:analyze": {
777
+ "install": {
778
778
  "aliases": [],
779
779
  "args": {},
780
- "description": "Analyze database and generate documentation (delegates to db-auto-doc analyze)",
780
+ "description": "Install MemberJunction",
781
781
  "examples": [
782
- "<%= config.bin %> <%= command.id %>",
783
- "<%= config.bin %> <%= command.id %> --resume ./output/run-6/state.json",
784
- "<%= config.bin %> <%= command.id %> --config ./my-config.json"
782
+ "<%= config.bin %> <%= command.id %>\n"
785
783
  ],
786
784
  "flags": {
787
- "resume": {
788
- "char": "r",
789
- "description": "Resume from an existing state file",
790
- "name": "resume",
791
- "required": false,
792
- "hasDynamicHelp": false,
793
- "multiple": false,
794
- "type": "option"
795
- },
796
- "config": {
797
- "char": "c",
798
- "description": "Path to config file",
799
- "name": "config",
800
- "default": "./config.json",
801
- "hasDynamicHelp": false,
802
- "multiple": false,
803
- "type": "option"
785
+ "verbose": {
786
+ "char": "v",
787
+ "description": "Enable additional logging",
788
+ "name": "verbose",
789
+ "allowNo": false,
790
+ "type": "boolean"
804
791
  }
805
792
  },
806
793
  "hasDynamicHelp": false,
807
794
  "hiddenAliases": [],
808
- "id": "dbdoc:analyze",
795
+ "id": "install",
809
796
  "pluginAlias": "@memberjunction/cli",
810
797
  "pluginName": "@memberjunction/cli",
811
798
  "pluginType": "core",
@@ -815,105 +802,97 @@
815
802
  "relativePath": [
816
803
  "dist",
817
804
  "commands",
818
- "dbdoc",
819
- "analyze.js"
805
+ "install",
806
+ "index.js"
820
807
  ]
821
808
  },
822
- "dbdoc:export-sample-queries": {
809
+ "migrate": {
823
810
  "aliases": [],
824
811
  "args": {},
825
- "description": "Export sample queries to MemberJunction metadata format (delegates to db-auto-doc export-sample-queries)",
812
+ "description": "Migrate MemberJunction database to latest version",
826
813
  "examples": [
827
- "<%= config.bin %> <%= command.id %> --input ./output/sample-queries.json --output ./metadata/queries/.queries.json",
828
- "<%= config.bin %> <%= command.id %> --input ./sample-queries.json --output ./metadata/queries/.queries.json --separate-sql-files",
829
- "<%= config.bin %> <%= command.id %> --input ./sample-queries.json --output ./queries/.queries.json --category \"Database Documentation\"",
830
- "<%= config.bin %> <%= command.id %> --input ./sample-queries.json --output ./queries/.queries.json --status Pending --min-confidence 0.8"
814
+ "<%= config.bin %> <%= command.id %>\n",
815
+ "<%= config.bin %> <%= command.id %> --schema __BCSaaS --dir ./migrations/v1\n",
816
+ "<%= config.bin %> <%= command.id %> --schema __BCSaaS --tag v1.0.0\n"
831
817
  ],
832
818
  "flags": {
833
- "input": {
834
- "char": "i",
835
- "description": "Path to sample-queries.json file generated by generate-queries command",
836
- "name": "input",
837
- "required": true,
838
- "hasDynamicHelp": false,
839
- "multiple": false,
840
- "type": "option"
841
- },
842
- "output": {
843
- "char": "o",
844
- "description": "Output path for the .queries.json metadata file",
845
- "name": "output",
846
- "required": true,
847
- "hasDynamicHelp": false,
848
- "multiple": false,
849
- "type": "option"
850
- },
851
- "separate-sql-files": {
852
- "description": "Write SQL to separate files and use @file: references",
853
- "name": "separate-sql-files",
819
+ "verbose": {
820
+ "char": "v",
821
+ "description": "Enable additional logging",
822
+ "name": "verbose",
854
823
  "allowNo": false,
855
824
  "type": "boolean"
856
825
  },
857
- "sql-dir": {
858
- "description": "Directory for SQL files when using --separate-sql-files (relative to output file)",
859
- "name": "sql-dir",
860
- "default": "SQL",
826
+ "tag": {
827
+ "char": "t",
828
+ "description": "Version tag to use for running remote migrations",
829
+ "name": "tag",
861
830
  "hasDynamicHelp": false,
862
831
  "multiple": false,
863
832
  "type": "option"
864
833
  },
865
- "category": {
866
- "description": "Category name for @lookup reference (e.g., \"Database Documentation\")",
867
- "name": "category",
868
- "required": false,
834
+ "schema": {
835
+ "char": "s",
836
+ "description": "Target schema (overrides coreSchema from config)",
837
+ "name": "schema",
869
838
  "hasDynamicHelp": false,
870
839
  "multiple": false,
871
840
  "type": "option"
872
841
  },
873
- "status": {
874
- "description": "Status to assign to exported queries",
875
- "name": "status",
876
- "default": "Pending",
842
+ "dir": {
843
+ "description": "Migration source directory (overrides migrationsLocation from config)",
844
+ "name": "dir",
877
845
  "hasDynamicHelp": false,
878
846
  "multiple": false,
879
- "options": [
880
- "Approved",
881
- "Pending",
882
- "Rejected",
883
- "Expired"
884
- ],
885
847
  "type": "option"
886
- },
887
- "min-confidence": {
888
- "description": "Minimum confidence threshold to export (0-1)",
889
- "name": "min-confidence",
890
- "default": "0",
848
+ }
849
+ },
850
+ "hasDynamicHelp": false,
851
+ "hiddenAliases": [],
852
+ "id": "migrate",
853
+ "pluginAlias": "@memberjunction/cli",
854
+ "pluginName": "@memberjunction/cli",
855
+ "pluginType": "core",
856
+ "strict": true,
857
+ "enableJsonFlag": false,
858
+ "isESM": true,
859
+ "relativePath": [
860
+ "dist",
861
+ "commands",
862
+ "migrate",
863
+ "index.js"
864
+ ]
865
+ },
866
+ "querygen:export": {
867
+ "aliases": [],
868
+ "args": {},
869
+ "description": "Export queries from database to metadata files",
870
+ "examples": [
871
+ "<%= config.bin %> <%= command.id %>",
872
+ "<%= config.bin %> <%= command.id %> --output ./metadata/queries",
873
+ "<%= config.bin %> <%= command.id %> --verbose"
874
+ ],
875
+ "flags": {
876
+ "output": {
877
+ "char": "o",
878
+ "description": "Output directory",
879
+ "name": "output",
880
+ "default": "./metadata/queries",
891
881
  "hasDynamicHelp": false,
892
882
  "multiple": false,
893
883
  "type": "option"
894
884
  },
895
- "validated-only": {
896
- "description": "Only export queries that were successfully validated",
897
- "name": "validated-only",
898
- "allowNo": false,
899
- "type": "boolean"
900
- },
901
- "append": {
902
- "description": "Append to existing metadata file instead of overwriting",
903
- "name": "append",
904
- "allowNo": false,
905
- "type": "boolean"
906
- },
907
- "include-primary-key": {
908
- "description": "Include primaryKey and sync fields (for updating existing records)",
909
- "name": "include-primary-key",
885
+ "verbose": {
886
+ "char": "v",
887
+ "description": "Verbose output",
888
+ "name": "verbose",
910
889
  "allowNo": false,
911
890
  "type": "boolean"
912
891
  }
913
892
  },
914
893
  "hasDynamicHelp": false,
915
894
  "hiddenAliases": [],
916
- "id": "dbdoc:export-sample-queries",
895
+ "id": "querygen:export",
917
896
  "pluginAlias": "@memberjunction/cli",
918
897
  "pluginName": "@memberjunction/cli",
919
898
  "pluginType": "core",
@@ -923,100 +902,126 @@
923
902
  "relativePath": [
924
903
  "dist",
925
904
  "commands",
926
- "dbdoc",
927
- "export-sample-queries.js"
905
+ "querygen",
906
+ "export.js"
928
907
  ]
929
908
  },
930
- "dbdoc:export": {
909
+ "querygen:generate": {
931
910
  "aliases": [],
932
911
  "args": {},
933
- "description": "Export documentation in multiple formats (delegates to db-auto-doc export)",
912
+ "description": "Generate SQL query templates for entities using AI",
934
913
  "examples": [
935
- "<%= config.bin %> <%= command.id %> --state-file=./db-doc-state.json",
936
- "<%= config.bin %> <%= command.id %> --sql",
937
- "<%= config.bin %> <%= command.id %> --markdown",
938
- "<%= config.bin %> <%= command.id %> --html",
939
- "<%= config.bin %> <%= command.id %> --csv",
940
- "<%= config.bin %> <%= command.id %> --mermaid",
941
- "<%= config.bin %> <%= command.id %> --sql --markdown --html --csv --mermaid --apply"
914
+ "<%= config.bin %> <%= command.id %>",
915
+ "<%= config.bin %> <%= command.id %> --entities \"Customers,Orders\"",
916
+ "<%= config.bin %> <%= command.id %> --max-entities 5 --verbose",
917
+ "<%= config.bin %> <%= command.id %> --mode database"
942
918
  ],
943
919
  "flags": {
944
- "state-file": {
945
- "char": "s",
946
- "description": "Path to state JSON file",
947
- "name": "state-file",
920
+ "entities": {
921
+ "char": "e",
922
+ "description": "Specific entities to generate queries for (comma-separated)",
923
+ "name": "entities",
948
924
  "hasDynamicHelp": false,
949
925
  "multiple": false,
950
926
  "type": "option"
951
927
  },
952
- "output-dir": {
953
- "char": "o",
954
- "description": "Output directory for generated files",
955
- "name": "output-dir",
928
+ "exclude-entities": {
929
+ "char": "x",
930
+ "description": "Entities to exclude (comma-separated)",
931
+ "name": "exclude-entities",
956
932
  "hasDynamicHelp": false,
957
933
  "multiple": false,
958
934
  "type": "option"
959
935
  },
960
- "sql": {
961
- "description": "Generate SQL script",
962
- "name": "sql",
963
- "allowNo": false,
964
- "type": "boolean"
936
+ "exclude-schemas": {
937
+ "char": "s",
938
+ "description": "Schemas to exclude (comma-separated)",
939
+ "name": "exclude-schemas",
940
+ "hasDynamicHelp": false,
941
+ "multiple": false,
942
+ "type": "option"
965
943
  },
966
- "markdown": {
967
- "description": "Generate Markdown documentation",
968
- "name": "markdown",
969
- "allowNo": false,
970
- "type": "boolean"
944
+ "max-entities": {
945
+ "char": "m",
946
+ "description": "Max entities per group",
947
+ "name": "max-entities",
948
+ "default": 3,
949
+ "hasDynamicHelp": false,
950
+ "multiple": false,
951
+ "type": "option"
971
952
  },
972
- "html": {
973
- "description": "Generate interactive HTML documentation",
974
- "name": "html",
975
- "allowNo": false,
976
- "type": "boolean"
953
+ "target-groups": {
954
+ "char": "t",
955
+ "description": "Target number of entity groups to generate",
956
+ "name": "target-groups",
957
+ "default": 75,
958
+ "hasDynamicHelp": false,
959
+ "multiple": false,
960
+ "type": "option"
977
961
  },
978
- "csv": {
979
- "description": "Generate CSV exports (tables and columns)",
980
- "name": "csv",
981
- "allowNo": false,
982
- "type": "boolean"
962
+ "max-refinements": {
963
+ "char": "r",
964
+ "description": "Max refinement iterations",
965
+ "name": "max-refinements",
966
+ "default": 3,
967
+ "hasDynamicHelp": false,
968
+ "multiple": false,
969
+ "type": "option"
983
970
  },
984
- "mermaid": {
985
- "description": "Generate Mermaid ERD diagram files",
986
- "name": "mermaid",
987
- "allowNo": false,
988
- "type": "boolean"
971
+ "max-fixes": {
972
+ "char": "f",
973
+ "description": "Max error-fixing attempts",
974
+ "name": "max-fixes",
975
+ "default": 5,
976
+ "hasDynamicHelp": false,
977
+ "multiple": false,
978
+ "type": "option"
989
979
  },
990
- "report": {
991
- "description": "Generate analysis report",
992
- "name": "report",
993
- "allowNo": false,
994
- "type": "boolean"
980
+ "model": {
981
+ "description": "Preferred AI model",
982
+ "name": "model",
983
+ "hasDynamicHelp": false,
984
+ "multiple": false,
985
+ "type": "option"
995
986
  },
996
- "apply": {
997
- "description": "Apply SQL to database",
998
- "name": "apply",
999
- "allowNo": false,
1000
- "type": "boolean"
987
+ "vendor": {
988
+ "description": "Preferred AI vendor",
989
+ "name": "vendor",
990
+ "hasDynamicHelp": false,
991
+ "multiple": false,
992
+ "type": "option"
1001
993
  },
1002
- "approved-only": {
1003
- "description": "Only export approved items",
1004
- "name": "approved-only",
1005
- "allowNo": false,
1006
- "type": "boolean"
994
+ "output": {
995
+ "char": "o",
996
+ "description": "Output directory",
997
+ "name": "output",
998
+ "hasDynamicHelp": false,
999
+ "multiple": false,
1000
+ "type": "option"
1007
1001
  },
1008
- "confidence-threshold": {
1009
- "description": "Minimum confidence threshold",
1010
- "name": "confidence-threshold",
1011
- "default": "0",
1002
+ "mode": {
1003
+ "description": "Output mode: metadata|database|both",
1004
+ "name": "mode",
1012
1005
  "hasDynamicHelp": false,
1013
1006
  "multiple": false,
1007
+ "options": [
1008
+ "metadata",
1009
+ "database",
1010
+ "both"
1011
+ ],
1014
1012
  "type": "option"
1013
+ },
1014
+ "verbose": {
1015
+ "char": "v",
1016
+ "description": "Verbose output",
1017
+ "name": "verbose",
1018
+ "allowNo": false,
1019
+ "type": "boolean"
1015
1020
  }
1016
1021
  },
1017
1022
  "hasDynamicHelp": false,
1018
1023
  "hiddenAliases": [],
1019
- "id": "dbdoc:export",
1024
+ "id": "querygen:generate",
1020
1025
  "pluginAlias": "@memberjunction/cli",
1021
1026
  "pluginName": "@memberjunction/cli",
1022
1027
  "pluginType": "core",
@@ -1026,65 +1031,40 @@
1026
1031
  "relativePath": [
1027
1032
  "dist",
1028
1033
  "commands",
1029
- "dbdoc",
1030
- "export.js"
1034
+ "querygen",
1035
+ "generate.js"
1031
1036
  ]
1032
1037
  },
1033
- "dbdoc:generate-queries": {
1038
+ "querygen:validate": {
1034
1039
  "aliases": [],
1035
1040
  "args": {},
1036
- "description": "Generate sample SQL queries from existing analysis state (delegates to db-auto-doc generate-queries)",
1041
+ "description": "Validate existing query templates",
1037
1042
  "examples": [
1038
- "<%= config.bin %> <%= command.id %> --from-state ./output/run-1/state.json",
1039
- "<%= config.bin %> <%= command.id %> --from-state ./output/run-1/state.json --output-dir ./queries",
1040
- "<%= config.bin %> <%= command.id %> --from-state ./output/run-1/state.json --queries-per-table 10"
1043
+ "<%= config.bin %> <%= command.id %>",
1044
+ "<%= config.bin %> <%= command.id %> --path ./metadata/queries",
1045
+ "<%= config.bin %> <%= command.id %> --verbose"
1041
1046
  ],
1042
1047
  "flags": {
1043
- "from-state": {
1044
- "description": "Path to existing state.json file from previous analysis",
1045
- "name": "from-state",
1046
- "required": true,
1047
- "hasDynamicHelp": false,
1048
- "multiple": false,
1049
- "type": "option"
1050
- },
1051
- "output-dir": {
1052
- "description": "Output directory for generated queries",
1053
- "name": "output-dir",
1054
- "required": false,
1055
- "hasDynamicHelp": false,
1056
- "multiple": false,
1057
- "type": "option"
1058
- },
1059
- "config": {
1060
- "char": "c",
1061
- "description": "Path to config file (for database connection and AI settings)",
1062
- "name": "config",
1063
- "default": "./config.json",
1064
- "hasDynamicHelp": false,
1065
- "multiple": false,
1066
- "type": "option"
1067
- },
1068
- "queries-per-table": {
1069
- "description": "Number of queries to generate per table",
1070
- "name": "queries-per-table",
1071
- "required": false,
1048
+ "path": {
1049
+ "char": "p",
1050
+ "description": "Path to queries metadata file or directory",
1051
+ "name": "path",
1052
+ "default": "./metadata/queries",
1072
1053
  "hasDynamicHelp": false,
1073
1054
  "multiple": false,
1074
1055
  "type": "option"
1075
1056
  },
1076
- "max-execution-time": {
1077
- "description": "Maximum execution time for query validation (ms)",
1078
- "name": "max-execution-time",
1079
- "required": false,
1080
- "hasDynamicHelp": false,
1081
- "multiple": false,
1082
- "type": "option"
1057
+ "verbose": {
1058
+ "char": "v",
1059
+ "description": "Verbose output",
1060
+ "name": "verbose",
1061
+ "allowNo": false,
1062
+ "type": "boolean"
1083
1063
  }
1084
1064
  },
1085
1065
  "hasDynamicHelp": false,
1086
1066
  "hiddenAliases": [],
1087
- "id": "dbdoc:generate-queries",
1067
+ "id": "querygen:validate",
1088
1068
  "pluginAlias": "@memberjunction/cli",
1089
1069
  "pluginName": "@memberjunction/cli",
1090
1070
  "pluginType": "core",
@@ -1094,19 +1074,64 @@
1094
1074
  "relativePath": [
1095
1075
  "dist",
1096
1076
  "commands",
1097
- "dbdoc",
1098
- "generate-queries.js"
1077
+ "querygen",
1078
+ "validate.js"
1099
1079
  ]
1100
1080
  },
1101
- "dbdoc": {
1081
+ "sync:file-reset": {
1102
1082
  "aliases": [],
1103
1083
  "args": {},
1104
- "description": "AI-powered database documentation generator",
1105
- "flags": {},
1084
+ "description": "Reset file metadata sections",
1085
+ "examples": [
1086
+ "<%= config.bin %> <%= command.id %>",
1087
+ "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
1088
+ "<%= config.bin %> <%= command.id %> --sections=\"dependencies,references\"",
1089
+ "<%= config.bin %> <%= command.id %> --all"
1090
+ ],
1091
+ "flags": {
1092
+ "dir": {
1093
+ "description": "Specific entity directory to reset",
1094
+ "name": "dir",
1095
+ "hasDynamicHelp": false,
1096
+ "multiple": false,
1097
+ "type": "option"
1098
+ },
1099
+ "sections": {
1100
+ "description": "Comma-separated list of sections to reset (dependencies,references,related,lookup)",
1101
+ "name": "sections",
1102
+ "hasDynamicHelp": false,
1103
+ "multiple": false,
1104
+ "type": "option"
1105
+ },
1106
+ "all": {
1107
+ "description": "Reset all metadata sections",
1108
+ "name": "all",
1109
+ "allowNo": false,
1110
+ "type": "boolean"
1111
+ },
1112
+ "dry-run": {
1113
+ "description": "Show what would be reset without actually resetting",
1114
+ "name": "dry-run",
1115
+ "allowNo": false,
1116
+ "type": "boolean"
1117
+ },
1118
+ "force": {
1119
+ "description": "Skip confirmation prompts",
1120
+ "name": "force",
1121
+ "allowNo": false,
1122
+ "type": "boolean"
1123
+ },
1124
+ "verbose": {
1125
+ "char": "v",
1126
+ "description": "Show detailed output",
1127
+ "name": "verbose",
1128
+ "allowNo": false,
1129
+ "type": "boolean"
1130
+ }
1131
+ },
1106
1132
  "hasDynamicHelp": false,
1107
- "hidden": false,
1108
1133
  "hiddenAliases": [],
1109
- "id": "dbdoc",
1134
+ "id": "sync:file-reset",
1110
1135
  "pluginAlias": "@memberjunction/cli",
1111
1136
  "pluginName": "@memberjunction/cli",
1112
1137
  "pluginType": "core",
@@ -1116,21 +1141,21 @@
1116
1141
  "relativePath": [
1117
1142
  "dist",
1118
1143
  "commands",
1119
- "dbdoc",
1120
- "index.js"
1144
+ "sync",
1145
+ "file-reset.js"
1121
1146
  ]
1122
1147
  },
1123
- "dbdoc:init": {
1148
+ "sync:init": {
1124
1149
  "aliases": [],
1125
1150
  "args": {},
1126
- "description": "Initialize DBAutoDoc project (delegates to db-auto-doc init)",
1151
+ "description": "Initialize a directory for metadata synchronization",
1127
1152
  "examples": [
1128
1153
  "<%= config.bin %> <%= command.id %>"
1129
1154
  ],
1130
1155
  "flags": {},
1131
1156
  "hasDynamicHelp": false,
1132
1157
  "hiddenAliases": [],
1133
- "id": "dbdoc:init",
1158
+ "id": "sync:init",
1134
1159
  "pluginAlias": "@memberjunction/cli",
1135
1160
  "pluginName": "@memberjunction/cli",
1136
1161
  "pluginType": "core",
@@ -1140,30 +1165,127 @@
1140
1165
  "relativePath": [
1141
1166
  "dist",
1142
1167
  "commands",
1143
- "dbdoc",
1168
+ "sync",
1144
1169
  "init.js"
1145
1170
  ]
1146
1171
  },
1147
- "dbdoc:reset": {
1172
+ "sync:pull": {
1148
1173
  "aliases": [],
1149
1174
  "args": {},
1150
- "description": "Reset analysis state (delegates to db-auto-doc reset)",
1175
+ "description": "Pull metadata from database to local files",
1151
1176
  "examples": [
1152
- "<%= config.bin %> <%= command.id %>",
1153
- "<%= config.bin %> <%= command.id %> --force"
1177
+ "<%= config.bin %> <%= command.id %> --entity=\"MJ: AI Prompts\"",
1178
+ "<%= config.bin %> <%= command.id %> --entity=\"MJ: AI Prompts\" --filter=\"CategoryID='customer-service-id'\"",
1179
+ "<%= config.bin %> <%= command.id %> --entity=\"MJ: AI Agents\" --merge-strategy=overwrite",
1180
+ "<%= config.bin %> <%= command.id %> --entity=\"Actions\" --target-dir=./custom-actions --no-validate",
1181
+ "<%= config.bin %> <%= command.id %> --entity=\"Templates\" --dry-run --verbose",
1182
+ "<%= config.bin %> <%= command.id %> --entity=\"MJ: AI Prompts\" --exclude-fields=InternalNotes,DebugInfo"
1154
1183
  ],
1155
1184
  "flags": {
1156
- "force": {
1157
- "char": "f",
1158
- "description": "Force reset without confirmation",
1159
- "name": "force",
1185
+ "entity": {
1186
+ "description": "Entity name to pull",
1187
+ "name": "entity",
1188
+ "required": true,
1189
+ "hasDynamicHelp": false,
1190
+ "multiple": false,
1191
+ "type": "option"
1192
+ },
1193
+ "filter": {
1194
+ "description": "Additional filter for pulling specific records",
1195
+ "name": "filter",
1196
+ "hasDynamicHelp": false,
1197
+ "multiple": false,
1198
+ "type": "option"
1199
+ },
1200
+ "dry-run": {
1201
+ "description": "Show what would be pulled without actually pulling",
1202
+ "name": "dry-run",
1203
+ "allowNo": false,
1204
+ "type": "boolean"
1205
+ },
1206
+ "multi-file": {
1207
+ "description": "Create a single file with multiple records (provide filename)",
1208
+ "name": "multi-file",
1209
+ "hasDynamicHelp": false,
1210
+ "multiple": false,
1211
+ "type": "option"
1212
+ },
1213
+ "verbose": {
1214
+ "char": "v",
1215
+ "description": "Show detailed output",
1216
+ "name": "verbose",
1217
+ "allowNo": false,
1218
+ "type": "boolean"
1219
+ },
1220
+ "no-validate": {
1221
+ "description": "Skip validation before pull",
1222
+ "name": "no-validate",
1223
+ "allowNo": false,
1224
+ "type": "boolean"
1225
+ },
1226
+ "update-existing": {
1227
+ "description": "Update existing records during pull",
1228
+ "name": "update-existing",
1229
+ "allowNo": false,
1230
+ "type": "boolean"
1231
+ },
1232
+ "create-new": {
1233
+ "description": "Create new files for records not found locally",
1234
+ "name": "create-new",
1235
+ "allowNo": false,
1236
+ "type": "boolean"
1237
+ },
1238
+ "backup-before-update": {
1239
+ "description": "Create backups before updating files",
1240
+ "name": "backup-before-update",
1160
1241
  "allowNo": false,
1161
1242
  "type": "boolean"
1243
+ },
1244
+ "merge-strategy": {
1245
+ "description": "Merge strategy for updates",
1246
+ "name": "merge-strategy",
1247
+ "default": "merge",
1248
+ "hasDynamicHelp": false,
1249
+ "multiple": false,
1250
+ "options": [
1251
+ "merge",
1252
+ "overwrite",
1253
+ "skip"
1254
+ ],
1255
+ "type": "option"
1256
+ },
1257
+ "backup-directory": {
1258
+ "description": "Custom backup directory (default: .backups)",
1259
+ "name": "backup-directory",
1260
+ "hasDynamicHelp": false,
1261
+ "multiple": false,
1262
+ "type": "option"
1263
+ },
1264
+ "preserve-fields": {
1265
+ "description": "Comma-separated list of fields to preserve during updates",
1266
+ "name": "preserve-fields",
1267
+ "hasDynamicHelp": false,
1268
+ "multiple": true,
1269
+ "type": "option"
1270
+ },
1271
+ "exclude-fields": {
1272
+ "description": "Comma-separated list of fields to exclude from pull",
1273
+ "name": "exclude-fields",
1274
+ "hasDynamicHelp": false,
1275
+ "multiple": true,
1276
+ "type": "option"
1277
+ },
1278
+ "target-dir": {
1279
+ "description": "Specific target directory (overrides auto-discovery)",
1280
+ "name": "target-dir",
1281
+ "hasDynamicHelp": false,
1282
+ "multiple": false,
1283
+ "type": "option"
1162
1284
  }
1163
1285
  },
1164
1286
  "hasDynamicHelp": false,
1165
1287
  "hiddenAliases": [],
1166
- "id": "dbdoc:reset",
1288
+ "id": "sync:pull",
1167
1289
  "pluginAlias": "@memberjunction/cli",
1168
1290
  "pluginName": "@memberjunction/cli",
1169
1291
  "pluginType": "core",
@@ -1173,23 +1295,77 @@
1173
1295
  "relativePath": [
1174
1296
  "dist",
1175
1297
  "commands",
1176
- "dbdoc",
1177
- "reset.js"
1298
+ "sync",
1299
+ "pull.js"
1178
1300
  ]
1179
1301
  },
1180
- "dbdoc:status": {
1302
+ "sync:push": {
1181
1303
  "aliases": [],
1182
1304
  "args": {},
1183
- "description": "Show analysis status and progress (delegates to db-auto-doc status)",
1305
+ "description": "Push local file changes to the database",
1184
1306
  "examples": [
1185
1307
  "<%= config.bin %> <%= command.id %>",
1186
- "<%= config.bin %> <%= command.id %> --state-file ./custom-state.json"
1308
+ "<%= config.bin %> <%= command.id %> --dry-run",
1309
+ "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
1310
+ "<%= config.bin %> <%= command.id %> --ci"
1187
1311
  ],
1188
1312
  "flags": {
1189
- "state-file": {
1190
- "char": "s",
1191
- "description": "Path to state JSON file",
1192
- "name": "state-file",
1313
+ "dir": {
1314
+ "description": "Specific entity directory to push",
1315
+ "name": "dir",
1316
+ "hasDynamicHelp": false,
1317
+ "multiple": false,
1318
+ "type": "option"
1319
+ },
1320
+ "dry-run": {
1321
+ "description": "Show what would be pushed without actually pushing",
1322
+ "name": "dry-run",
1323
+ "allowNo": false,
1324
+ "type": "boolean"
1325
+ },
1326
+ "ci": {
1327
+ "description": "CI mode - no prompts, fail on issues",
1328
+ "name": "ci",
1329
+ "allowNo": false,
1330
+ "type": "boolean"
1331
+ },
1332
+ "verbose": {
1333
+ "char": "v",
1334
+ "description": "Show detailed field-level output",
1335
+ "name": "verbose",
1336
+ "allowNo": false,
1337
+ "type": "boolean"
1338
+ },
1339
+ "no-validate": {
1340
+ "description": "Skip validation before push",
1341
+ "name": "no-validate",
1342
+ "allowNo": false,
1343
+ "type": "boolean"
1344
+ },
1345
+ "delete-db-only": {
1346
+ "description": "Delete database-only records that reference records being deleted (prevents FK errors)",
1347
+ "name": "delete-db-only",
1348
+ "allowNo": false,
1349
+ "type": "boolean"
1350
+ },
1351
+ "parallel-batch-size": {
1352
+ "description": "Number of records to process in parallel (default: 10)",
1353
+ "name": "parallel-batch-size",
1354
+ "default": 10,
1355
+ "hasDynamicHelp": false,
1356
+ "multiple": false,
1357
+ "type": "option"
1358
+ },
1359
+ "include": {
1360
+ "description": "Only process these directories (comma-separated, supports patterns)",
1361
+ "name": "include",
1362
+ "hasDynamicHelp": false,
1363
+ "multiple": false,
1364
+ "type": "option"
1365
+ },
1366
+ "exclude": {
1367
+ "description": "Skip these directories (comma-separated, supports patterns)",
1368
+ "name": "exclude",
1193
1369
  "hasDynamicHelp": false,
1194
1370
  "multiple": false,
1195
1371
  "type": "option"
@@ -1197,7 +1373,7 @@
1197
1373
  },
1198
1374
  "hasDynamicHelp": false,
1199
1375
  "hiddenAliases": [],
1200
- "id": "dbdoc:status",
1376
+ "id": "sync:push",
1201
1377
  "pluginAlias": "@memberjunction/cli",
1202
1378
  "pluginName": "@memberjunction/cli",
1203
1379
  "pluginType": "core",
@@ -1207,29 +1383,52 @@
1207
1383
  "relativePath": [
1208
1384
  "dist",
1209
1385
  "commands",
1210
- "dbdoc",
1211
- "status.js"
1386
+ "sync",
1387
+ "push.js"
1212
1388
  ]
1213
1389
  },
1214
- "install": {
1390
+ "sync:status": {
1215
1391
  "aliases": [],
1216
1392
  "args": {},
1217
- "description": "Install MemberJunction",
1393
+ "description": "Show status of local files vs database",
1218
1394
  "examples": [
1219
- "<%= config.bin %> <%= command.id %>\n"
1395
+ "<%= config.bin %> <%= command.id %>",
1396
+ "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
1397
+ "<%= config.bin %> <%= command.id %> --verbose"
1220
1398
  ],
1221
1399
  "flags": {
1400
+ "dir": {
1401
+ "description": "Specific entity directory to check status",
1402
+ "name": "dir",
1403
+ "hasDynamicHelp": false,
1404
+ "multiple": false,
1405
+ "type": "option"
1406
+ },
1222
1407
  "verbose": {
1223
1408
  "char": "v",
1224
- "description": "Enable additional logging",
1409
+ "description": "Show detailed field-level differences",
1225
1410
  "name": "verbose",
1226
1411
  "allowNo": false,
1227
1412
  "type": "boolean"
1413
+ },
1414
+ "include": {
1415
+ "description": "Only process these directories (comma-separated, supports patterns)",
1416
+ "name": "include",
1417
+ "hasDynamicHelp": false,
1418
+ "multiple": false,
1419
+ "type": "option"
1420
+ },
1421
+ "exclude": {
1422
+ "description": "Skip these directories (comma-separated, supports patterns)",
1423
+ "name": "exclude",
1424
+ "hasDynamicHelp": false,
1425
+ "multiple": false,
1426
+ "type": "option"
1228
1427
  }
1229
1428
  },
1230
1429
  "hasDynamicHelp": false,
1231
1430
  "hiddenAliases": [],
1232
- "id": "install",
1431
+ "id": "sync:status",
1233
1432
  "pluginAlias": "@memberjunction/cli",
1234
1433
  "pluginName": "@memberjunction/cli",
1235
1434
  "pluginType": "core",
@@ -1239,46 +1438,44 @@
1239
1438
  "relativePath": [
1240
1439
  "dist",
1241
1440
  "commands",
1242
- "install",
1243
- "index.js"
1441
+ "sync",
1442
+ "status.js"
1244
1443
  ]
1245
1444
  },
1246
- "migrate": {
1445
+ "sync:validate": {
1247
1446
  "aliases": [],
1248
1447
  "args": {},
1249
- "description": "Migrate MemberJunction database to latest version",
1448
+ "description": "Validate metadata files",
1250
1449
  "examples": [
1251
- "<%= config.bin %> <%= command.id %>\n",
1252
- "<%= config.bin %> <%= command.id %> --schema __BCSaaS --dir ./migrations/v1\n",
1253
- "<%= config.bin %> <%= command.id %> --schema __BCSaaS --tag v1.0.0\n"
1450
+ "<%= config.bin %> <%= command.id %>",
1451
+ "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
1452
+ "<%= config.bin %> <%= command.id %> --save-report",
1453
+ "<%= config.bin %> <%= command.id %> --verbose"
1254
1454
  ],
1255
1455
  "flags": {
1456
+ "dir": {
1457
+ "description": "Specific entity directory to validate",
1458
+ "name": "dir",
1459
+ "hasDynamicHelp": false,
1460
+ "multiple": false,
1461
+ "type": "option"
1462
+ },
1256
1463
  "verbose": {
1257
1464
  "char": "v",
1258
- "description": "Enable additional logging",
1465
+ "description": "Show detailed validation output",
1259
1466
  "name": "verbose",
1260
1467
  "allowNo": false,
1261
1468
  "type": "boolean"
1262
1469
  },
1263
- "tag": {
1264
- "char": "t",
1265
- "description": "Version tag to use for running remote migrations",
1266
- "name": "tag",
1267
- "hasDynamicHelp": false,
1268
- "multiple": false,
1269
- "type": "option"
1270
- },
1271
- "schema": {
1272
- "char": "s",
1273
- "description": "Target schema (overrides coreSchema from config)",
1274
- "name": "schema",
1275
- "hasDynamicHelp": false,
1276
- "multiple": false,
1277
- "type": "option"
1470
+ "save-report": {
1471
+ "description": "Save validation report as markdown file",
1472
+ "name": "save-report",
1473
+ "allowNo": false,
1474
+ "type": "boolean"
1278
1475
  },
1279
- "dir": {
1280
- "description": "Migration source directory (overrides migrationsLocation from config)",
1281
- "name": "dir",
1476
+ "output": {
1477
+ "description": "Output file path for validation report (default: validation-report.md)",
1478
+ "name": "output",
1282
1479
  "hasDynamicHelp": false,
1283
1480
  "multiple": false,
1284
1481
  "type": "option"
@@ -1286,7 +1483,7 @@
1286
1483
  },
1287
1484
  "hasDynamicHelp": false,
1288
1485
  "hiddenAliases": [],
1289
- "id": "migrate",
1486
+ "id": "sync:validate",
1290
1487
  "pluginAlias": "@memberjunction/cli",
1291
1488
  "pluginName": "@memberjunction/cli",
1292
1489
  "pluginType": "core",
@@ -1296,32 +1493,44 @@
1296
1493
  "relativePath": [
1297
1494
  "dist",
1298
1495
  "commands",
1299
- "migrate",
1300
- "index.js"
1496
+ "sync",
1497
+ "validate.js"
1301
1498
  ]
1302
1499
  },
1303
- "querygen:export": {
1500
+ "sync:watch": {
1304
1501
  "aliases": [],
1305
1502
  "args": {},
1306
- "description": "Export queries from database to metadata files",
1503
+ "description": "Watch for file changes and sync automatically",
1307
1504
  "examples": [
1308
1505
  "<%= config.bin %> <%= command.id %>",
1309
- "<%= config.bin %> <%= command.id %> --output ./metadata/queries",
1310
- "<%= config.bin %> <%= command.id %> --verbose"
1506
+ "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
1507
+ "<%= config.bin %> <%= command.id %> --debounce=1000",
1508
+ "<%= config.bin %> <%= command.id %> --no-validate"
1311
1509
  ],
1312
1510
  "flags": {
1313
- "output": {
1314
- "char": "o",
1315
- "description": "Output directory",
1316
- "name": "output",
1317
- "default": "./metadata/queries",
1511
+ "dir": {
1512
+ "description": "Specific entity directory to watch",
1513
+ "name": "dir",
1514
+ "hasDynamicHelp": false,
1515
+ "multiple": false,
1516
+ "type": "option"
1517
+ },
1518
+ "debounce": {
1519
+ "description": "Debounce delay in milliseconds (default: 500)",
1520
+ "name": "debounce",
1318
1521
  "hasDynamicHelp": false,
1319
1522
  "multiple": false,
1320
1523
  "type": "option"
1321
1524
  },
1525
+ "no-validate": {
1526
+ "description": "Skip validation before sync",
1527
+ "name": "no-validate",
1528
+ "allowNo": false,
1529
+ "type": "boolean"
1530
+ },
1322
1531
  "verbose": {
1323
1532
  "char": "v",
1324
- "description": "Verbose output",
1533
+ "description": "Show detailed output",
1325
1534
  "name": "verbose",
1326
1535
  "allowNo": false,
1327
1536
  "type": "boolean"
@@ -1329,7 +1538,7 @@
1329
1538
  },
1330
1539
  "hasDynamicHelp": false,
1331
1540
  "hiddenAliases": [],
1332
- "id": "querygen:export",
1541
+ "id": "sync:watch",
1333
1542
  "pluginAlias": "@memberjunction/cli",
1334
1543
  "pluginName": "@memberjunction/cli",
1335
1544
  "pluginType": "core",
@@ -1339,118 +1548,167 @@
1339
1548
  "relativePath": [
1340
1549
  "dist",
1341
1550
  "commands",
1342
- "querygen",
1343
- "export.js"
1551
+ "sync",
1552
+ "watch.js"
1344
1553
  ]
1345
1554
  },
1346
- "querygen:generate": {
1555
+ "test:compare": {
1347
1556
  "aliases": [],
1348
- "args": {},
1349
- "description": "Generate SQL query templates for entities using AI",
1557
+ "args": {
1558
+ "runId1": {
1559
+ "description": "First test run ID to compare",
1560
+ "name": "runId1",
1561
+ "required": false
1562
+ },
1563
+ "runId2": {
1564
+ "description": "Second test run ID to compare",
1565
+ "name": "runId2",
1566
+ "required": false
1567
+ }
1568
+ },
1569
+ "description": "Compare test runs for regression detection",
1350
1570
  "examples": [
1351
- "<%= config.bin %> <%= command.id %>",
1352
- "<%= config.bin %> <%= command.id %> --entities \"Customers,Orders\"",
1353
- "<%= config.bin %> <%= command.id %> --max-entities 5 --verbose",
1354
- "<%= config.bin %> <%= command.id %> --mode database"
1571
+ "<%= config.bin %> <%= command.id %> <run-id-1> <run-id-2>",
1572
+ "<%= config.bin %> <%= command.id %> --baseline=<run-id> --current=<run-id>",
1573
+ "<%= config.bin %> <%= command.id %> --suite=<suite-id> --since=\"2024-01-01\"",
1574
+ "<%= config.bin %> <%= command.id %> <run-id-1> <run-id-2> --format=json"
1355
1575
  ],
1356
1576
  "flags": {
1357
- "entities": {
1358
- "char": "e",
1359
- "description": "Specific entities to generate queries for (comma-separated)",
1360
- "name": "entities",
1577
+ "version": {
1578
+ "char": "v",
1579
+ "description": "Compare runs by version",
1580
+ "name": "version",
1361
1581
  "hasDynamicHelp": false,
1362
- "multiple": false,
1582
+ "multiple": true,
1363
1583
  "type": "option"
1364
1584
  },
1365
- "exclude-entities": {
1366
- "char": "x",
1367
- "description": "Entities to exclude (comma-separated)",
1368
- "name": "exclude-entities",
1585
+ "commit": {
1586
+ "char": "c",
1587
+ "description": "Compare runs by git commit",
1588
+ "name": "commit",
1369
1589
  "hasDynamicHelp": false,
1370
- "multiple": false,
1590
+ "multiple": true,
1371
1591
  "type": "option"
1372
1592
  },
1373
- "exclude-schemas": {
1374
- "char": "s",
1375
- "description": "Schemas to exclude (comma-separated)",
1376
- "name": "exclude-schemas",
1593
+ "diff-only": {
1594
+ "description": "Show only differences",
1595
+ "name": "diff-only",
1596
+ "allowNo": false,
1597
+ "type": "boolean"
1598
+ },
1599
+ "format": {
1600
+ "char": "f",
1601
+ "description": "Output format",
1602
+ "name": "format",
1603
+ "default": "console",
1377
1604
  "hasDynamicHelp": false,
1378
1605
  "multiple": false,
1606
+ "options": [
1607
+ "console",
1608
+ "json",
1609
+ "markdown"
1610
+ ],
1379
1611
  "type": "option"
1380
1612
  },
1381
- "max-entities": {
1382
- "char": "m",
1383
- "description": "Max entities per group",
1384
- "name": "max-entities",
1385
- "default": 3,
1613
+ "output": {
1614
+ "char": "o",
1615
+ "description": "Output file path",
1616
+ "name": "output",
1386
1617
  "hasDynamicHelp": false,
1387
1618
  "multiple": false,
1388
1619
  "type": "option"
1389
1620
  },
1390
- "target-groups": {
1621
+ "verbose": {
1622
+ "description": "Show detailed information",
1623
+ "name": "verbose",
1624
+ "allowNo": false,
1625
+ "type": "boolean"
1626
+ }
1627
+ },
1628
+ "hasDynamicHelp": false,
1629
+ "hiddenAliases": [],
1630
+ "id": "test:compare",
1631
+ "pluginAlias": "@memberjunction/cli",
1632
+ "pluginName": "@memberjunction/cli",
1633
+ "pluginType": "core",
1634
+ "strict": true,
1635
+ "enableJsonFlag": false,
1636
+ "isESM": true,
1637
+ "relativePath": [
1638
+ "dist",
1639
+ "commands",
1640
+ "test",
1641
+ "compare.js"
1642
+ ]
1643
+ },
1644
+ "test:history": {
1645
+ "aliases": [],
1646
+ "args": {},
1647
+ "description": "View test execution history",
1648
+ "examples": [
1649
+ "<%= config.bin %> <%= command.id %>",
1650
+ "<%= config.bin %> <%= command.id %> --test=<test-id>",
1651
+ "<%= config.bin %> <%= command.id %> --suite=<suite-id>",
1652
+ "<%= config.bin %> <%= command.id %> --since=\"2024-01-01\"",
1653
+ "<%= config.bin %> <%= command.id %> --limit=50"
1654
+ ],
1655
+ "flags": {
1656
+ "test": {
1391
1657
  "char": "t",
1392
- "description": "Target number of entity groups to generate",
1393
- "name": "target-groups",
1394
- "default": 75,
1658
+ "description": "Filter by test ID",
1659
+ "name": "test",
1395
1660
  "hasDynamicHelp": false,
1396
1661
  "multiple": false,
1397
1662
  "type": "option"
1398
1663
  },
1399
- "max-refinements": {
1664
+ "recent": {
1400
1665
  "char": "r",
1401
- "description": "Max refinement iterations",
1402
- "name": "max-refinements",
1403
- "default": 3,
1666
+ "description": "Number of recent runs to show",
1667
+ "name": "recent",
1404
1668
  "hasDynamicHelp": false,
1405
1669
  "multiple": false,
1406
1670
  "type": "option"
1407
1671
  },
1408
- "max-fixes": {
1409
- "char": "f",
1410
- "description": "Max error-fixing attempts",
1411
- "name": "max-fixes",
1412
- "default": 5,
1672
+ "from": {
1673
+ "description": "Show history from date (YYYY-MM-DD)",
1674
+ "name": "from",
1413
1675
  "hasDynamicHelp": false,
1414
1676
  "multiple": false,
1415
1677
  "type": "option"
1416
1678
  },
1417
- "model": {
1418
- "description": "Preferred AI model",
1419
- "name": "model",
1679
+ "status": {
1680
+ "char": "s",
1681
+ "description": "Filter by status",
1682
+ "name": "status",
1420
1683
  "hasDynamicHelp": false,
1421
1684
  "multiple": false,
1422
1685
  "type": "option"
1423
1686
  },
1424
- "vendor": {
1425
- "description": "Preferred AI vendor",
1426
- "name": "vendor",
1687
+ "format": {
1688
+ "char": "f",
1689
+ "description": "Output format",
1690
+ "name": "format",
1691
+ "default": "console",
1427
1692
  "hasDynamicHelp": false,
1428
1693
  "multiple": false,
1694
+ "options": [
1695
+ "console",
1696
+ "json",
1697
+ "markdown"
1698
+ ],
1429
1699
  "type": "option"
1430
1700
  },
1431
1701
  "output": {
1432
1702
  "char": "o",
1433
- "description": "Output directory",
1703
+ "description": "Output file path",
1434
1704
  "name": "output",
1435
1705
  "hasDynamicHelp": false,
1436
1706
  "multiple": false,
1437
1707
  "type": "option"
1438
1708
  },
1439
- "mode": {
1440
- "description": "Output mode: metadata|database|both",
1441
- "name": "mode",
1442
- "hasDynamicHelp": false,
1443
- "multiple": false,
1444
- "options": [
1445
- "metadata",
1446
- "database",
1447
- "both"
1448
- ],
1449
- "type": "option"
1450
- },
1451
1709
  "verbose": {
1452
1710
  "char": "v",
1453
- "description": "Verbose output",
1711
+ "description": "Show detailed information",
1454
1712
  "name": "verbose",
1455
1713
  "allowNo": false,
1456
1714
  "type": "boolean"
@@ -1458,7 +1716,7 @@
1458
1716
  },
1459
1717
  "hasDynamicHelp": false,
1460
1718
  "hiddenAliases": [],
1461
- "id": "querygen:generate",
1719
+ "id": "test:history",
1462
1720
  "pluginAlias": "@memberjunction/cli",
1463
1721
  "pluginName": "@memberjunction/cli",
1464
1722
  "pluginType": "core",
@@ -1468,40 +1726,26 @@
1468
1726
  "relativePath": [
1469
1727
  "dist",
1470
1728
  "commands",
1471
- "querygen",
1472
- "generate.js"
1729
+ "test",
1730
+ "history.js"
1473
1731
  ]
1474
1732
  },
1475
- "querygen:validate": {
1733
+ "test": {
1476
1734
  "aliases": [],
1477
1735
  "args": {},
1478
- "description": "Validate existing query templates",
1736
+ "description": "MemberJunction Testing Framework - Execute and manage tests",
1479
1737
  "examples": [
1480
- "<%= config.bin %> <%= command.id %>",
1481
- "<%= config.bin %> <%= command.id %> --path ./metadata/queries",
1482
- "<%= config.bin %> <%= command.id %> --verbose"
1738
+ "<%= config.bin %> <%= command.id %> run <test-id>",
1739
+ "<%= config.bin %> <%= command.id %> run --name=\"Active Members Count\"",
1740
+ "<%= config.bin %> <%= command.id %> suite <suite-id>",
1741
+ "<%= config.bin %> <%= command.id %> list",
1742
+ "<%= config.bin %> <%= command.id %> list --suites",
1743
+ "<%= config.bin %> <%= command.id %> validate --all"
1483
1744
  ],
1484
- "flags": {
1485
- "path": {
1486
- "char": "p",
1487
- "description": "Path to queries metadata file or directory",
1488
- "name": "path",
1489
- "default": "./metadata/queries",
1490
- "hasDynamicHelp": false,
1491
- "multiple": false,
1492
- "type": "option"
1493
- },
1494
- "verbose": {
1495
- "char": "v",
1496
- "description": "Verbose output",
1497
- "name": "verbose",
1498
- "allowNo": false,
1499
- "type": "boolean"
1500
- }
1501
- },
1745
+ "flags": {},
1502
1746
  "hasDynamicHelp": false,
1503
1747
  "hiddenAliases": [],
1504
- "id": "querygen:validate",
1748
+ "id": "test",
1505
1749
  "pluginAlias": "@memberjunction/cli",
1506
1750
  "pluginName": "@memberjunction/cli",
1507
1751
  "pluginType": "core",
@@ -1511,56 +1755,83 @@
1511
1755
  "relativePath": [
1512
1756
  "dist",
1513
1757
  "commands",
1514
- "querygen",
1515
- "validate.js"
1758
+ "test",
1759
+ "index.js"
1516
1760
  ]
1517
1761
  },
1518
- "sync:file-reset": {
1762
+ "test:list": {
1519
1763
  "aliases": [],
1520
1764
  "args": {},
1521
- "description": "Reset file metadata sections",
1765
+ "description": "List available tests, suites, and types",
1522
1766
  "examples": [
1523
1767
  "<%= config.bin %> <%= command.id %>",
1524
- "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
1525
- "<%= config.bin %> <%= command.id %> --sections=\"dependencies,references\"",
1526
- "<%= config.bin %> <%= command.id %> --all"
1768
+ "<%= config.bin %> <%= command.id %> --suites",
1769
+ "<%= config.bin %> <%= command.id %> --types",
1770
+ "<%= config.bin %> <%= command.id %> --type=agent-eval",
1771
+ "<%= config.bin %> <%= command.id %> --tag=smoke",
1772
+ "<%= config.bin %> <%= command.id %> --status=active --verbose"
1527
1773
  ],
1528
1774
  "flags": {
1529
- "dir": {
1530
- "description": "Specific entity directory to reset",
1531
- "name": "dir",
1775
+ "suites": {
1776
+ "description": "List test suites instead of tests",
1777
+ "name": "suites",
1778
+ "allowNo": false,
1779
+ "type": "boolean"
1780
+ },
1781
+ "types": {
1782
+ "description": "List test types",
1783
+ "name": "types",
1784
+ "allowNo": false,
1785
+ "type": "boolean"
1786
+ },
1787
+ "type": {
1788
+ "char": "t",
1789
+ "description": "Filter by test type",
1790
+ "name": "type",
1532
1791
  "hasDynamicHelp": false,
1533
1792
  "multiple": false,
1534
1793
  "type": "option"
1535
1794
  },
1536
- "sections": {
1537
- "description": "Comma-separated list of sections to reset (dependencies,references,related,lookup)",
1538
- "name": "sections",
1795
+ "tag": {
1796
+ "description": "Filter by tag",
1797
+ "name": "tag",
1539
1798
  "hasDynamicHelp": false,
1540
1799
  "multiple": false,
1541
1800
  "type": "option"
1542
1801
  },
1543
- "all": {
1544
- "description": "Reset all metadata sections",
1545
- "name": "all",
1546
- "allowNo": false,
1547
- "type": "boolean"
1802
+ "status": {
1803
+ "char": "s",
1804
+ "description": "Filter by status",
1805
+ "name": "status",
1806
+ "hasDynamicHelp": false,
1807
+ "multiple": false,
1808
+ "type": "option"
1548
1809
  },
1549
- "dry-run": {
1550
- "description": "Show what would be reset without actually resetting",
1551
- "name": "dry-run",
1552
- "allowNo": false,
1553
- "type": "boolean"
1810
+ "format": {
1811
+ "char": "f",
1812
+ "description": "Output format",
1813
+ "name": "format",
1814
+ "default": "console",
1815
+ "hasDynamicHelp": false,
1816
+ "multiple": false,
1817
+ "options": [
1818
+ "console",
1819
+ "json",
1820
+ "markdown"
1821
+ ],
1822
+ "type": "option"
1554
1823
  },
1555
- "force": {
1556
- "description": "Skip confirmation prompts",
1557
- "name": "force",
1558
- "allowNo": false,
1559
- "type": "boolean"
1824
+ "output": {
1825
+ "char": "o",
1826
+ "description": "Output file path",
1827
+ "name": "output",
1828
+ "hasDynamicHelp": false,
1829
+ "multiple": false,
1830
+ "type": "option"
1560
1831
  },
1561
1832
  "verbose": {
1562
1833
  "char": "v",
1563
- "description": "Show detailed output",
1834
+ "description": "Show detailed information",
1564
1835
  "name": "verbose",
1565
1836
  "allowNo": false,
1566
1837
  "type": "boolean"
@@ -1568,7 +1839,7 @@
1568
1839
  },
1569
1840
  "hasDynamicHelp": false,
1570
1841
  "hiddenAliases": [],
1571
- "id": "sync:file-reset",
1842
+ "id": "test:list",
1572
1843
  "pluginAlias": "@memberjunction/cli",
1573
1844
  "pluginName": "@memberjunction/cli",
1574
1845
  "pluginType": "core",
@@ -1578,21 +1849,83 @@
1578
1849
  "relativePath": [
1579
1850
  "dist",
1580
1851
  "commands",
1581
- "sync",
1582
- "file-reset.js"
1852
+ "test",
1853
+ "list.js"
1583
1854
  ]
1584
1855
  },
1585
- "sync:init": {
1856
+ "test:run": {
1586
1857
  "aliases": [],
1587
- "args": {},
1588
- "description": "Initialize a directory for metadata synchronization",
1858
+ "args": {
1859
+ "testId": {
1860
+ "description": "Test ID to execute",
1861
+ "name": "testId",
1862
+ "required": false
1863
+ }
1864
+ },
1865
+ "description": "Execute a single test by ID or name",
1589
1866
  "examples": [
1590
- "<%= config.bin %> <%= command.id %>"
1867
+ "<%= config.bin %> <%= command.id %> <test-id>",
1868
+ "<%= config.bin %> <%= command.id %> --name=\"Active Members Count\"",
1869
+ "<%= config.bin %> <%= command.id %> <test-id> --environment=staging",
1870
+ "<%= config.bin %> <%= command.id %> <test-id> --format=json --output=results.json",
1871
+ "<%= config.bin %> <%= command.id %> <test-id> --dry-run"
1591
1872
  ],
1592
- "flags": {},
1873
+ "flags": {
1874
+ "name": {
1875
+ "char": "n",
1876
+ "description": "Test name to execute",
1877
+ "name": "name",
1878
+ "hasDynamicHelp": false,
1879
+ "multiple": false,
1880
+ "type": "option"
1881
+ },
1882
+ "environment": {
1883
+ "char": "e",
1884
+ "description": "Environment context (dev, staging, prod)",
1885
+ "name": "environment",
1886
+ "hasDynamicHelp": false,
1887
+ "multiple": false,
1888
+ "type": "option"
1889
+ },
1890
+ "format": {
1891
+ "char": "f",
1892
+ "description": "Output format",
1893
+ "name": "format",
1894
+ "default": "console",
1895
+ "hasDynamicHelp": false,
1896
+ "multiple": false,
1897
+ "options": [
1898
+ "console",
1899
+ "json",
1900
+ "markdown"
1901
+ ],
1902
+ "type": "option"
1903
+ },
1904
+ "output": {
1905
+ "char": "o",
1906
+ "description": "Output file path",
1907
+ "name": "output",
1908
+ "hasDynamicHelp": false,
1909
+ "multiple": false,
1910
+ "type": "option"
1911
+ },
1912
+ "dry-run": {
1913
+ "description": "Validate without executing",
1914
+ "name": "dry-run",
1915
+ "allowNo": false,
1916
+ "type": "boolean"
1917
+ },
1918
+ "verbose": {
1919
+ "char": "v",
1920
+ "description": "Show detailed execution information",
1921
+ "name": "verbose",
1922
+ "allowNo": false,
1923
+ "type": "boolean"
1924
+ }
1925
+ },
1593
1926
  "hasDynamicHelp": false,
1594
1927
  "hiddenAliases": [],
1595
- "id": "sync:init",
1928
+ "id": "test:run",
1596
1929
  "pluginAlias": "@memberjunction/cli",
1597
1930
  "pluginName": "@memberjunction/cli",
1598
1931
  "pluginType": "core",
@@ -1602,127 +1935,68 @@
1602
1935
  "relativePath": [
1603
1936
  "dist",
1604
1937
  "commands",
1605
- "sync",
1606
- "init.js"
1938
+ "test",
1939
+ "run.js"
1607
1940
  ]
1608
1941
  },
1609
- "sync:pull": {
1942
+ "test:suite": {
1610
1943
  "aliases": [],
1611
- "args": {},
1612
- "description": "Pull metadata from database to local files",
1944
+ "args": {
1945
+ "suiteId": {
1946
+ "description": "Test suite ID to execute",
1947
+ "name": "suiteId",
1948
+ "required": false
1949
+ }
1950
+ },
1951
+ "description": "Execute a test suite",
1613
1952
  "examples": [
1614
- "<%= config.bin %> <%= command.id %> --entity=\"MJ: AI Prompts\"",
1615
- "<%= config.bin %> <%= command.id %> --entity=\"MJ: AI Prompts\" --filter=\"CategoryID='customer-service-id'\"",
1616
- "<%= config.bin %> <%= command.id %> --entity=\"MJ: AI Agents\" --merge-strategy=overwrite",
1617
- "<%= config.bin %> <%= command.id %> --entity=\"Actions\" --target-dir=./custom-actions --no-validate",
1618
- "<%= config.bin %> <%= command.id %> --entity=\"Templates\" --dry-run --verbose",
1619
- "<%= config.bin %> <%= command.id %> --entity=\"MJ: AI Prompts\" --exclude-fields=InternalNotes,DebugInfo"
1953
+ "<%= config.bin %> <%= command.id %> <suite-id>",
1954
+ "<%= config.bin %> <%= command.id %> --name=\"Agent Quality Suite\"",
1955
+ "<%= config.bin %> <%= command.id %> <suite-id> --format=json",
1956
+ "<%= config.bin %> <%= command.id %> <suite-id> --output=suite-results.json"
1620
1957
  ],
1621
1958
  "flags": {
1622
- "entity": {
1623
- "description": "Entity name to pull",
1624
- "name": "entity",
1625
- "required": true,
1959
+ "name": {
1960
+ "char": "n",
1961
+ "description": "Test suite name to execute",
1962
+ "name": "name",
1626
1963
  "hasDynamicHelp": false,
1627
1964
  "multiple": false,
1628
1965
  "type": "option"
1629
1966
  },
1630
- "filter": {
1631
- "description": "Additional filter for pulling specific records",
1632
- "name": "filter",
1967
+ "format": {
1968
+ "char": "f",
1969
+ "description": "Output format",
1970
+ "name": "format",
1971
+ "default": "console",
1633
1972
  "hasDynamicHelp": false,
1634
1973
  "multiple": false,
1974
+ "options": [
1975
+ "console",
1976
+ "json",
1977
+ "markdown"
1978
+ ],
1635
1979
  "type": "option"
1636
1980
  },
1637
- "dry-run": {
1638
- "description": "Show what would be pulled without actually pulling",
1639
- "name": "dry-run",
1640
- "allowNo": false,
1641
- "type": "boolean"
1642
- },
1643
- "multi-file": {
1644
- "description": "Create a single file with multiple records (provide filename)",
1645
- "name": "multi-file",
1981
+ "output": {
1982
+ "char": "o",
1983
+ "description": "Output file path",
1984
+ "name": "output",
1646
1985
  "hasDynamicHelp": false,
1647
1986
  "multiple": false,
1648
1987
  "type": "option"
1649
1988
  },
1650
1989
  "verbose": {
1651
1990
  "char": "v",
1652
- "description": "Show detailed output",
1991
+ "description": "Show detailed execution information",
1653
1992
  "name": "verbose",
1654
1993
  "allowNo": false,
1655
1994
  "type": "boolean"
1656
- },
1657
- "no-validate": {
1658
- "description": "Skip validation before pull",
1659
- "name": "no-validate",
1660
- "allowNo": false,
1661
- "type": "boolean"
1662
- },
1663
- "update-existing": {
1664
- "description": "Update existing records during pull",
1665
- "name": "update-existing",
1666
- "allowNo": false,
1667
- "type": "boolean"
1668
- },
1669
- "create-new": {
1670
- "description": "Create new files for records not found locally",
1671
- "name": "create-new",
1672
- "allowNo": false,
1673
- "type": "boolean"
1674
- },
1675
- "backup-before-update": {
1676
- "description": "Create backups before updating files",
1677
- "name": "backup-before-update",
1678
- "allowNo": false,
1679
- "type": "boolean"
1680
- },
1681
- "merge-strategy": {
1682
- "description": "Merge strategy for updates",
1683
- "name": "merge-strategy",
1684
- "default": "merge",
1685
- "hasDynamicHelp": false,
1686
- "multiple": false,
1687
- "options": [
1688
- "merge",
1689
- "overwrite",
1690
- "skip"
1691
- ],
1692
- "type": "option"
1693
- },
1694
- "backup-directory": {
1695
- "description": "Custom backup directory (default: .backups)",
1696
- "name": "backup-directory",
1697
- "hasDynamicHelp": false,
1698
- "multiple": false,
1699
- "type": "option"
1700
- },
1701
- "preserve-fields": {
1702
- "description": "Comma-separated list of fields to preserve during updates",
1703
- "name": "preserve-fields",
1704
- "hasDynamicHelp": false,
1705
- "multiple": true,
1706
- "type": "option"
1707
- },
1708
- "exclude-fields": {
1709
- "description": "Comma-separated list of fields to exclude from pull",
1710
- "name": "exclude-fields",
1711
- "hasDynamicHelp": false,
1712
- "multiple": true,
1713
- "type": "option"
1714
- },
1715
- "target-dir": {
1716
- "description": "Specific target directory (overrides auto-discovery)",
1717
- "name": "target-dir",
1718
- "hasDynamicHelp": false,
1719
- "multiple": false,
1720
- "type": "option"
1721
1995
  }
1722
1996
  },
1723
1997
  "hasDynamicHelp": false,
1724
1998
  "hiddenAliases": [],
1725
- "id": "sync:pull",
1999
+ "id": "test:suite",
1726
2000
  "pluginAlias": "@memberjunction/cli",
1727
2001
  "pluginName": "@memberjunction/cli",
1728
2002
  "pluginType": "core",
@@ -1732,85 +2006,82 @@
1732
2006
  "relativePath": [
1733
2007
  "dist",
1734
2008
  "commands",
1735
- "sync",
1736
- "pull.js"
2009
+ "test",
2010
+ "suite.js"
1737
2011
  ]
1738
2012
  },
1739
- "sync:push": {
2013
+ "test:validate": {
1740
2014
  "aliases": [],
1741
- "args": {},
1742
- "description": "Push local file changes to the database",
2015
+ "args": {
2016
+ "testId": {
2017
+ "description": "Test ID to validate",
2018
+ "name": "testId",
2019
+ "required": false
2020
+ }
2021
+ },
2022
+ "description": "Validate test definitions without executing",
1743
2023
  "examples": [
1744
- "<%= config.bin %> <%= command.id %>",
1745
- "<%= config.bin %> <%= command.id %> --dry-run",
1746
- "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
1747
- "<%= config.bin %> <%= command.id %> --ci"
2024
+ "<%= config.bin %> <%= command.id %> <test-id>",
2025
+ "<%= config.bin %> <%= command.id %> --all",
2026
+ "<%= config.bin %> <%= command.id %> --type=agent-eval",
2027
+ "<%= config.bin %> <%= command.id %> --all --save-report",
2028
+ "<%= config.bin %> <%= command.id %> --all --output=validation-report.md"
1748
2029
  ],
1749
2030
  "flags": {
1750
- "dir": {
1751
- "description": "Specific entity directory to push",
1752
- "name": "dir",
1753
- "hasDynamicHelp": false,
1754
- "multiple": false,
1755
- "type": "option"
1756
- },
1757
- "dry-run": {
1758
- "description": "Show what would be pushed without actually pushing",
1759
- "name": "dry-run",
1760
- "allowNo": false,
1761
- "type": "boolean"
1762
- },
1763
- "ci": {
1764
- "description": "CI mode - no prompts, fail on issues",
1765
- "name": "ci",
1766
- "allowNo": false,
1767
- "type": "boolean"
1768
- },
1769
- "verbose": {
1770
- "char": "v",
1771
- "description": "Show detailed field-level output",
1772
- "name": "verbose",
2031
+ "all": {
2032
+ "char": "a",
2033
+ "description": "Validate all tests",
2034
+ "name": "all",
1773
2035
  "allowNo": false,
1774
2036
  "type": "boolean"
1775
2037
  },
1776
- "no-validate": {
1777
- "description": "Skip validation before push",
1778
- "name": "no-validate",
1779
- "allowNo": false,
1780
- "type": "boolean"
2038
+ "type": {
2039
+ "char": "t",
2040
+ "description": "Validate tests by type",
2041
+ "name": "type",
2042
+ "hasDynamicHelp": false,
2043
+ "multiple": false,
2044
+ "type": "option"
1781
2045
  },
1782
- "delete-db-only": {
1783
- "description": "Delete database-only records that reference records being deleted (prevents FK errors)",
1784
- "name": "delete-db-only",
2046
+ "save-report": {
2047
+ "description": "Save validation report to file",
2048
+ "name": "save-report",
1785
2049
  "allowNo": false,
1786
2050
  "type": "boolean"
1787
2051
  },
1788
- "parallel-batch-size": {
1789
- "description": "Number of records to process in parallel (default: 10)",
1790
- "name": "parallel-batch-size",
1791
- "default": 10,
2052
+ "format": {
2053
+ "char": "f",
2054
+ "description": "Output format",
2055
+ "name": "format",
2056
+ "default": "console",
1792
2057
  "hasDynamicHelp": false,
1793
2058
  "multiple": false,
2059
+ "options": [
2060
+ "console",
2061
+ "json",
2062
+ "markdown"
2063
+ ],
1794
2064
  "type": "option"
1795
2065
  },
1796
- "include": {
1797
- "description": "Only process these directories (comma-separated, supports patterns)",
1798
- "name": "include",
2066
+ "output": {
2067
+ "char": "o",
2068
+ "description": "Output file path",
2069
+ "name": "output",
1799
2070
  "hasDynamicHelp": false,
1800
2071
  "multiple": false,
1801
2072
  "type": "option"
1802
2073
  },
1803
- "exclude": {
1804
- "description": "Skip these directories (comma-separated, supports patterns)",
1805
- "name": "exclude",
1806
- "hasDynamicHelp": false,
1807
- "multiple": false,
1808
- "type": "option"
2074
+ "verbose": {
2075
+ "char": "v",
2076
+ "description": "Show detailed information",
2077
+ "name": "verbose",
2078
+ "allowNo": false,
2079
+ "type": "boolean"
1809
2080
  }
1810
2081
  },
1811
2082
  "hasDynamicHelp": false,
1812
2083
  "hiddenAliases": [],
1813
- "id": "sync:push",
2084
+ "id": "test:validate",
1814
2085
  "pluginAlias": "@memberjunction/cli",
1815
2086
  "pluginName": "@memberjunction/cli",
1816
2087
  "pluginType": "core",
@@ -1820,44 +2091,34 @@
1820
2091
  "relativePath": [
1821
2092
  "dist",
1822
2093
  "commands",
1823
- "sync",
1824
- "push.js"
2094
+ "test",
2095
+ "validate.js"
1825
2096
  ]
1826
2097
  },
1827
- "sync:status": {
2098
+ "dbdoc:analyze": {
1828
2099
  "aliases": [],
1829
2100
  "args": {},
1830
- "description": "Show status of local files vs database",
2101
+ "description": "Analyze database and generate documentation (delegates to db-auto-doc analyze)",
1831
2102
  "examples": [
1832
2103
  "<%= config.bin %> <%= command.id %>",
1833
- "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
1834
- "<%= config.bin %> <%= command.id %> --verbose"
2104
+ "<%= config.bin %> <%= command.id %> --resume ./output/run-6/state.json",
2105
+ "<%= config.bin %> <%= command.id %> --config ./my-config.json"
1835
2106
  ],
1836
2107
  "flags": {
1837
- "dir": {
1838
- "description": "Specific entity directory to check status",
1839
- "name": "dir",
1840
- "hasDynamicHelp": false,
1841
- "multiple": false,
1842
- "type": "option"
1843
- },
1844
- "verbose": {
1845
- "char": "v",
1846
- "description": "Show detailed field-level differences",
1847
- "name": "verbose",
1848
- "allowNo": false,
1849
- "type": "boolean"
1850
- },
1851
- "include": {
1852
- "description": "Only process these directories (comma-separated, supports patterns)",
1853
- "name": "include",
2108
+ "resume": {
2109
+ "char": "r",
2110
+ "description": "Resume from an existing state file",
2111
+ "name": "resume",
2112
+ "required": false,
1854
2113
  "hasDynamicHelp": false,
1855
2114
  "multiple": false,
1856
2115
  "type": "option"
1857
2116
  },
1858
- "exclude": {
1859
- "description": "Skip these directories (comma-separated, supports patterns)",
1860
- "name": "exclude",
2117
+ "config": {
2118
+ "char": "c",
2119
+ "description": "Path to config file",
2120
+ "name": "config",
2121
+ "default": "./config.json",
1861
2122
  "hasDynamicHelp": false,
1862
2123
  "multiple": false,
1863
2124
  "type": "option"
@@ -1865,7 +2126,7 @@
1865
2126
  },
1866
2127
  "hasDynamicHelp": false,
1867
2128
  "hiddenAliases": [],
1868
- "id": "sync:status",
2129
+ "id": "dbdoc:analyze",
1869
2130
  "pluginAlias": "@memberjunction/cli",
1870
2131
  "pluginName": "@memberjunction/cli",
1871
2132
  "pluginType": "core",
@@ -1875,107 +2136,105 @@
1875
2136
  "relativePath": [
1876
2137
  "dist",
1877
2138
  "commands",
1878
- "sync",
1879
- "status.js"
2139
+ "dbdoc",
2140
+ "analyze.js"
1880
2141
  ]
1881
2142
  },
1882
- "sync:validate": {
2143
+ "dbdoc:export-sample-queries": {
1883
2144
  "aliases": [],
1884
2145
  "args": {},
1885
- "description": "Validate metadata files",
2146
+ "description": "Export sample queries to MemberJunction metadata format (delegates to db-auto-doc export-sample-queries)",
1886
2147
  "examples": [
1887
- "<%= config.bin %> <%= command.id %>",
1888
- "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
1889
- "<%= config.bin %> <%= command.id %> --save-report",
1890
- "<%= config.bin %> <%= command.id %> --verbose"
2148
+ "<%= config.bin %> <%= command.id %> --input ./output/sample-queries.json --output ./metadata/queries/.queries.json",
2149
+ "<%= config.bin %> <%= command.id %> --input ./sample-queries.json --output ./metadata/queries/.queries.json --separate-sql-files",
2150
+ "<%= config.bin %> <%= command.id %> --input ./sample-queries.json --output ./queries/.queries.json --category \"Database Documentation\"",
2151
+ "<%= config.bin %> <%= command.id %> --input ./sample-queries.json --output ./queries/.queries.json --status Pending --min-confidence 0.8"
1891
2152
  ],
1892
2153
  "flags": {
1893
- "dir": {
1894
- "description": "Specific entity directory to validate",
1895
- "name": "dir",
2154
+ "input": {
2155
+ "char": "i",
2156
+ "description": "Path to sample-queries.json file generated by generate-queries command",
2157
+ "name": "input",
2158
+ "required": true,
1896
2159
  "hasDynamicHelp": false,
1897
2160
  "multiple": false,
1898
2161
  "type": "option"
1899
2162
  },
1900
- "verbose": {
1901
- "char": "v",
1902
- "description": "Show detailed validation output",
1903
- "name": "verbose",
1904
- "allowNo": false,
1905
- "type": "boolean"
2163
+ "output": {
2164
+ "char": "o",
2165
+ "description": "Output path for the .queries.json metadata file",
2166
+ "name": "output",
2167
+ "required": true,
2168
+ "hasDynamicHelp": false,
2169
+ "multiple": false,
2170
+ "type": "option"
1906
2171
  },
1907
- "save-report": {
1908
- "description": "Save validation report as markdown file",
1909
- "name": "save-report",
2172
+ "separate-sql-files": {
2173
+ "description": "Write SQL to separate files and use @file: references",
2174
+ "name": "separate-sql-files",
1910
2175
  "allowNo": false,
1911
2176
  "type": "boolean"
1912
2177
  },
1913
- "output": {
1914
- "description": "Output file path for validation report (default: validation-report.md)",
1915
- "name": "output",
2178
+ "sql-dir": {
2179
+ "description": "Directory for SQL files when using --separate-sql-files (relative to output file)",
2180
+ "name": "sql-dir",
2181
+ "default": "SQL",
1916
2182
  "hasDynamicHelp": false,
1917
2183
  "multiple": false,
1918
2184
  "type": "option"
1919
- }
1920
- },
1921
- "hasDynamicHelp": false,
1922
- "hiddenAliases": [],
1923
- "id": "sync:validate",
1924
- "pluginAlias": "@memberjunction/cli",
1925
- "pluginName": "@memberjunction/cli",
1926
- "pluginType": "core",
1927
- "strict": true,
1928
- "enableJsonFlag": false,
1929
- "isESM": true,
1930
- "relativePath": [
1931
- "dist",
1932
- "commands",
1933
- "sync",
1934
- "validate.js"
1935
- ]
1936
- },
1937
- "sync:watch": {
1938
- "aliases": [],
1939
- "args": {},
1940
- "description": "Watch for file changes and sync automatically",
1941
- "examples": [
1942
- "<%= config.bin %> <%= command.id %>",
1943
- "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
1944
- "<%= config.bin %> <%= command.id %> --debounce=1000",
1945
- "<%= config.bin %> <%= command.id %> --no-validate"
1946
- ],
1947
- "flags": {
1948
- "dir": {
1949
- "description": "Specific entity directory to watch",
1950
- "name": "dir",
2185
+ },
2186
+ "category": {
2187
+ "description": "Category name for @lookup reference (e.g., \"Database Documentation\")",
2188
+ "name": "category",
2189
+ "required": false,
1951
2190
  "hasDynamicHelp": false,
1952
2191
  "multiple": false,
1953
2192
  "type": "option"
1954
2193
  },
1955
- "debounce": {
1956
- "description": "Debounce delay in milliseconds (default: 500)",
1957
- "name": "debounce",
2194
+ "status": {
2195
+ "description": "Status to assign to exported queries",
2196
+ "name": "status",
2197
+ "default": "Pending",
2198
+ "hasDynamicHelp": false,
2199
+ "multiple": false,
2200
+ "options": [
2201
+ "Approved",
2202
+ "Pending",
2203
+ "Rejected",
2204
+ "Expired"
2205
+ ],
2206
+ "type": "option"
2207
+ },
2208
+ "min-confidence": {
2209
+ "description": "Minimum confidence threshold to export (0-1)",
2210
+ "name": "min-confidence",
2211
+ "default": "0",
1958
2212
  "hasDynamicHelp": false,
1959
2213
  "multiple": false,
1960
2214
  "type": "option"
1961
2215
  },
1962
- "no-validate": {
1963
- "description": "Skip validation before sync",
1964
- "name": "no-validate",
2216
+ "validated-only": {
2217
+ "description": "Only export queries that were successfully validated",
2218
+ "name": "validated-only",
1965
2219
  "allowNo": false,
1966
2220
  "type": "boolean"
1967
2221
  },
1968
- "verbose": {
1969
- "char": "v",
1970
- "description": "Show detailed output",
1971
- "name": "verbose",
2222
+ "append": {
2223
+ "description": "Append to existing metadata file instead of overwriting",
2224
+ "name": "append",
2225
+ "allowNo": false,
2226
+ "type": "boolean"
2227
+ },
2228
+ "include-primary-key": {
2229
+ "description": "Include primaryKey and sync fields (for updating existing records)",
2230
+ "name": "include-primary-key",
1972
2231
  "allowNo": false,
1973
2232
  "type": "boolean"
1974
2233
  }
1975
2234
  },
1976
2235
  "hasDynamicHelp": false,
1977
2236
  "hiddenAliases": [],
1978
- "id": "sync:watch",
2237
+ "id": "dbdoc:export-sample-queries",
1979
2238
  "pluginAlias": "@memberjunction/cli",
1980
2239
  "pluginName": "@memberjunction/cli",
1981
2240
  "pluginType": "core",
@@ -1985,86 +2244,100 @@
1985
2244
  "relativePath": [
1986
2245
  "dist",
1987
2246
  "commands",
1988
- "sync",
1989
- "watch.js"
2247
+ "dbdoc",
2248
+ "export-sample-queries.js"
1990
2249
  ]
1991
2250
  },
1992
- "test:compare": {
2251
+ "dbdoc:export": {
1993
2252
  "aliases": [],
1994
- "args": {
1995
- "runId1": {
1996
- "description": "First test run ID to compare",
1997
- "name": "runId1",
1998
- "required": false
1999
- },
2000
- "runId2": {
2001
- "description": "Second test run ID to compare",
2002
- "name": "runId2",
2003
- "required": false
2004
- }
2005
- },
2006
- "description": "Compare test runs for regression detection",
2253
+ "args": {},
2254
+ "description": "Export documentation in multiple formats (delegates to db-auto-doc export)",
2007
2255
  "examples": [
2008
- "<%= config.bin %> <%= command.id %> <run-id-1> <run-id-2>",
2009
- "<%= config.bin %> <%= command.id %> --baseline=<run-id> --current=<run-id>",
2010
- "<%= config.bin %> <%= command.id %> --suite=<suite-id> --since=\"2024-01-01\"",
2011
- "<%= config.bin %> <%= command.id %> <run-id-1> <run-id-2> --format=json"
2256
+ "<%= config.bin %> <%= command.id %> --state-file=./db-doc-state.json",
2257
+ "<%= config.bin %> <%= command.id %> --sql",
2258
+ "<%= config.bin %> <%= command.id %> --markdown",
2259
+ "<%= config.bin %> <%= command.id %> --html",
2260
+ "<%= config.bin %> <%= command.id %> --csv",
2261
+ "<%= config.bin %> <%= command.id %> --mermaid",
2262
+ "<%= config.bin %> <%= command.id %> --sql --markdown --html --csv --mermaid --apply"
2012
2263
  ],
2013
2264
  "flags": {
2014
- "version": {
2015
- "char": "v",
2016
- "description": "Compare runs by version",
2017
- "name": "version",
2265
+ "state-file": {
2266
+ "char": "s",
2267
+ "description": "Path to state JSON file",
2268
+ "name": "state-file",
2018
2269
  "hasDynamicHelp": false,
2019
- "multiple": true,
2270
+ "multiple": false,
2020
2271
  "type": "option"
2021
2272
  },
2022
- "commit": {
2023
- "char": "c",
2024
- "description": "Compare runs by git commit",
2025
- "name": "commit",
2273
+ "output-dir": {
2274
+ "char": "o",
2275
+ "description": "Output directory for generated files",
2276
+ "name": "output-dir",
2026
2277
  "hasDynamicHelp": false,
2027
- "multiple": true,
2278
+ "multiple": false,
2028
2279
  "type": "option"
2029
2280
  },
2030
- "diff-only": {
2031
- "description": "Show only differences",
2032
- "name": "diff-only",
2281
+ "sql": {
2282
+ "description": "Generate SQL script",
2283
+ "name": "sql",
2033
2284
  "allowNo": false,
2034
2285
  "type": "boolean"
2035
2286
  },
2036
- "format": {
2037
- "char": "f",
2038
- "description": "Output format",
2039
- "name": "format",
2040
- "default": "console",
2041
- "hasDynamicHelp": false,
2042
- "multiple": false,
2043
- "options": [
2044
- "console",
2045
- "json",
2046
- "markdown"
2047
- ],
2048
- "type": "option"
2287
+ "markdown": {
2288
+ "description": "Generate Markdown documentation",
2289
+ "name": "markdown",
2290
+ "allowNo": false,
2291
+ "type": "boolean"
2049
2292
  },
2050
- "output": {
2051
- "char": "o",
2052
- "description": "Output file path",
2053
- "name": "output",
2054
- "hasDynamicHelp": false,
2055
- "multiple": false,
2056
- "type": "option"
2293
+ "html": {
2294
+ "description": "Generate interactive HTML documentation",
2295
+ "name": "html",
2296
+ "allowNo": false,
2297
+ "type": "boolean"
2057
2298
  },
2058
- "verbose": {
2059
- "description": "Show detailed information",
2060
- "name": "verbose",
2299
+ "csv": {
2300
+ "description": "Generate CSV exports (tables and columns)",
2301
+ "name": "csv",
2302
+ "allowNo": false,
2303
+ "type": "boolean"
2304
+ },
2305
+ "mermaid": {
2306
+ "description": "Generate Mermaid ERD diagram files",
2307
+ "name": "mermaid",
2308
+ "allowNo": false,
2309
+ "type": "boolean"
2310
+ },
2311
+ "report": {
2312
+ "description": "Generate analysis report",
2313
+ "name": "report",
2314
+ "allowNo": false,
2315
+ "type": "boolean"
2316
+ },
2317
+ "apply": {
2318
+ "description": "Apply SQL to database",
2319
+ "name": "apply",
2320
+ "allowNo": false,
2321
+ "type": "boolean"
2322
+ },
2323
+ "approved-only": {
2324
+ "description": "Only export approved items",
2325
+ "name": "approved-only",
2061
2326
  "allowNo": false,
2062
2327
  "type": "boolean"
2328
+ },
2329
+ "confidence-threshold": {
2330
+ "description": "Minimum confidence threshold",
2331
+ "name": "confidence-threshold",
2332
+ "default": "0",
2333
+ "hasDynamicHelp": false,
2334
+ "multiple": false,
2335
+ "type": "option"
2063
2336
  }
2064
2337
  },
2065
2338
  "hasDynamicHelp": false,
2066
2339
  "hiddenAliases": [],
2067
- "id": "test:compare",
2340
+ "id": "dbdoc:export",
2068
2341
  "pluginAlias": "@memberjunction/cli",
2069
2342
  "pluginName": "@memberjunction/cli",
2070
2343
  "pluginType": "core",
@@ -2074,86 +2347,65 @@
2074
2347
  "relativePath": [
2075
2348
  "dist",
2076
2349
  "commands",
2077
- "test",
2078
- "compare.js"
2350
+ "dbdoc",
2351
+ "export.js"
2079
2352
  ]
2080
2353
  },
2081
- "test:history": {
2354
+ "dbdoc:generate-queries": {
2082
2355
  "aliases": [],
2083
2356
  "args": {},
2084
- "description": "View test execution history",
2357
+ "description": "Generate sample SQL queries from existing analysis state (delegates to db-auto-doc generate-queries)",
2085
2358
  "examples": [
2086
- "<%= config.bin %> <%= command.id %>",
2087
- "<%= config.bin %> <%= command.id %> --test=<test-id>",
2088
- "<%= config.bin %> <%= command.id %> --suite=<suite-id>",
2089
- "<%= config.bin %> <%= command.id %> --since=\"2024-01-01\"",
2090
- "<%= config.bin %> <%= command.id %> --limit=50"
2359
+ "<%= config.bin %> <%= command.id %> --from-state ./output/run-1/state.json",
2360
+ "<%= config.bin %> <%= command.id %> --from-state ./output/run-1/state.json --output-dir ./queries",
2361
+ "<%= config.bin %> <%= command.id %> --from-state ./output/run-1/state.json --queries-per-table 10"
2091
2362
  ],
2092
2363
  "flags": {
2093
- "test": {
2094
- "char": "t",
2095
- "description": "Filter by test ID",
2096
- "name": "test",
2364
+ "from-state": {
2365
+ "description": "Path to existing state.json file from previous analysis",
2366
+ "name": "from-state",
2367
+ "required": true,
2097
2368
  "hasDynamicHelp": false,
2098
2369
  "multiple": false,
2099
2370
  "type": "option"
2100
2371
  },
2101
- "recent": {
2102
- "char": "r",
2103
- "description": "Number of recent runs to show",
2104
- "name": "recent",
2372
+ "output-dir": {
2373
+ "description": "Output directory for generated queries",
2374
+ "name": "output-dir",
2375
+ "required": false,
2105
2376
  "hasDynamicHelp": false,
2106
2377
  "multiple": false,
2107
2378
  "type": "option"
2108
2379
  },
2109
- "from": {
2110
- "description": "Show history from date (YYYY-MM-DD)",
2111
- "name": "from",
2380
+ "config": {
2381
+ "char": "c",
2382
+ "description": "Path to config file (for database connection and AI settings)",
2383
+ "name": "config",
2384
+ "default": "./config.json",
2112
2385
  "hasDynamicHelp": false,
2113
2386
  "multiple": false,
2114
2387
  "type": "option"
2115
2388
  },
2116
- "status": {
2117
- "char": "s",
2118
- "description": "Filter by status",
2119
- "name": "status",
2389
+ "queries-per-table": {
2390
+ "description": "Number of queries to generate per table",
2391
+ "name": "queries-per-table",
2392
+ "required": false,
2120
2393
  "hasDynamicHelp": false,
2121
2394
  "multiple": false,
2122
2395
  "type": "option"
2123
2396
  },
2124
- "format": {
2125
- "char": "f",
2126
- "description": "Output format",
2127
- "name": "format",
2128
- "default": "console",
2129
- "hasDynamicHelp": false,
2130
- "multiple": false,
2131
- "options": [
2132
- "console",
2133
- "json",
2134
- "markdown"
2135
- ],
2136
- "type": "option"
2137
- },
2138
- "output": {
2139
- "char": "o",
2140
- "description": "Output file path",
2141
- "name": "output",
2397
+ "max-execution-time": {
2398
+ "description": "Maximum execution time for query validation (ms)",
2399
+ "name": "max-execution-time",
2400
+ "required": false,
2142
2401
  "hasDynamicHelp": false,
2143
2402
  "multiple": false,
2144
2403
  "type": "option"
2145
- },
2146
- "verbose": {
2147
- "char": "v",
2148
- "description": "Show detailed information",
2149
- "name": "verbose",
2150
- "allowNo": false,
2151
- "type": "boolean"
2152
2404
  }
2153
2405
  },
2154
2406
  "hasDynamicHelp": false,
2155
2407
  "hiddenAliases": [],
2156
- "id": "test:history",
2408
+ "id": "dbdoc:generate-queries",
2157
2409
  "pluginAlias": "@memberjunction/cli",
2158
2410
  "pluginName": "@memberjunction/cli",
2159
2411
  "pluginType": "core",
@@ -2163,26 +2415,19 @@
2163
2415
  "relativePath": [
2164
2416
  "dist",
2165
2417
  "commands",
2166
- "test",
2167
- "history.js"
2418
+ "dbdoc",
2419
+ "generate-queries.js"
2168
2420
  ]
2169
2421
  },
2170
- "test": {
2422
+ "dbdoc": {
2171
2423
  "aliases": [],
2172
2424
  "args": {},
2173
- "description": "MemberJunction Testing Framework - Execute and manage tests",
2174
- "examples": [
2175
- "<%= config.bin %> <%= command.id %> run <test-id>",
2176
- "<%= config.bin %> <%= command.id %> run --name=\"Active Members Count\"",
2177
- "<%= config.bin %> <%= command.id %> suite <suite-id>",
2178
- "<%= config.bin %> <%= command.id %> list",
2179
- "<%= config.bin %> <%= command.id %> list --suites",
2180
- "<%= config.bin %> <%= command.id %> validate --all"
2181
- ],
2425
+ "description": "AI-powered database documentation generator",
2182
2426
  "flags": {},
2183
2427
  "hasDynamicHelp": false,
2428
+ "hidden": false,
2184
2429
  "hiddenAliases": [],
2185
- "id": "test",
2430
+ "id": "dbdoc",
2186
2431
  "pluginAlias": "@memberjunction/cli",
2187
2432
  "pluginName": "@memberjunction/cli",
2188
2433
  "pluginType": "core",
@@ -2192,177 +2437,21 @@
2192
2437
  "relativePath": [
2193
2438
  "dist",
2194
2439
  "commands",
2195
- "test",
2440
+ "dbdoc",
2196
2441
  "index.js"
2197
2442
  ]
2198
2443
  },
2199
- "test:list": {
2444
+ "dbdoc:init": {
2200
2445
  "aliases": [],
2201
2446
  "args": {},
2202
- "description": "List available tests, suites, and types",
2203
- "examples": [
2204
- "<%= config.bin %> <%= command.id %>",
2205
- "<%= config.bin %> <%= command.id %> --suites",
2206
- "<%= config.bin %> <%= command.id %> --types",
2207
- "<%= config.bin %> <%= command.id %> --type=agent-eval",
2208
- "<%= config.bin %> <%= command.id %> --tag=smoke",
2209
- "<%= config.bin %> <%= command.id %> --status=active --verbose"
2210
- ],
2211
- "flags": {
2212
- "suites": {
2213
- "description": "List test suites instead of tests",
2214
- "name": "suites",
2215
- "allowNo": false,
2216
- "type": "boolean"
2217
- },
2218
- "types": {
2219
- "description": "List test types",
2220
- "name": "types",
2221
- "allowNo": false,
2222
- "type": "boolean"
2223
- },
2224
- "type": {
2225
- "char": "t",
2226
- "description": "Filter by test type",
2227
- "name": "type",
2228
- "hasDynamicHelp": false,
2229
- "multiple": false,
2230
- "type": "option"
2231
- },
2232
- "tag": {
2233
- "description": "Filter by tag",
2234
- "name": "tag",
2235
- "hasDynamicHelp": false,
2236
- "multiple": false,
2237
- "type": "option"
2238
- },
2239
- "status": {
2240
- "char": "s",
2241
- "description": "Filter by status",
2242
- "name": "status",
2243
- "hasDynamicHelp": false,
2244
- "multiple": false,
2245
- "type": "option"
2246
- },
2247
- "format": {
2248
- "char": "f",
2249
- "description": "Output format",
2250
- "name": "format",
2251
- "default": "console",
2252
- "hasDynamicHelp": false,
2253
- "multiple": false,
2254
- "options": [
2255
- "console",
2256
- "json",
2257
- "markdown"
2258
- ],
2259
- "type": "option"
2260
- },
2261
- "output": {
2262
- "char": "o",
2263
- "description": "Output file path",
2264
- "name": "output",
2265
- "hasDynamicHelp": false,
2266
- "multiple": false,
2267
- "type": "option"
2268
- },
2269
- "verbose": {
2270
- "char": "v",
2271
- "description": "Show detailed information",
2272
- "name": "verbose",
2273
- "allowNo": false,
2274
- "type": "boolean"
2275
- }
2276
- },
2277
- "hasDynamicHelp": false,
2278
- "hiddenAliases": [],
2279
- "id": "test:list",
2280
- "pluginAlias": "@memberjunction/cli",
2281
- "pluginName": "@memberjunction/cli",
2282
- "pluginType": "core",
2283
- "strict": true,
2284
- "enableJsonFlag": false,
2285
- "isESM": true,
2286
- "relativePath": [
2287
- "dist",
2288
- "commands",
2289
- "test",
2290
- "list.js"
2291
- ]
2292
- },
2293
- "test:run": {
2294
- "aliases": [],
2295
- "args": {
2296
- "testId": {
2297
- "description": "Test ID to execute",
2298
- "name": "testId",
2299
- "required": false
2300
- }
2301
- },
2302
- "description": "Execute a single test by ID or name",
2447
+ "description": "Initialize DBAutoDoc project (delegates to db-auto-doc init)",
2303
2448
  "examples": [
2304
- "<%= config.bin %> <%= command.id %> <test-id>",
2305
- "<%= config.bin %> <%= command.id %> --name=\"Active Members Count\"",
2306
- "<%= config.bin %> <%= command.id %> <test-id> --environment=staging",
2307
- "<%= config.bin %> <%= command.id %> <test-id> --format=json --output=results.json",
2308
- "<%= config.bin %> <%= command.id %> <test-id> --dry-run"
2449
+ "<%= config.bin %> <%= command.id %>"
2309
2450
  ],
2310
- "flags": {
2311
- "name": {
2312
- "char": "n",
2313
- "description": "Test name to execute",
2314
- "name": "name",
2315
- "hasDynamicHelp": false,
2316
- "multiple": false,
2317
- "type": "option"
2318
- },
2319
- "environment": {
2320
- "char": "e",
2321
- "description": "Environment context (dev, staging, prod)",
2322
- "name": "environment",
2323
- "hasDynamicHelp": false,
2324
- "multiple": false,
2325
- "type": "option"
2326
- },
2327
- "format": {
2328
- "char": "f",
2329
- "description": "Output format",
2330
- "name": "format",
2331
- "default": "console",
2332
- "hasDynamicHelp": false,
2333
- "multiple": false,
2334
- "options": [
2335
- "console",
2336
- "json",
2337
- "markdown"
2338
- ],
2339
- "type": "option"
2340
- },
2341
- "output": {
2342
- "char": "o",
2343
- "description": "Output file path",
2344
- "name": "output",
2345
- "hasDynamicHelp": false,
2346
- "multiple": false,
2347
- "type": "option"
2348
- },
2349
- "dry-run": {
2350
- "description": "Validate without executing",
2351
- "name": "dry-run",
2352
- "allowNo": false,
2353
- "type": "boolean"
2354
- },
2355
- "verbose": {
2356
- "char": "v",
2357
- "description": "Show detailed execution information",
2358
- "name": "verbose",
2359
- "allowNo": false,
2360
- "type": "boolean"
2361
- }
2362
- },
2451
+ "flags": {},
2363
2452
  "hasDynamicHelp": false,
2364
2453
  "hiddenAliases": [],
2365
- "id": "test:run",
2454
+ "id": "dbdoc:init",
2366
2455
  "pluginAlias": "@memberjunction/cli",
2367
2456
  "pluginName": "@memberjunction/cli",
2368
2457
  "pluginType": "core",
@@ -2372,68 +2461,30 @@
2372
2461
  "relativePath": [
2373
2462
  "dist",
2374
2463
  "commands",
2375
- "test",
2376
- "run.js"
2464
+ "dbdoc",
2465
+ "init.js"
2377
2466
  ]
2378
2467
  },
2379
- "test:suite": {
2468
+ "dbdoc:reset": {
2380
2469
  "aliases": [],
2381
- "args": {
2382
- "suiteId": {
2383
- "description": "Test suite ID to execute",
2384
- "name": "suiteId",
2385
- "required": false
2386
- }
2387
- },
2388
- "description": "Execute a test suite",
2470
+ "args": {},
2471
+ "description": "Reset analysis state (delegates to db-auto-doc reset)",
2389
2472
  "examples": [
2390
- "<%= config.bin %> <%= command.id %> <suite-id>",
2391
- "<%= config.bin %> <%= command.id %> --name=\"Agent Quality Suite\"",
2392
- "<%= config.bin %> <%= command.id %> <suite-id> --format=json",
2393
- "<%= config.bin %> <%= command.id %> <suite-id> --output=suite-results.json"
2473
+ "<%= config.bin %> <%= command.id %>",
2474
+ "<%= config.bin %> <%= command.id %> --force"
2394
2475
  ],
2395
2476
  "flags": {
2396
- "name": {
2397
- "char": "n",
2398
- "description": "Test suite name to execute",
2399
- "name": "name",
2400
- "hasDynamicHelp": false,
2401
- "multiple": false,
2402
- "type": "option"
2403
- },
2404
- "format": {
2477
+ "force": {
2405
2478
  "char": "f",
2406
- "description": "Output format",
2407
- "name": "format",
2408
- "default": "console",
2409
- "hasDynamicHelp": false,
2410
- "multiple": false,
2411
- "options": [
2412
- "console",
2413
- "json",
2414
- "markdown"
2415
- ],
2416
- "type": "option"
2417
- },
2418
- "output": {
2419
- "char": "o",
2420
- "description": "Output file path",
2421
- "name": "output",
2422
- "hasDynamicHelp": false,
2423
- "multiple": false,
2424
- "type": "option"
2425
- },
2426
- "verbose": {
2427
- "char": "v",
2428
- "description": "Show detailed execution information",
2429
- "name": "verbose",
2479
+ "description": "Force reset without confirmation",
2480
+ "name": "force",
2430
2481
  "allowNo": false,
2431
2482
  "type": "boolean"
2432
2483
  }
2433
2484
  },
2434
2485
  "hasDynamicHelp": false,
2435
2486
  "hiddenAliases": [],
2436
- "id": "test:suite",
2487
+ "id": "dbdoc:reset",
2437
2488
  "pluginAlias": "@memberjunction/cli",
2438
2489
  "pluginName": "@memberjunction/cli",
2439
2490
  "pluginType": "core",
@@ -2443,82 +2494,31 @@
2443
2494
  "relativePath": [
2444
2495
  "dist",
2445
2496
  "commands",
2446
- "test",
2447
- "suite.js"
2497
+ "dbdoc",
2498
+ "reset.js"
2448
2499
  ]
2449
2500
  },
2450
- "test:validate": {
2501
+ "dbdoc:status": {
2451
2502
  "aliases": [],
2452
- "args": {
2453
- "testId": {
2454
- "description": "Test ID to validate",
2455
- "name": "testId",
2456
- "required": false
2457
- }
2458
- },
2459
- "description": "Validate test definitions without executing",
2503
+ "args": {},
2504
+ "description": "Show analysis status and progress (delegates to db-auto-doc status)",
2460
2505
  "examples": [
2461
- "<%= config.bin %> <%= command.id %> <test-id>",
2462
- "<%= config.bin %> <%= command.id %> --all",
2463
- "<%= config.bin %> <%= command.id %> --type=agent-eval",
2464
- "<%= config.bin %> <%= command.id %> --all --save-report",
2465
- "<%= config.bin %> <%= command.id %> --all --output=validation-report.md"
2506
+ "<%= config.bin %> <%= command.id %>",
2507
+ "<%= config.bin %> <%= command.id %> --state-file ./custom-state.json"
2466
2508
  ],
2467
2509
  "flags": {
2468
- "all": {
2469
- "char": "a",
2470
- "description": "Validate all tests",
2471
- "name": "all",
2472
- "allowNo": false,
2473
- "type": "boolean"
2474
- },
2475
- "type": {
2476
- "char": "t",
2477
- "description": "Validate tests by type",
2478
- "name": "type",
2479
- "hasDynamicHelp": false,
2480
- "multiple": false,
2481
- "type": "option"
2482
- },
2483
- "save-report": {
2484
- "description": "Save validation report to file",
2485
- "name": "save-report",
2486
- "allowNo": false,
2487
- "type": "boolean"
2488
- },
2489
- "format": {
2490
- "char": "f",
2491
- "description": "Output format",
2492
- "name": "format",
2493
- "default": "console",
2494
- "hasDynamicHelp": false,
2495
- "multiple": false,
2496
- "options": [
2497
- "console",
2498
- "json",
2499
- "markdown"
2500
- ],
2501
- "type": "option"
2502
- },
2503
- "output": {
2504
- "char": "o",
2505
- "description": "Output file path",
2506
- "name": "output",
2510
+ "state-file": {
2511
+ "char": "s",
2512
+ "description": "Path to state JSON file",
2513
+ "name": "state-file",
2507
2514
  "hasDynamicHelp": false,
2508
2515
  "multiple": false,
2509
2516
  "type": "option"
2510
- },
2511
- "verbose": {
2512
- "char": "v",
2513
- "description": "Show detailed information",
2514
- "name": "verbose",
2515
- "allowNo": false,
2516
- "type": "boolean"
2517
2517
  }
2518
2518
  },
2519
2519
  "hasDynamicHelp": false,
2520
2520
  "hiddenAliases": [],
2521
- "id": "test:validate",
2521
+ "id": "dbdoc:status",
2522
2522
  "pluginAlias": "@memberjunction/cli",
2523
2523
  "pluginName": "@memberjunction/cli",
2524
2524
  "pluginType": "core",
@@ -2528,8 +2528,8 @@
2528
2528
  "relativePath": [
2529
2529
  "dist",
2530
2530
  "commands",
2531
- "test",
2532
- "validate.js"
2531
+ "dbdoc",
2532
+ "status.js"
2533
2533
  ]
2534
2534
  },
2535
2535
  "ai:actions:list": {
@@ -3140,5 +3140,5 @@
3140
3140
  ]
3141
3141
  }
3142
3142
  },
3143
- "version": "5.2.0"
3143
+ "version": "5.3.0"
3144
3144
  }