@memberjunction/cli 6.2.0-edge.0 → 6.2.0-edge.2

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 (249) hide show
  1. package/dist/baseline/cli-helpers.d.ts +4 -0
  2. package/dist/baseline/cli-helpers.d.ts.map +1 -1
  3. package/dist/baseline/cli-helpers.js +18 -10
  4. package/dist/baseline/cli-helpers.js.map +1 -1
  5. package/dist/baseline/comparator.d.ts +5 -3
  6. package/dist/baseline/comparator.d.ts.map +1 -1
  7. package/dist/baseline/comparator.js +142 -138
  8. package/dist/baseline/comparator.js.map +1 -1
  9. package/dist/baseline/connection.d.ts +8 -6
  10. package/dist/baseline/connection.d.ts.map +1 -1
  11. package/dist/baseline/connection.js +16 -12
  12. package/dist/baseline/connection.js.map +1 -1
  13. package/dist/baseline/data-dumper.d.ts +7 -3
  14. package/dist/baseline/data-dumper.d.ts.map +1 -1
  15. package/dist/baseline/data-dumper.js +33 -25
  16. package/dist/baseline/data-dumper.js.map +1 -1
  17. package/dist/baseline/emitter.d.ts +5 -3
  18. package/dist/baseline/emitter.d.ts.map +1 -1
  19. package/dist/baseline/emitter.js +114 -110
  20. package/dist/baseline/emitter.js.map +1 -1
  21. package/dist/baseline/index.d.ts +7 -7
  22. package/dist/baseline/index.d.ts.map +1 -1
  23. package/dist/baseline/index.js +7 -7
  24. package/dist/baseline/index.js.map +1 -1
  25. package/dist/baseline/introspector-mssql.d.ts +2 -0
  26. package/dist/baseline/introspector-mssql.d.ts.map +1 -1
  27. package/dist/baseline/introspector-mssql.js +68 -64
  28. package/dist/baseline/introspector-mssql.js.map +1 -1
  29. package/dist/baseline/introspector-postgres.d.ts +2 -0
  30. package/dist/baseline/introspector-postgres.d.ts.map +1 -1
  31. package/dist/baseline/introspector-postgres.js +34 -30
  32. package/dist/baseline/introspector-postgres.js.map +1 -1
  33. package/dist/baseline/report.d.ts +4 -0
  34. package/dist/baseline/report.d.ts.map +1 -1
  35. package/dist/baseline/report.js +25 -17
  36. package/dist/baseline/report.js.map +1 -1
  37. package/dist/baseline/types.d.ts +71 -71
  38. package/dist/baseline/util.d.ts +54 -6
  39. package/dist/baseline/util.d.ts.map +1 -1
  40. package/dist/baseline/util.js +112 -36
  41. package/dist/baseline/util.js.map +1 -1
  42. package/dist/commands/agent/init.d.ts +12 -0
  43. package/dist/commands/agent/init.d.ts.map +1 -1
  44. package/dist/commands/agent/init.js +42 -8
  45. package/dist/commands/agent/init.js.map +1 -1
  46. package/dist/commands/ai/actions/list.js +7 -7
  47. package/dist/commands/ai/actions/run.js +7 -7
  48. package/dist/commands/ai/agents/list.js +7 -7
  49. package/dist/commands/ai/agents/run.js +9 -9
  50. package/dist/commands/ai/audit/agent-run.js +7 -7
  51. package/dist/commands/ai/prompts/run.js +7 -7
  52. package/dist/commands/app/check-updates.js +5 -5
  53. package/dist/commands/app/disable.js +2 -2
  54. package/dist/commands/app/enable.js +2 -2
  55. package/dist/commands/app/info.js +2 -2
  56. package/dist/commands/app/install.js +2 -2
  57. package/dist/commands/app/list.js +2 -2
  58. package/dist/commands/app/remove.js +4 -4
  59. package/dist/commands/app/upgrade.js +2 -2
  60. package/dist/commands/artifacts/reclassify.js +2 -2
  61. package/dist/commands/baseline/build.js +31 -31
  62. package/dist/commands/baseline/build.js.map +1 -1
  63. package/dist/commands/baseline/compare.js +36 -36
  64. package/dist/commands/baseline/roundtrip.js +56 -54
  65. package/dist/commands/baseline/roundtrip.js.map +1 -1
  66. package/dist/commands/bundle/index.js +4 -4
  67. package/dist/commands/clean/index.js +3 -3
  68. package/dist/commands/codegen/manifest.d.ts +2 -0
  69. package/dist/commands/codegen/manifest.d.ts.map +1 -1
  70. package/dist/commands/codegen/manifest.js +8 -4
  71. package/dist/commands/codegen/manifest.js.map +1 -1
  72. package/dist/commands/dev/workspace/index.d.ts +2 -0
  73. package/dist/commands/dev/workspace/index.d.ts.map +1 -1
  74. package/dist/commands/dev/workspace/index.js +8 -4
  75. package/dist/commands/dev/workspace/index.js.map +1 -1
  76. package/dist/commands/install/claude.d.ts +2 -0
  77. package/dist/commands/install/claude.d.ts.map +1 -1
  78. package/dist/commands/install/claude.js +11 -7
  79. package/dist/commands/install/claude.js.map +1 -1
  80. package/dist/commands/install/index.js +3 -3
  81. package/dist/commands/migrate/convert.d.ts +21 -0
  82. package/dist/commands/migrate/convert.d.ts.map +1 -1
  83. package/dist/commands/migrate/convert.js +37 -7
  84. package/dist/commands/migrate/convert.js.map +1 -1
  85. package/dist/commands/migrate/create.js +2 -2
  86. package/dist/commands/migrate/index.js +16 -16
  87. package/dist/commands/migrate/rebake.d.ts.map +1 -1
  88. package/dist/commands/migrate/rebake.js +7 -0
  89. package/dist/commands/migrate/rebake.js.map +1 -1
  90. package/dist/commands/rubric/diff.d.ts +11 -0
  91. package/dist/commands/rubric/diff.d.ts.map +1 -0
  92. package/dist/commands/rubric/diff.js +20 -0
  93. package/dist/commands/rubric/diff.js.map +1 -0
  94. package/dist/commands/rubric/evaluate.d.ts +12 -0
  95. package/dist/commands/rubric/evaluate.d.ts.map +1 -0
  96. package/dist/commands/rubric/evaluate.js +21 -0
  97. package/dist/commands/rubric/evaluate.js.map +1 -0
  98. package/dist/commands/rubric/index.d.ts +6 -0
  99. package/dist/commands/rubric/index.d.ts.map +1 -0
  100. package/dist/commands/rubric/index.js +13 -0
  101. package/dist/commands/rubric/index.js.map +1 -0
  102. package/dist/commands/rubric/list.d.ts +6 -0
  103. package/dist/commands/rubric/list.d.ts.map +1 -0
  104. package/dist/commands/rubric/list.js +14 -0
  105. package/dist/commands/rubric/list.js.map +1 -0
  106. package/dist/commands/rubric/show.d.ts +9 -0
  107. package/dist/commands/rubric/show.d.ts.map +1 -0
  108. package/dist/commands/rubric/show.js +16 -0
  109. package/dist/commands/rubric/show.js.map +1 -0
  110. package/dist/commands/rubric/validate.d.ts +9 -0
  111. package/dist/commands/rubric/validate.d.ts.map +1 -0
  112. package/dist/commands/rubric/validate.js +16 -0
  113. package/dist/commands/rubric/validate.js.map +1 -0
  114. package/dist/commands/sync/file-reset.js +2 -2
  115. package/dist/commands/sync/init.js +3 -3
  116. package/dist/commands/test/compare.js +6 -6
  117. package/dist/commands/test/history.js +6 -6
  118. package/dist/commands/test/index.d.ts.map +1 -1
  119. package/dist/commands/test/index.js +2 -0
  120. package/dist/commands/test/index.js.map +1 -1
  121. package/dist/commands/test/list.js +6 -6
  122. package/dist/commands/test/promote-criteria.d.ts +10 -0
  123. package/dist/commands/test/promote-criteria.d.ts.map +1 -0
  124. package/dist/commands/test/promote-criteria.js +25 -0
  125. package/dist/commands/test/promote-criteria.js.map +1 -0
  126. package/dist/commands/test/regression/build.js +5 -5
  127. package/dist/commands/test/regression/compare.js +3 -3
  128. package/dist/commands/test/regression/down.js +4 -4
  129. package/dist/commands/test/regression/export.js +4 -4
  130. package/dist/commands/test/regression/gen-forms.js +3 -3
  131. package/dist/commands/test/regression/remote.js +10 -10
  132. package/dist/commands/test/regression/up.js +6 -6
  133. package/dist/commands/test/report.d.ts +9 -0
  134. package/dist/commands/test/report.d.ts.map +1 -0
  135. package/dist/commands/test/report.js +18 -0
  136. package/dist/commands/test/report.js.map +1 -0
  137. package/dist/commands/test/run.d.ts +1 -0
  138. package/dist/commands/test/run.d.ts.map +1 -1
  139. package/dist/commands/test/run.js +10 -6
  140. package/dist/commands/test/run.js.map +1 -1
  141. package/dist/commands/test/suite.d.ts +1 -0
  142. package/dist/commands/test/suite.d.ts.map +1 -1
  143. package/dist/commands/test/suite.js +10 -6
  144. package/dist/commands/test/suite.js.map +1 -1
  145. package/dist/commands/test/validate.js +6 -6
  146. package/dist/commands/translate-sql/index.js +25 -25
  147. package/dist/commands/update/claude.js +7 -7
  148. package/dist/commands/usage.js +4 -4
  149. package/dist/config.d.ts +175 -1
  150. package/dist/config.d.ts.map +1 -1
  151. package/dist/config.js +23 -9
  152. package/dist/config.js.map +1 -1
  153. package/dist/hooks/postrun.js +2 -2
  154. package/dist/hooks/prerun.js +2 -2
  155. package/dist/hooks/prerun.js.map +1 -1
  156. package/dist/init-templates/citizen-builder/.env.example +6 -0
  157. package/dist/init-templates/citizen-builder/docker/Dockerfile +10 -2
  158. package/dist/init-templates/citizen-builder/docker-compose.yml +6 -0
  159. package/dist/init-templates/citizen-builder/scripts/docker-entrypoint.sh +56 -20
  160. package/dist/lib/claude-pack/ManagedBlockEditor.d.ts +6 -0
  161. package/dist/lib/claude-pack/ManagedBlockEditor.d.ts.map +1 -1
  162. package/dist/lib/claude-pack/ManagedBlockEditor.js +18 -6
  163. package/dist/lib/claude-pack/ManagedBlockEditor.js.map +1 -1
  164. package/dist/lib/claude-pack/PackFetcher.d.ts +8 -3
  165. package/dist/lib/claude-pack/PackFetcher.d.ts.map +1 -1
  166. package/dist/lib/claude-pack/PackFetcher.js +26 -18
  167. package/dist/lib/claude-pack/PackFetcher.js.map +1 -1
  168. package/dist/lib/claude-pack/PackInstaller.d.ts +6 -2
  169. package/dist/lib/claude-pack/PackInstaller.d.ts.map +1 -1
  170. package/dist/lib/claude-pack/PackInstaller.js +19 -13
  171. package/dist/lib/claude-pack/PackInstaller.js.map +1 -1
  172. package/dist/lib/claude-pack/PackMerger.d.ts +8 -0
  173. package/dist/lib/claude-pack/PackMerger.d.ts.map +1 -1
  174. package/dist/lib/claude-pack/PackMerger.js +63 -57
  175. package/dist/lib/claude-pack/PackMerger.js.map +1 -1
  176. package/dist/lib/claude-pack/PackOutputFormatter.d.ts +4 -0
  177. package/dist/lib/claude-pack/PackOutputFormatter.d.ts.map +1 -1
  178. package/dist/lib/claude-pack/PackOutputFormatter.js +10 -2
  179. package/dist/lib/claude-pack/PackOutputFormatter.js.map +1 -1
  180. package/dist/lib/claude-pack/PackPaths.d.ts +12 -0
  181. package/dist/lib/claude-pack/PackPaths.d.ts.map +1 -1
  182. package/dist/lib/claude-pack/PackPaths.js +31 -7
  183. package/dist/lib/claude-pack/PackPaths.js.map +1 -1
  184. package/dist/lib/claude-pack/PackTypes.d.ts +18 -14
  185. package/dist/lib/claude-pack/PackTypes.d.ts.map +1 -1
  186. package/dist/lib/claude-pack/PackTypes.js +11 -3
  187. package/dist/lib/claude-pack/PackTypes.js.map +1 -1
  188. package/dist/lib/claude-pack/SettingsMerger.d.ts +10 -0
  189. package/dist/lib/claude-pack/SettingsMerger.d.ts.map +1 -1
  190. package/dist/lib/claude-pack/SettingsMerger.js +36 -16
  191. package/dist/lib/claude-pack/SettingsMerger.js.map +1 -1
  192. package/dist/lib/cli-plugins.d.ts +2 -0
  193. package/dist/lib/cli-plugins.d.ts.map +1 -1
  194. package/dist/lib/cli-plugins.js +8 -4
  195. package/dist/lib/cli-plugins.js.map +1 -1
  196. package/dist/lib/db-preflight.d.ts +2 -0
  197. package/dist/lib/db-preflight.d.ts.map +1 -1
  198. package/dist/lib/db-preflight.js +12 -8
  199. package/dist/lib/db-preflight.js.map +1 -1
  200. package/dist/lib/db-version.d.ts +2 -0
  201. package/dist/lib/db-version.d.ts.map +1 -1
  202. package/dist/lib/db-version.js +5 -1
  203. package/dist/lib/db-version.js.map +1 -1
  204. package/dist/lib/derived-usage.d.ts +14 -8
  205. package/dist/lib/derived-usage.d.ts.map +1 -1
  206. package/dist/lib/derived-usage.js +30 -18
  207. package/dist/lib/derived-usage.js.map +1 -1
  208. package/dist/lib/domain-profiles.d.ts +4 -2
  209. package/dist/lib/domain-profiles.d.ts.map +1 -1
  210. package/dist/lib/domain-profiles.js +53 -49
  211. package/dist/lib/domain-profiles.js.map +1 -1
  212. package/dist/lib/domain-usage-command.js +4 -4
  213. package/dist/lib/dynamic-packages.d.ts +4 -2
  214. package/dist/lib/dynamic-packages.d.ts.map +1 -1
  215. package/dist/lib/dynamic-packages.js +9 -5
  216. package/dist/lib/dynamic-packages.js.map +1 -1
  217. package/dist/lib/format-compat.d.ts +9 -7
  218. package/dist/lib/format-compat.d.ts.map +1 -1
  219. package/dist/lib/format-compat.js +12 -8
  220. package/dist/lib/format-compat.js.map +1 -1
  221. package/dist/lib/interactive-guard.d.ts +16 -0
  222. package/dist/lib/interactive-guard.d.ts.map +1 -1
  223. package/dist/lib/interactive-guard.js +18 -6
  224. package/dist/lib/interactive-guard.js.map +1 -1
  225. package/dist/lib/migration-fetch.d.ts +16 -4
  226. package/dist/lib/migration-fetch.d.ts.map +1 -1
  227. package/dist/lib/migration-fetch.js +30 -18
  228. package/dist/lib/migration-fetch.js.map +1 -1
  229. package/dist/lib/regression/docker-helpers.d.ts +24 -0
  230. package/dist/lib/regression/docker-helpers.d.ts.map +1 -1
  231. package/dist/lib/regression/docker-helpers.js +46 -10
  232. package/dist/lib/regression/docker-helpers.js.map +1 -1
  233. package/dist/lib/usage-render.d.ts +6 -0
  234. package/dist/lib/usage-render.d.ts.map +1 -1
  235. package/dist/lib/usage-render.js +15 -3
  236. package/dist/lib/usage-render.js.map +1 -1
  237. package/dist/translate-sql/groundTruth.d.ts +3 -3
  238. package/dist/translate-sql/groundTruth.js +40 -40
  239. package/dist/translate-sql/reportGenerator.d.ts +7 -7
  240. package/dist/translate-sql/reportGenerator.js +18 -18
  241. package/dist/translate-sql/ruleTranslator.d.ts +3 -3
  242. package/dist/translate-sql/ruleTranslator.js +8 -8
  243. package/dist/translate-sql/ruleTranslator.js.map +1 -1
  244. package/dist/utils/open-app-context.d.ts +21 -0
  245. package/dist/utils/open-app-context.d.ts.map +1 -1
  246. package/dist/utils/open-app-context.js +26 -10
  247. package/dist/utils/open-app-context.js.map +1 -1
  248. package/oclif.manifest.json +1419 -1160
  249. package/package.json +22 -22
@@ -79,7 +79,7 @@
79
79
  "type": "option"
80
80
  },
81
81
  "skip-docker-check": {
82
- "description": "Skip verifying whether Docker Desktop is currently running.",
82
+ "description": "Skip the Docker availability check and assume Docker is running (the stack still starts unless --no-start is passed).",
83
83
  "name": "skip-docker-check",
84
84
  "allowNo": false,
85
85
  "type": "boolean"
@@ -521,6 +521,101 @@
521
521
  "usage.js"
522
522
  ]
523
523
  },
524
+ "artifacts:reclassify": {
525
+ "aliases": [],
526
+ "args": {},
527
+ "description": "Upgrade-recovery utility for v5.35 artifact unification. Re-evaluates rows whose TypeID is the deleted JSON fallback but whose actual content does not parse as JSON. Normally a no-op: the v5.35 backfill migration handles this automatically. This command is only relevant when the migration ran BEFORE the artifact-type metadata (Generic Text / Generic Binary) was pushed via `mj sync push`, in which case the migration prints a notice telling you to run this. Reports \"no candidates\" once everything is reconciled. Dry-run by default; --apply writes through Record Changes.",
528
+ "examples": [
529
+ "<%= config.bin %> <%= command.id %>",
530
+ "<%= config.bin %> <%= command.id %> --apply --limit 50"
531
+ ],
532
+ "flags": {
533
+ "conversation-id": {
534
+ "description": "Scope to artifacts attached to the given conversation.",
535
+ "name": "conversation-id",
536
+ "hasDynamicHelp": false,
537
+ "multiple": false,
538
+ "type": "option"
539
+ },
540
+ "since": {
541
+ "description": "Scope to artifacts created on/after this ISO date.",
542
+ "name": "since",
543
+ "hasDynamicHelp": false,
544
+ "multiple": false,
545
+ "type": "option"
546
+ },
547
+ "limit": {
548
+ "description": "Maximum number of rows to inspect.",
549
+ "name": "limit",
550
+ "default": 100,
551
+ "hasDynamicHelp": false,
552
+ "multiple": false,
553
+ "type": "option"
554
+ },
555
+ "apply": {
556
+ "description": "Write changes. Without this flag, this command only reports what it would do.",
557
+ "name": "apply",
558
+ "allowNo": false,
559
+ "type": "boolean"
560
+ },
561
+ "verbose": {
562
+ "char": "v",
563
+ "description": "Print every candidate row, not just the summary.",
564
+ "name": "verbose",
565
+ "allowNo": false,
566
+ "type": "boolean"
567
+ }
568
+ },
569
+ "hasDynamicHelp": false,
570
+ "hiddenAliases": [],
571
+ "id": "artifacts:reclassify",
572
+ "pluginAlias": "@memberjunction/cli",
573
+ "pluginName": "@memberjunction/cli",
574
+ "pluginType": "core",
575
+ "strict": true,
576
+ "enableJsonFlag": false,
577
+ "isESM": true,
578
+ "relativePath": [
579
+ "dist",
580
+ "commands",
581
+ "artifacts",
582
+ "reclassify.js"
583
+ ]
584
+ },
585
+ "artifacts:usage": {
586
+ "aliases": [],
587
+ "args": {},
588
+ "description": "Show usage, flags, examples, and runtime hints for every `mj artifacts` command.",
589
+ "flags": {
590
+ "format": {
591
+ "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
592
+ "name": "format",
593
+ "hasDynamicHelp": false,
594
+ "multiple": false,
595
+ "options": [
596
+ "text",
597
+ "json",
598
+ "md"
599
+ ],
600
+ "type": "option"
601
+ }
602
+ },
603
+ "hasDynamicHelp": false,
604
+ "hiddenAliases": [],
605
+ "id": "artifacts:usage",
606
+ "pluginAlias": "@memberjunction/cli",
607
+ "pluginName": "@memberjunction/cli",
608
+ "pluginType": "core",
609
+ "strict": true,
610
+ "enableJsonFlag": false,
611
+ "isESM": true,
612
+ "relativePath": [
613
+ "dist",
614
+ "commands",
615
+ "artifacts",
616
+ "usage.js"
617
+ ]
618
+ },
524
619
  "baseline:build": {
525
620
  "aliases": [],
526
621
  "args": {},
@@ -893,101 +988,6 @@
893
988
  "usage.js"
894
989
  ]
895
990
  },
896
- "artifacts:reclassify": {
897
- "aliases": [],
898
- "args": {},
899
- "description": "Upgrade-recovery utility for v5.35 artifact unification. Re-evaluates rows whose TypeID is the deleted JSON fallback but whose actual content does not parse as JSON. Normally a no-op: the v5.35 backfill migration handles this automatically. This command is only relevant when the migration ran BEFORE the artifact-type metadata (Generic Text / Generic Binary) was pushed via `mj sync push`, in which case the migration prints a notice telling you to run this. Reports \"no candidates\" once everything is reconciled. Dry-run by default; --apply writes through Record Changes.",
900
- "examples": [
901
- "<%= config.bin %> <%= command.id %>",
902
- "<%= config.bin %> <%= command.id %> --apply --limit 50"
903
- ],
904
- "flags": {
905
- "conversation-id": {
906
- "description": "Scope to artifacts attached to the given conversation.",
907
- "name": "conversation-id",
908
- "hasDynamicHelp": false,
909
- "multiple": false,
910
- "type": "option"
911
- },
912
- "since": {
913
- "description": "Scope to artifacts created on/after this ISO date.",
914
- "name": "since",
915
- "hasDynamicHelp": false,
916
- "multiple": false,
917
- "type": "option"
918
- },
919
- "limit": {
920
- "description": "Maximum number of rows to inspect.",
921
- "name": "limit",
922
- "default": 100,
923
- "hasDynamicHelp": false,
924
- "multiple": false,
925
- "type": "option"
926
- },
927
- "apply": {
928
- "description": "Write changes. Without this flag, this command only reports what it would do.",
929
- "name": "apply",
930
- "allowNo": false,
931
- "type": "boolean"
932
- },
933
- "verbose": {
934
- "char": "v",
935
- "description": "Print every candidate row, not just the summary.",
936
- "name": "verbose",
937
- "allowNo": false,
938
- "type": "boolean"
939
- }
940
- },
941
- "hasDynamicHelp": false,
942
- "hiddenAliases": [],
943
- "id": "artifacts:reclassify",
944
- "pluginAlias": "@memberjunction/cli",
945
- "pluginName": "@memberjunction/cli",
946
- "pluginType": "core",
947
- "strict": true,
948
- "enableJsonFlag": false,
949
- "isESM": true,
950
- "relativePath": [
951
- "dist",
952
- "commands",
953
- "artifacts",
954
- "reclassify.js"
955
- ]
956
- },
957
- "artifacts:usage": {
958
- "aliases": [],
959
- "args": {},
960
- "description": "Show usage, flags, examples, and runtime hints for every `mj artifacts` command.",
961
- "flags": {
962
- "format": {
963
- "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
964
- "name": "format",
965
- "hasDynamicHelp": false,
966
- "multiple": false,
967
- "options": [
968
- "text",
969
- "json",
970
- "md"
971
- ],
972
- "type": "option"
973
- }
974
- },
975
- "hasDynamicHelp": false,
976
- "hiddenAliases": [],
977
- "id": "artifacts:usage",
978
- "pluginAlias": "@memberjunction/cli",
979
- "pluginName": "@memberjunction/cli",
980
- "pluginType": "core",
981
- "strict": true,
982
- "enableJsonFlag": false,
983
- "isESM": true,
984
- "relativePath": [
985
- "dist",
986
- "commands",
987
- "artifacts",
988
- "usage.js"
989
- ]
990
- },
991
991
  "bump": {
992
992
  "aliases": [],
993
993
  "args": {},
@@ -1509,20 +1509,6 @@
1509
1509
  "aliases": [],
1510
1510
  "args": {},
1511
1511
  "description": "Run the full MemberJunction code generation pipeline.\n\nAnalyzes your database schema, updates MemberJunction metadata, and generates\nsynchronized code across the stack: SQL objects, TypeScript entities, Angular\nforms, GraphQL resolvers, Action subclasses, and DB schema JSON.\n\nUse --skipdb to regenerate code from existing metadata only; --skipfiles to run\ndatabase-side operations only. --force-advanced-gen re-runs the LLM-driven\nadvanced generation for ALL entities (bypasses changed-entity scoping).",
1512
- "examples": [
1513
- {
1514
- "command": "<%= config.bin %> <%= command.id %>",
1515
- "description": "Run the full code generation pipeline"
1516
- },
1517
- {
1518
- "command": "<%= config.bin %> <%= command.id %> --skipdb",
1519
- "description": "Regenerate code files without touching the database"
1520
- },
1521
- {
1522
- "command": "<%= config.bin %> <%= command.id %> --format=json",
1523
- "description": "Emit a machine-readable result for an agent"
1524
- }
1525
- ],
1526
1512
  "flags": {
1527
1513
  "format": {
1528
1514
  "description": "Output format: text (human), json (machine-readable), md (Markdown-fenced). Defaults to text on a terminal and json when stdout is piped.",
@@ -1610,6 +1596,20 @@
1610
1596
  "pluginType": "core",
1611
1597
  "strict": true,
1612
1598
  "enableJsonFlag": false,
1599
+ "Examples": [
1600
+ {
1601
+ "command": "<%= config.bin %> <%= command.id %>",
1602
+ "description": "Run the full code generation pipeline"
1603
+ },
1604
+ {
1605
+ "command": "<%= config.bin %> <%= command.id %> --skipdb",
1606
+ "description": "Regenerate code files without touching the database"
1607
+ },
1608
+ {
1609
+ "command": "<%= config.bin %> <%= command.id %> --format=json",
1610
+ "description": "Emit a machine-readable result for an agent"
1611
+ }
1612
+ ],
1613
1613
  "Usage": {
1614
1614
  "domain": "codegen",
1615
1615
  "command": "codegen",
@@ -1832,38 +1832,15 @@
1832
1832
  "usage.js"
1833
1833
  ]
1834
1834
  },
1835
- "dbdoc:analyze": {
1835
+ "dev": {
1836
1836
  "aliases": [],
1837
1837
  "args": {},
1838
- "description": "Analyze database and generate documentation (delegates to db-auto-doc analyze)",
1839
- "examples": [
1840
- "<%= config.bin %> <%= command.id %>",
1841
- "<%= config.bin %> <%= command.id %> --resume ./output/run-6/state.json",
1842
- "<%= config.bin %> <%= command.id %> --config ./my-config.json"
1843
- ],
1844
- "flags": {
1845
- "resume": {
1846
- "char": "r",
1847
- "description": "Resume from an existing state file",
1848
- "name": "resume",
1849
- "required": false,
1850
- "hasDynamicHelp": false,
1851
- "multiple": false,
1852
- "type": "option"
1853
- },
1854
- "config": {
1855
- "char": "c",
1856
- "description": "Path to config file",
1857
- "name": "config",
1858
- "default": "./config.json",
1859
- "hasDynamicHelp": false,
1860
- "multiple": false,
1861
- "type": "option"
1862
- }
1863
- },
1838
+ "description": "Local development tooling: generate, inspect, and tear down the cross-repo pnpm workspace that links sibling repo clones. Run `mj dev usage` for every command's flags, examples, and runtime hints.",
1839
+ "flags": {},
1864
1840
  "hasDynamicHelp": false,
1841
+ "hidden": false,
1865
1842
  "hiddenAliases": [],
1866
- "id": "dbdoc:analyze",
1843
+ "id": "dev",
1867
1844
  "pluginAlias": "@memberjunction/cli",
1868
1845
  "pluginName": "@memberjunction/cli",
1869
1846
  "pluginType": "core",
@@ -1873,105 +1850,31 @@
1873
1850
  "relativePath": [
1874
1851
  "dist",
1875
1852
  "commands",
1876
- "dbdoc",
1877
- "analyze.js"
1853
+ "dev",
1854
+ "index.js"
1878
1855
  ]
1879
1856
  },
1880
- "dbdoc:export-sample-queries": {
1857
+ "dev:usage": {
1881
1858
  "aliases": [],
1882
1859
  "args": {},
1883
- "description": "Export sample queries to MemberJunction metadata format (delegates to db-auto-doc export-sample-queries)",
1884
- "examples": [
1885
- "<%= config.bin %> <%= command.id %> --input ./output/sample-queries.json --output ./metadata/queries/.queries.json",
1886
- "<%= config.bin %> <%= command.id %> --input ./sample-queries.json --output ./metadata/queries/.queries.json --separate-sql-files",
1887
- "<%= config.bin %> <%= command.id %> --input ./sample-queries.json --output ./queries/.queries.json --category \"Database Documentation\"",
1888
- "<%= config.bin %> <%= command.id %> --input ./sample-queries.json --output ./queries/.queries.json --status Pending --min-confidence 0.8"
1889
- ],
1860
+ "description": "Show usage, flags, examples, and runtime hints for every `mj dev` command.",
1890
1861
  "flags": {
1891
- "input": {
1892
- "char": "i",
1893
- "description": "Path to sample-queries.json file generated by generate-queries command",
1894
- "name": "input",
1895
- "required": true,
1896
- "hasDynamicHelp": false,
1897
- "multiple": false,
1898
- "type": "option"
1899
- },
1900
- "output": {
1901
- "char": "o",
1902
- "description": "Output path for the .queries.json metadata file",
1903
- "name": "output",
1904
- "required": true,
1905
- "hasDynamicHelp": false,
1906
- "multiple": false,
1907
- "type": "option"
1908
- },
1909
- "separate-sql-files": {
1910
- "description": "Write SQL to separate files and use @file: references",
1911
- "name": "separate-sql-files",
1912
- "allowNo": false,
1913
- "type": "boolean"
1914
- },
1915
- "sql-dir": {
1916
- "description": "Directory for SQL files when using --separate-sql-files (relative to output file)",
1917
- "name": "sql-dir",
1918
- "default": "SQL",
1919
- "hasDynamicHelp": false,
1920
- "multiple": false,
1921
- "type": "option"
1922
- },
1923
- "category": {
1924
- "description": "Category name for @lookup reference (e.g., \"Database Documentation\")",
1925
- "name": "category",
1926
- "required": false,
1927
- "hasDynamicHelp": false,
1928
- "multiple": false,
1929
- "type": "option"
1930
- },
1931
- "status": {
1932
- "description": "Status to assign to exported queries",
1933
- "name": "status",
1934
- "default": "Pending",
1862
+ "format": {
1863
+ "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
1864
+ "name": "format",
1935
1865
  "hasDynamicHelp": false,
1936
1866
  "multiple": false,
1937
1867
  "options": [
1938
- "Approved",
1939
- "Pending",
1940
- "Rejected",
1941
- "Expired"
1868
+ "text",
1869
+ "json",
1870
+ "md"
1942
1871
  ],
1943
1872
  "type": "option"
1944
- },
1945
- "min-confidence": {
1946
- "description": "Minimum confidence threshold to export (0-1)",
1947
- "name": "min-confidence",
1948
- "default": "0",
1949
- "hasDynamicHelp": false,
1950
- "multiple": false,
1951
- "type": "option"
1952
- },
1953
- "validated-only": {
1954
- "description": "Only export queries that were successfully validated",
1955
- "name": "validated-only",
1956
- "allowNo": false,
1957
- "type": "boolean"
1958
- },
1959
- "append": {
1960
- "description": "Append to existing metadata file instead of overwriting",
1961
- "name": "append",
1962
- "allowNo": false,
1963
- "type": "boolean"
1964
- },
1965
- "include-primary-key": {
1966
- "description": "Include primaryKey and sync fields (for updating existing records)",
1967
- "name": "include-primary-key",
1968
- "allowNo": false,
1969
- "type": "boolean"
1970
1873
  }
1971
1874
  },
1972
1875
  "hasDynamicHelp": false,
1973
1876
  "hiddenAliases": [],
1974
- "id": "dbdoc:export-sample-queries",
1877
+ "id": "dev:usage",
1975
1878
  "pluginAlias": "@memberjunction/cli",
1976
1879
  "pluginName": "@memberjunction/cli",
1977
1880
  "pluginType": "core",
@@ -1981,100 +1884,87 @@
1981
1884
  "relativePath": [
1982
1885
  "dist",
1983
1886
  "commands",
1984
- "dbdoc",
1985
- "export-sample-queries.js"
1887
+ "dev",
1888
+ "usage.js"
1986
1889
  ]
1987
1890
  },
1988
- "dbdoc:export": {
1891
+ "doctor": {
1989
1892
  "aliases": [],
1990
1893
  "args": {},
1991
- "description": "Export documentation in multiple formats (delegates to db-auto-doc export)",
1894
+ "description": "Diagnose a MemberJunction installation",
1992
1895
  "examples": [
1993
- "<%= config.bin %> <%= command.id %> --state-file=./db-doc-state.json",
1994
- "<%= config.bin %> <%= command.id %> --sql",
1995
- "<%= config.bin %> <%= command.id %> --markdown",
1996
- "<%= config.bin %> <%= command.id %> --html",
1997
- "<%= config.bin %> <%= command.id %> --csv",
1998
- "<%= config.bin %> <%= command.id %> --mermaid",
1999
- "<%= config.bin %> <%= command.id %> --sql --markdown --html --csv --mermaid --apply"
1896
+ "<%= config.bin %> <%= command.id %>",
1897
+ "<%= config.bin %> <%= command.id %> --dir ./my-mj-project",
1898
+ "<%= config.bin %> <%= command.id %> --format json",
1899
+ "<%= config.bin %> <%= command.id %> --scope ai",
1900
+ "<%= config.bin %> <%= command.id %> --verbose",
1901
+ "<%= config.bin %> <%= command.id %> --report",
1902
+ "<%= config.bin %> <%= command.id %> --report_extended"
2000
1903
  ],
2001
1904
  "flags": {
2002
- "state-file": {
2003
- "char": "s",
2004
- "description": "Path to state JSON file",
2005
- "name": "state-file",
1905
+ "dir": {
1906
+ "description": "Target directory to diagnose",
1907
+ "name": "dir",
1908
+ "default": ".",
2006
1909
  "hasDynamicHelp": false,
2007
1910
  "multiple": false,
2008
1911
  "type": "option"
2009
1912
  },
2010
- "output-dir": {
2011
- "char": "o",
2012
- "description": "Output directory for generated files",
2013
- "name": "output-dir",
1913
+ "scope": {
1914
+ "description": "Diagnostic scope to filter by (install, runtime, ai, metadata, agent)",
1915
+ "name": "scope",
2014
1916
  "hasDynamicHelp": false,
2015
1917
  "multiple": false,
1918
+ "options": [
1919
+ "install",
1920
+ "runtime",
1921
+ "ai",
1922
+ "metadata",
1923
+ "agent"
1924
+ ],
2016
1925
  "type": "option"
2017
1926
  },
2018
- "sql": {
2019
- "description": "Generate SQL script",
2020
- "name": "sql",
2021
- "allowNo": false,
2022
- "type": "boolean"
2023
- },
2024
- "markdown": {
2025
- "description": "Generate Markdown documentation",
2026
- "name": "markdown",
2027
- "allowNo": false,
2028
- "type": "boolean"
2029
- },
2030
- "html": {
2031
- "description": "Generate interactive HTML documentation",
2032
- "name": "html",
2033
- "allowNo": false,
2034
- "type": "boolean"
2035
- },
2036
- "csv": {
2037
- "description": "Generate CSV exports (tables and columns)",
2038
- "name": "csv",
2039
- "allowNo": false,
2040
- "type": "boolean"
1927
+ "format": {
1928
+ "description": "Output format: text (human), json (machine-readable), md (Markdown). Defaults to human output on a terminal and json when stdout is piped. Legacy spellings (console/markdown/compact/table) are accepted.",
1929
+ "name": "format",
1930
+ "hasDynamicHelp": false,
1931
+ "multiple": false,
1932
+ "options": [
1933
+ "text",
1934
+ "json",
1935
+ "md",
1936
+ "human",
1937
+ "console",
1938
+ "markdown",
1939
+ "compact",
1940
+ "table"
1941
+ ],
1942
+ "type": "option"
2041
1943
  },
2042
- "mermaid": {
2043
- "description": "Generate Mermaid ERD diagram files",
2044
- "name": "mermaid",
1944
+ "verbose": {
1945
+ "char": "v",
1946
+ "description": "Show detailed output including suggested fixes inline",
1947
+ "name": "verbose",
2045
1948
  "allowNo": false,
2046
1949
  "type": "boolean"
2047
1950
  },
2048
1951
  "report": {
2049
- "description": "Generate analysis report",
1952
+ "char": "r",
1953
+ "description": "Generate a diagnostic report file (mj-diagnostic-report.md) for sharing with support",
2050
1954
  "name": "report",
2051
1955
  "allowNo": false,
2052
1956
  "type": "boolean"
2053
1957
  },
2054
- "apply": {
2055
- "description": "Apply SQL to database",
2056
- "name": "apply",
2057
- "allowNo": false,
2058
- "type": "boolean"
2059
- },
2060
- "approved-only": {
2061
- "description": "Only export approved items",
2062
- "name": "approved-only",
1958
+ "report_extended": {
1959
+ "description": "Generate an extended report with config file snapshots and service startup log capture (~60s longer)",
1960
+ "name": "report_extended",
2063
1961
  "allowNo": false,
2064
1962
  "type": "boolean"
2065
- },
2066
- "confidence-threshold": {
2067
- "description": "Minimum confidence threshold",
2068
- "name": "confidence-threshold",
2069
- "default": "0",
2070
- "hasDynamicHelp": false,
2071
- "multiple": false,
2072
- "type": "option"
2073
1963
  }
2074
1964
  },
2075
1965
  "hasDynamicHelp": false,
2076
1966
  "hiddenAliases": [],
2077
- "id": "dbdoc:export",
1967
+ "id": "doctor",
2078
1968
  "pluginAlias": "@memberjunction/cli",
2079
1969
  "pluginName": "@memberjunction/cli",
2080
1970
  "pluginType": "core",
@@ -2084,144 +1974,31 @@
2084
1974
  "relativePath": [
2085
1975
  "dist",
2086
1976
  "commands",
2087
- "dbdoc",
2088
- "export.js"
1977
+ "doctor",
1978
+ "index.js"
2089
1979
  ]
2090
1980
  },
2091
- "dbdoc:generate-queries": {
1981
+ "doctor:usage": {
2092
1982
  "aliases": [],
2093
1983
  "args": {},
2094
- "description": "Generate sample SQL queries from existing analysis state (delegates to db-auto-doc generate-queries)",
2095
- "examples": [
2096
- "<%= config.bin %> <%= command.id %> --from-state ./output/run-1/state.json",
2097
- "<%= config.bin %> <%= command.id %> --from-state ./output/run-1/state.json --output-dir ./queries",
2098
- "<%= config.bin %> <%= command.id %> --from-state ./output/run-1/state.json --queries-per-table 10"
2099
- ],
1984
+ "description": "Show usage, flags, examples, and runtime hints for every `mj doctor` command.",
2100
1985
  "flags": {
2101
- "from-state": {
2102
- "description": "Path to existing state.json file from previous analysis",
2103
- "name": "from-state",
2104
- "required": true,
2105
- "hasDynamicHelp": false,
2106
- "multiple": false,
2107
- "type": "option"
2108
- },
2109
- "output-dir": {
2110
- "description": "Output directory for generated queries",
2111
- "name": "output-dir",
2112
- "required": false,
2113
- "hasDynamicHelp": false,
2114
- "multiple": false,
2115
- "type": "option"
2116
- },
2117
- "config": {
2118
- "char": "c",
2119
- "description": "Path to config file (for database connection and AI settings)",
2120
- "name": "config",
2121
- "default": "./config.json",
2122
- "hasDynamicHelp": false,
2123
- "multiple": false,
2124
- "type": "option"
2125
- },
2126
- "queries-per-table": {
2127
- "description": "Number of queries to generate per table",
2128
- "name": "queries-per-table",
2129
- "required": false,
2130
- "hasDynamicHelp": false,
2131
- "multiple": false,
2132
- "type": "option"
2133
- },
2134
- "max-execution-time": {
2135
- "description": "Maximum execution time for query validation (ms)",
2136
- "name": "max-execution-time",
2137
- "required": false,
1986
+ "format": {
1987
+ "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
1988
+ "name": "format",
2138
1989
  "hasDynamicHelp": false,
2139
1990
  "multiple": false,
1991
+ "options": [
1992
+ "text",
1993
+ "json",
1994
+ "md"
1995
+ ],
2140
1996
  "type": "option"
2141
1997
  }
2142
1998
  },
2143
1999
  "hasDynamicHelp": false,
2144
2000
  "hiddenAliases": [],
2145
- "id": "dbdoc:generate-queries",
2146
- "pluginAlias": "@memberjunction/cli",
2147
- "pluginName": "@memberjunction/cli",
2148
- "pluginType": "core",
2149
- "strict": true,
2150
- "enableJsonFlag": false,
2151
- "isESM": true,
2152
- "relativePath": [
2153
- "dist",
2154
- "commands",
2155
- "dbdoc",
2156
- "generate-queries.js"
2157
- ]
2158
- },
2159
- "dbdoc": {
2160
- "aliases": [],
2161
- "args": {},
2162
- "description": "AI-powered database documentation generator",
2163
- "flags": {},
2164
- "hasDynamicHelp": false,
2165
- "hidden": false,
2166
- "hiddenAliases": [],
2167
- "id": "dbdoc",
2168
- "pluginAlias": "@memberjunction/cli",
2169
- "pluginName": "@memberjunction/cli",
2170
- "pluginType": "core",
2171
- "strict": true,
2172
- "enableJsonFlag": false,
2173
- "isESM": true,
2174
- "relativePath": [
2175
- "dist",
2176
- "commands",
2177
- "dbdoc",
2178
- "index.js"
2179
- ]
2180
- },
2181
- "dbdoc:init": {
2182
- "aliases": [],
2183
- "args": {},
2184
- "description": "Initialize DBAutoDoc project (delegates to db-auto-doc init)",
2185
- "examples": [
2186
- "<%= config.bin %> <%= command.id %>"
2187
- ],
2188
- "flags": {},
2189
- "hasDynamicHelp": false,
2190
- "hiddenAliases": [],
2191
- "id": "dbdoc:init",
2192
- "pluginAlias": "@memberjunction/cli",
2193
- "pluginName": "@memberjunction/cli",
2194
- "pluginType": "core",
2195
- "strict": true,
2196
- "enableJsonFlag": false,
2197
- "isESM": true,
2198
- "relativePath": [
2199
- "dist",
2200
- "commands",
2201
- "dbdoc",
2202
- "init.js"
2203
- ]
2204
- },
2205
- "dbdoc:reset": {
2206
- "aliases": [],
2207
- "args": {},
2208
- "description": "Reset analysis state (delegates to db-auto-doc reset)",
2209
- "examples": [
2210
- "<%= config.bin %> <%= command.id %>",
2211
- "<%= config.bin %> <%= command.id %> --force"
2212
- ],
2213
- "flags": {
2214
- "force": {
2215
- "char": "f",
2216
- "description": "Force reset without confirmation",
2217
- "name": "force",
2218
- "allowNo": false,
2219
- "type": "boolean"
2220
- }
2221
- },
2222
- "hasDynamicHelp": false,
2223
- "hiddenAliases": [],
2224
- "id": "dbdoc:reset",
2001
+ "id": "doctor:usage",
2225
2002
  "pluginAlias": "@memberjunction/cli",
2226
2003
  "pluginName": "@memberjunction/cli",
2227
2004
  "pluginType": "core",
@@ -2231,65 +2008,110 @@
2231
2008
  "relativePath": [
2232
2009
  "dist",
2233
2010
  "commands",
2234
- "dbdoc",
2235
- "reset.js"
2011
+ "doctor",
2012
+ "usage.js"
2236
2013
  ]
2237
2014
  },
2238
- "dbdoc:status": {
2015
+ "install:claude": {
2239
2016
  "aliases": [],
2240
2017
  "args": {},
2241
- "description": "Show analysis status and progress (delegates to db-auto-doc status)",
2018
+ "description": "Install or refresh the Claude Code pack in the current directory.",
2242
2019
  "examples": [
2243
- "<%= config.bin %> <%= command.id %>",
2244
- "<%= config.bin %> <%= command.id %> --state-file ./custom-state.json"
2020
+ "<%= config.bin %> install:claude",
2021
+ "<%= config.bin %> install:claude --dry-run",
2022
+ "<%= config.bin %> install:claude --from ./local-pack",
2023
+ "<%= config.bin %> install:claude --json"
2245
2024
  ],
2246
2025
  "flags": {
2247
- "state-file": {
2248
- "char": "s",
2249
- "description": "Path to state JSON file",
2250
- "name": "state-file",
2026
+ "dir": {
2027
+ "description": "Target directory for the install",
2028
+ "name": "dir",
2029
+ "default": ".",
2251
2030
  "hasDynamicHelp": false,
2252
2031
  "multiple": false,
2253
2032
  "type": "option"
2254
- }
2255
- },
2256
- "hasDynamicHelp": false,
2257
- "hiddenAliases": [],
2258
- "id": "dbdoc:status",
2259
- "pluginAlias": "@memberjunction/cli",
2260
- "pluginName": "@memberjunction/cli",
2261
- "pluginType": "core",
2262
- "strict": true,
2263
- "enableJsonFlag": false,
2264
- "isESM": true,
2265
- "relativePath": [
2266
- "dist",
2267
- "commands",
2268
- "dbdoc",
2269
- "status.js"
2270
- ]
2271
- },
2272
- "dbdoc:usage": {
2273
- "aliases": [],
2274
- "args": {},
2275
- "description": "Show usage, flags, examples, and runtime hints for every `mj dbdoc` command.",
2276
- "flags": {
2277
- "format": {
2278
- "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
2279
- "name": "format",
2033
+ },
2034
+ "major": {
2035
+ "description": "Force a specific MJ major (default: detected from package.json)",
2036
+ "name": "major",
2280
2037
  "hasDynamicHelp": false,
2281
2038
  "multiple": false,
2282
- "options": [
2283
- "text",
2284
- "json",
2285
- "md"
2286
- ],
2287
2039
  "type": "option"
2040
+ },
2041
+ "ref": {
2042
+ "description": "Git ref to fetch from (branch or tag). Default: main.",
2043
+ "name": "ref",
2044
+ "hasDynamicHelp": false,
2045
+ "multiple": false,
2046
+ "type": "option"
2047
+ },
2048
+ "from": {
2049
+ "description": "Use a local pack source instead of fetching from GitHub",
2050
+ "name": "from",
2051
+ "hasDynamicHelp": false,
2052
+ "multiple": false,
2053
+ "type": "option"
2054
+ },
2055
+ "offline": {
2056
+ "description": "Forbid network; requires --from <path>",
2057
+ "name": "offline",
2058
+ "allowNo": false,
2059
+ "type": "boolean"
2060
+ },
2061
+ "dry-run": {
2062
+ "description": "Print what would be written; change nothing",
2063
+ "name": "dry-run",
2064
+ "allowNo": false,
2065
+ "type": "boolean"
2066
+ },
2067
+ "yes": {
2068
+ "char": "y",
2069
+ "description": "Don't prompt (reserved for future interactive paths; currently no-op)",
2070
+ "name": "yes",
2071
+ "allowNo": false,
2072
+ "type": "boolean"
2073
+ },
2074
+ "force": {
2075
+ "description": "Overwrite user-customized commands/skills (saves .bak files)",
2076
+ "name": "force",
2077
+ "allowNo": false,
2078
+ "type": "boolean"
2079
+ },
2080
+ "skip-commands": {
2081
+ "description": "Skip seeding .claude/commands/",
2082
+ "name": "skip-commands",
2083
+ "allowNo": false,
2084
+ "type": "boolean"
2085
+ },
2086
+ "skip-skills": {
2087
+ "description": "Skip seeding .claude/skills/",
2088
+ "name": "skip-skills",
2089
+ "allowNo": false,
2090
+ "type": "boolean"
2091
+ },
2092
+ "skip-settings": {
2093
+ "description": "Skip merging .claude/settings.json",
2094
+ "name": "skip-settings",
2095
+ "allowNo": false,
2096
+ "type": "boolean"
2097
+ },
2098
+ "json": {
2099
+ "description": "Output as JSON (matches plan §7.5 schema)",
2100
+ "name": "json",
2101
+ "allowNo": false,
2102
+ "type": "boolean"
2103
+ },
2104
+ "verbose": {
2105
+ "char": "v",
2106
+ "description": "Show progress messages from the fetcher and merger",
2107
+ "name": "verbose",
2108
+ "allowNo": false,
2109
+ "type": "boolean"
2288
2110
  }
2289
2111
  },
2290
2112
  "hasDynamicHelp": false,
2291
2113
  "hiddenAliases": [],
2292
- "id": "dbdoc:usage",
2114
+ "id": "install:claude",
2293
2115
  "pluginAlias": "@memberjunction/cli",
2294
2116
  "pluginName": "@memberjunction/cli",
2295
2117
  "pluginType": "core",
@@ -2299,19 +2121,118 @@
2299
2121
  "relativePath": [
2300
2122
  "dist",
2301
2123
  "commands",
2302
- "dbdoc",
2303
- "usage.js"
2124
+ "install",
2125
+ "claude.js"
2304
2126
  ]
2305
2127
  },
2306
- "dev": {
2128
+ "install": {
2307
2129
  "aliases": [],
2308
2130
  "args": {},
2309
- "description": "Local development tooling: generate, inspect, and tear down the cross-repo pnpm workspace that links sibling repo clones. Run `mj dev usage` for every command's flags, examples, and runtime hints.",
2310
- "flags": {},
2131
+ "description": "Install MemberJunction from a GitHub release",
2132
+ "examples": [
2133
+ "<%= config.bin %> <%= command.id %>",
2134
+ "<%= config.bin %> <%= command.id %> -t v4.3.0",
2135
+ "<%= config.bin %> <%= command.id %> --dry-run",
2136
+ "<%= config.bin %> <%= command.id %> --yes"
2137
+ ],
2138
+ "flags": {
2139
+ "tag": {
2140
+ "char": "t",
2141
+ "description": "Release tag to install (e.g. v4.3.0). If omitted, shows a version picker.",
2142
+ "name": "tag",
2143
+ "hasDynamicHelp": false,
2144
+ "multiple": false,
2145
+ "type": "option"
2146
+ },
2147
+ "dir": {
2148
+ "description": "Target directory for the installation",
2149
+ "name": "dir",
2150
+ "default": ".",
2151
+ "hasDynamicHelp": false,
2152
+ "multiple": false,
2153
+ "type": "option"
2154
+ },
2155
+ "config": {
2156
+ "char": "c",
2157
+ "description": "Path to JSON config file with install settings (database, auth, ports, etc.)",
2158
+ "name": "config",
2159
+ "hasDynamicHelp": false,
2160
+ "multiple": false,
2161
+ "type": "option"
2162
+ },
2163
+ "legacy": {
2164
+ "description": "Use the legacy interactive installer (ZIP-only distribution)",
2165
+ "hidden": true,
2166
+ "name": "legacy",
2167
+ "allowNo": false,
2168
+ "type": "boolean"
2169
+ },
2170
+ "dry-run": {
2171
+ "description": "Show the install plan without executing it",
2172
+ "name": "dry-run",
2173
+ "allowNo": false,
2174
+ "type": "boolean"
2175
+ },
2176
+ "yes": {
2177
+ "char": "y",
2178
+ "description": "Non-interactive mode: auto-select latest version and accept defaults",
2179
+ "name": "yes",
2180
+ "allowNo": false,
2181
+ "type": "boolean"
2182
+ },
2183
+ "verbose": {
2184
+ "char": "v",
2185
+ "description": "Show detailed output",
2186
+ "name": "verbose",
2187
+ "allowNo": false,
2188
+ "type": "boolean"
2189
+ },
2190
+ "skip-db": {
2191
+ "description": "Skip database provisioning phases",
2192
+ "name": "skip-db",
2193
+ "allowNo": false,
2194
+ "type": "boolean"
2195
+ },
2196
+ "skip-start": {
2197
+ "description": "Skip service startup and smoke tests",
2198
+ "name": "skip-start",
2199
+ "allowNo": false,
2200
+ "type": "boolean"
2201
+ },
2202
+ "no-resume": {
2203
+ "description": "Ignore any existing checkpoint and start fresh",
2204
+ "name": "no-resume",
2205
+ "allowNo": false,
2206
+ "type": "boolean"
2207
+ },
2208
+ "fast": {
2209
+ "description": "Fast mode: skip smoke test and optimize post-codegen steps. Re-run without --fast if you encounter issues.",
2210
+ "name": "fast",
2211
+ "allowNo": false,
2212
+ "type": "boolean"
2213
+ },
2214
+ "overwrite-config": {
2215
+ "description": "Overwrite existing config files (.env, mj.config.cjs, environment.ts) instead of preserving them",
2216
+ "name": "overwrite-config",
2217
+ "allowNo": false,
2218
+ "type": "boolean"
2219
+ },
2220
+ "monorepo": {
2221
+ "description": "Install the full MemberJunction source repository instead of the lightweight distribution. Use this for MJ framework development.",
2222
+ "name": "monorepo",
2223
+ "allowNo": false,
2224
+ "type": "boolean"
2225
+ },
2226
+ "no-claude-pack": {
2227
+ "description": "Exclude the Claude Code pack (CLAUDE.md + .claude/ tree) from the scaffold. By default the pack ships with the install so opening Claude Code in your new MJ project gives you the curated MJ-aware experience immediately.",
2228
+ "name": "no-claude-pack",
2229
+ "allowNo": false,
2230
+ "type": "boolean"
2231
+ }
2232
+ },
2311
2233
  "hasDynamicHelp": false,
2312
- "hidden": false,
2313
2234
  "hiddenAliases": [],
2314
- "id": "dev",
2235
+ "id": "install",
2315
2236
  "pluginAlias": "@memberjunction/cli",
2316
2237
  "pluginName": "@memberjunction/cli",
2317
2238
  "pluginType": "core",
@@ -2321,14 +2242,14 @@
2321
2242
  "relativePath": [
2322
2243
  "dist",
2323
2244
  "commands",
2324
- "dev",
2245
+ "install",
2325
2246
  "index.js"
2326
2247
  ]
2327
2248
  },
2328
- "dev:usage": {
2249
+ "install:usage": {
2329
2250
  "aliases": [],
2330
2251
  "args": {},
2331
- "description": "Show usage, flags, examples, and runtime hints for every `mj dev` command.",
2252
+ "description": "Show usage, flags, examples, and runtime hints for every `mj install` command.",
2332
2253
  "flags": {
2333
2254
  "format": {
2334
2255
  "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
@@ -2345,7 +2266,7 @@
2345
2266
  },
2346
2267
  "hasDynamicHelp": false,
2347
2268
  "hiddenAliases": [],
2348
- "id": "dev:usage",
2269
+ "id": "install:usage",
2349
2270
  "pluginAlias": "@memberjunction/cli",
2350
2271
  "pluginName": "@memberjunction/cli",
2351
2272
  "pluginType": "core",
@@ -2355,87 +2276,102 @@
2355
2276
  "relativePath": [
2356
2277
  "dist",
2357
2278
  "commands",
2358
- "dev",
2279
+ "install",
2359
2280
  "usage.js"
2360
2281
  ]
2361
2282
  },
2362
- "doctor": {
2283
+ "migrate:convert": {
2363
2284
  "aliases": [],
2364
2285
  "args": {},
2365
- "description": "Diagnose a MemberJunction installation",
2286
+ "description": "Convert T-SQL migrations to PostgreSQL",
2366
2287
  "examples": [
2367
- "<%= config.bin %> <%= command.id %>",
2368
- "<%= config.bin %> <%= command.id %> --dir ./my-mj-project",
2369
- "<%= config.bin %> <%= command.id %> --format json",
2370
- "<%= config.bin %> <%= command.id %> --scope ai",
2371
- "<%= config.bin %> <%= command.id %> --verbose",
2372
- "<%= config.bin %> <%= command.id %> --report",
2373
- "<%= config.bin %> <%= command.id %> --report_extended"
2288
+ "<%= config.bin %> migrate convert --split",
2289
+ "<%= config.bin %> migrate convert --split --dry-run",
2290
+ "<%= config.bin %> migrate convert --split --file V202604060452__v5.24.x__KnowledgeHub.sql",
2291
+ "<%= config.bin %> migrate convert --source-dir ./migrations/v5 --output-dir ./migrations-pg/v5",
2292
+ "<%= config.bin %> migrate convert --verbose"
2374
2293
  ],
2375
2294
  "flags": {
2376
- "dir": {
2377
- "description": "Target directory to diagnose",
2378
- "name": "dir",
2379
- "default": ".",
2295
+ "source-dir": {
2296
+ "description": "Source T-SQL migrations directory",
2297
+ "name": "source-dir",
2298
+ "default": "./migrations/v5",
2380
2299
  "hasDynamicHelp": false,
2381
2300
  "multiple": false,
2382
2301
  "type": "option"
2383
2302
  },
2384
- "scope": {
2385
- "description": "Diagnostic scope to filter by (install, runtime, ai, metadata, agent)",
2386
- "name": "scope",
2303
+ "output-dir": {
2304
+ "description": "Output PG migrations directory",
2305
+ "name": "output-dir",
2306
+ "default": "./migrations-pg/v5",
2387
2307
  "hasDynamicHelp": false,
2388
2308
  "multiple": false,
2389
- "options": [
2390
- "install",
2391
- "runtime",
2392
- "ai",
2393
- "metadata",
2394
- "agent"
2395
- ],
2396
2309
  "type": "option"
2397
2310
  },
2398
- "format": {
2399
- "description": "Output format: text (human), json (machine-readable), md (Markdown). Defaults to human output on a terminal and json when stdout is piped. Legacy spellings (console/markdown/compact/table) are accepted.",
2400
- "name": "format",
2311
+ "file": {
2312
+ "description": "Convert a specific file (filename only, looked up in source-dir)",
2313
+ "name": "file",
2314
+ "hasDynamicHelp": false,
2315
+ "multiple": false,
2316
+ "type": "option"
2317
+ },
2318
+ "schema": {
2319
+ "description": "Target schema name",
2320
+ "name": "schema",
2321
+ "default": "__mj",
2322
+ "hasDynamicHelp": false,
2323
+ "multiple": false,
2324
+ "type": "option"
2325
+ },
2326
+ "core-schema": {
2327
+ "description": "MJ core schema substituted for ${mjSchema} (default __mj). Distinct from --schema, which is the app's OWN schema: an Open App migration references core as ${mjSchema} and itself as ${flyway:defaultSchema}, and for every app those differ.",
2328
+ "name": "core-schema",
2329
+ "default": "__mj",
2401
2330
  "hasDynamicHelp": false,
2402
2331
  "multiple": false,
2403
- "options": [
2404
- "text",
2405
- "json",
2406
- "md",
2407
- "human",
2408
- "console",
2409
- "markdown",
2410
- "compact",
2411
- "table"
2412
- ],
2413
2332
  "type": "option"
2414
2333
  },
2334
+ "dry-run": {
2335
+ "description": "Show what would be converted without writing files",
2336
+ "name": "dry-run",
2337
+ "allowNo": false,
2338
+ "type": "boolean"
2339
+ },
2340
+ "no-header": {
2341
+ "description": "Skip PG header (extensions, schema, implicit cast)",
2342
+ "name": "no-header",
2343
+ "allowNo": false,
2344
+ "type": "boolean"
2345
+ },
2415
2346
  "verbose": {
2416
2347
  "char": "v",
2417
- "description": "Show detailed output including suggested fixes inline",
2348
+ "description": "Show per-statement progress",
2418
2349
  "name": "verbose",
2419
2350
  "allowNo": false,
2420
2351
  "type": "boolean"
2421
2352
  },
2422
- "report": {
2423
- "char": "r",
2424
- "description": "Generate a diagnostic report file (mj-diagnostic-report.md) for sharing with support",
2425
- "name": "report",
2353
+ "split": {
2354
+ "description": "Split-and-regenerate (the standard path): transpile only hand-written DDL via the AST dialect; CodeGen objects are regenerated by `mj codegen` and mj-sync metadata re-seeded by `mj sync push`; every conversion gap is surfaced and fails the run unless --allow-gaps.",
2355
+ "name": "split",
2426
2356
  "allowNo": false,
2427
2357
  "type": "boolean"
2428
2358
  },
2429
- "report_extended": {
2430
- "description": "Generate an extended report with config file snapshots and service startup log capture (~60s longer)",
2431
- "name": "report_extended",
2359
+ "allow-gaps": {
2360
+ "description": "Exit 0 even when migrations have conversion gaps — with --split: hand-authoring needed or unhandled statements; on the legacy path: \"-- Could not parse\" / \"-- ERROR converting batch\" markers in the output. Gaps are still embedded as comments and listed in the summary.",
2361
+ "name": "allow-gaps",
2362
+ "allowNo": false,
2363
+ "type": "boolean"
2364
+ },
2365
+ "bake-codegen": {
2366
+ "description": "With --split: bake native PG CodeGen objects inline per migration (Path C), so the set deploys with `mj migrate` alone — no `mj codegen` step. Requires a LIVE working PG database (DB_PLATFORM=postgresql + PG_* env, same as `mj codegen`) seeded to the state just BEFORE the migrations being converted (typically the latest baseline); the converter brings it forward in committed order as it bakes. Not compatible with --dry-run.",
2367
+ "name": "bake-codegen",
2432
2368
  "allowNo": false,
2433
2369
  "type": "boolean"
2434
2370
  }
2435
2371
  },
2436
2372
  "hasDynamicHelp": false,
2437
2373
  "hiddenAliases": [],
2438
- "id": "doctor",
2374
+ "id": "migrate:convert",
2439
2375
  "pluginAlias": "@memberjunction/cli",
2440
2376
  "pluginName": "@memberjunction/cli",
2441
2377
  "pluginType": "core",
@@ -2445,31 +2381,63 @@
2445
2381
  "relativePath": [
2446
2382
  "dist",
2447
2383
  "commands",
2448
- "doctor",
2449
- "index.js"
2384
+ "migrate",
2385
+ "convert.js"
2450
2386
  ]
2451
2387
  },
2452
- "doctor:usage": {
2388
+ "migrate:create": {
2453
2389
  "aliases": [],
2454
- "args": {},
2455
- "description": "Show usage, flags, examples, and runtime hints for every `mj doctor` command.",
2390
+ "args": {
2391
+ "description": {
2392
+ "description": "Short description (will be converted to PascalCase with underscores)",
2393
+ "name": "description",
2394
+ "required": true
2395
+ }
2396
+ },
2397
+ "description": "Scaffold a new migration file for the current database platform",
2398
+ "examples": [
2399
+ "<%= config.bin %> <%= command.id %> \"Add FooID to Bar\"",
2400
+ "<%= config.bin %> <%= command.id %> \"Add FooID to Bar\" --version 5.25 --platform postgresql",
2401
+ "<%= config.bin %> <%= command.id %> \"Add FooID to Bar\" --dir ./migrations/v5"
2402
+ ],
2456
2403
  "flags": {
2457
- "format": {
2458
- "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
2459
- "name": "format",
2404
+ "version": {
2405
+ "char": "v",
2406
+ "description": "Migration version tag, e.g. \"5.25\" (default: parsed from repo baseline or \"0.0\")",
2407
+ "name": "version",
2408
+ "hasDynamicHelp": false,
2409
+ "multiple": false,
2410
+ "type": "option"
2411
+ },
2412
+ "platform": {
2413
+ "char": "p",
2414
+ "description": "Override platform: sqlserver | postgresql (default: config.dbPlatform)",
2415
+ "name": "platform",
2460
2416
  "hasDynamicHelp": false,
2461
2417
  "multiple": false,
2462
2418
  "options": [
2463
- "text",
2464
- "json",
2465
- "md"
2419
+ "sqlserver",
2420
+ "postgresql"
2466
2421
  ],
2467
2422
  "type": "option"
2423
+ },
2424
+ "dir": {
2425
+ "description": "Output directory (default: ./migrations/v5 or ./migrations-pg/v5)",
2426
+ "name": "dir",
2427
+ "hasDynamicHelp": false,
2428
+ "multiple": false,
2429
+ "type": "option"
2430
+ },
2431
+ "x-x": {
2432
+ "description": "Use {version}.x.x suffix instead of {version}.x (e.g. 5.25.x instead of 5.25.x)",
2433
+ "name": "x-x",
2434
+ "allowNo": false,
2435
+ "type": "boolean"
2468
2436
  }
2469
2437
  },
2470
2438
  "hasDynamicHelp": false,
2471
2439
  "hiddenAliases": [],
2472
- "id": "doctor:usage",
2440
+ "id": "migrate:create",
2473
2441
  "pluginAlias": "@memberjunction/cli",
2474
2442
  "pluginName": "@memberjunction/cli",
2475
2443
  "pluginType": "core",
@@ -2479,110 +2447,60 @@
2479
2447
  "relativePath": [
2480
2448
  "dist",
2481
2449
  "commands",
2482
- "doctor",
2483
- "usage.js"
2450
+ "migrate",
2451
+ "create.js"
2484
2452
  ]
2485
2453
  },
2486
- "install:claude": {
2454
+ "migrate": {
2487
2455
  "aliases": [],
2488
2456
  "args": {},
2489
- "description": "Install or refresh the Claude Code pack in the current directory.",
2457
+ "description": "Migrate MemberJunction database to latest version. Open App migrates also run the core metadata-heal procs (same work as R__RefreshMetadata) scoped to the app schema, on SQL Server and PostgreSQL.",
2490
2458
  "examples": [
2491
- "<%= config.bin %> install:claude",
2492
- "<%= config.bin %> install:claude --dry-run",
2493
- "<%= config.bin %> install:claude --from ./local-pack",
2494
- "<%= config.bin %> install:claude --json"
2459
+ "<%= config.bin %> <%= command.id %>\n",
2460
+ "<%= config.bin %> <%= command.id %> --schema __BCSaaS --dir ./migrations/v1\n",
2461
+ "<%= config.bin %> <%= command.id %> --schema __BCSaaS --tag v1.0.0\n"
2495
2462
  ],
2496
2463
  "flags": {
2497
- "dir": {
2498
- "description": "Target directory for the install",
2499
- "name": "dir",
2500
- "default": ".",
2501
- "hasDynamicHelp": false,
2502
- "multiple": false,
2503
- "type": "option"
2464
+ "verbose": {
2465
+ "char": "v",
2466
+ "description": "Enable additional logging",
2467
+ "name": "verbose",
2468
+ "allowNo": false,
2469
+ "type": "boolean"
2504
2470
  },
2505
- "major": {
2506
- "description": "Force a specific MJ major (default: detected from package.json)",
2507
- "name": "major",
2471
+ "tag": {
2472
+ "char": "t",
2473
+ "description": "Version tag to use for running remote migrations",
2474
+ "name": "tag",
2508
2475
  "hasDynamicHelp": false,
2509
2476
  "multiple": false,
2510
2477
  "type": "option"
2511
2478
  },
2512
- "ref": {
2513
- "description": "Git ref to fetch from (branch or tag). Default: main.",
2514
- "name": "ref",
2479
+ "schema": {
2480
+ "char": "s",
2481
+ "description": "Target schema (overrides coreSchema from config)",
2482
+ "name": "schema",
2515
2483
  "hasDynamicHelp": false,
2516
2484
  "multiple": false,
2517
2485
  "type": "option"
2518
2486
  },
2519
- "from": {
2520
- "description": "Use a local pack source instead of fetching from GitHub",
2521
- "name": "from",
2487
+ "dir": {
2488
+ "description": "Migration source directory (overrides migrationsLocation from config)",
2489
+ "name": "dir",
2522
2490
  "hasDynamicHelp": false,
2523
2491
  "multiple": false,
2524
2492
  "type": "option"
2525
2493
  },
2526
- "offline": {
2527
- "description": "Forbid network; requires --from <path>",
2528
- "name": "offline",
2529
- "allowNo": false,
2530
- "type": "boolean"
2531
- },
2532
- "dry-run": {
2533
- "description": "Print what would be written; change nothing",
2534
- "name": "dry-run",
2535
- "allowNo": false,
2536
- "type": "boolean"
2537
- },
2538
- "yes": {
2539
- "char": "y",
2540
- "description": "Don't prompt (reserved for future interactive paths; currently no-op)",
2541
- "name": "yes",
2542
- "allowNo": false,
2543
- "type": "boolean"
2544
- },
2545
- "force": {
2546
- "description": "Overwrite user-customized commands/skills (saves .bak files)",
2547
- "name": "force",
2548
- "allowNo": false,
2549
- "type": "boolean"
2550
- },
2551
- "skip-commands": {
2552
- "description": "Skip seeding .claude/commands/",
2553
- "name": "skip-commands",
2554
- "allowNo": false,
2555
- "type": "boolean"
2556
- },
2557
- "skip-skills": {
2558
- "description": "Skip seeding .claude/skills/",
2559
- "name": "skip-skills",
2560
- "allowNo": false,
2561
- "type": "boolean"
2562
- },
2563
- "skip-settings": {
2564
- "description": "Skip merging .claude/settings.json",
2565
- "name": "skip-settings",
2566
- "allowNo": false,
2567
- "type": "boolean"
2568
- },
2569
- "json": {
2570
- "description": "Output as JSON (matches plan §7.5 schema)",
2571
- "name": "json",
2572
- "allowNo": false,
2573
- "type": "boolean"
2574
- },
2575
- "verbose": {
2576
- "char": "v",
2577
- "description": "Show progress messages from the fetcher and merger",
2578
- "name": "verbose",
2494
+ "check-connection": {
2495
+ "description": "Verify the database connection (including TLS) and exit without migrating",
2496
+ "name": "check-connection",
2579
2497
  "allowNo": false,
2580
2498
  "type": "boolean"
2581
2499
  }
2582
2500
  },
2583
2501
  "hasDynamicHelp": false,
2584
2502
  "hiddenAliases": [],
2585
- "id": "install:claude",
2503
+ "id": "migrate",
2586
2504
  "pluginAlias": "@memberjunction/cli",
2587
2505
  "pluginName": "@memberjunction/cli",
2588
2506
  "pluginType": "core",
@@ -2592,118 +2510,68 @@
2592
2510
  "relativePath": [
2593
2511
  "dist",
2594
2512
  "commands",
2595
- "install",
2596
- "claude.js"
2513
+ "migrate",
2514
+ "index.js"
2597
2515
  ]
2598
2516
  },
2599
- "install": {
2517
+ "migrate:rebake": {
2600
2518
  "aliases": [],
2601
2519
  "args": {},
2602
- "description": "Install MemberJunction from a GitHub release",
2520
+ "description": "Re-bake the post-baseline PG migration set with inline native CodeGen",
2603
2521
  "examples": [
2604
- "<%= config.bin %> <%= command.id %>",
2605
- "<%= config.bin %> <%= command.id %> -t v4.3.0",
2606
- "<%= config.bin %> <%= command.id %> --dry-run",
2607
- "<%= config.bin %> <%= command.id %> --yes"
2522
+ "<%= config.bin %> migrate rebake",
2523
+ "<%= config.bin %> migrate rebake --baseline-floor V202605291452 --dry-run"
2608
2524
  ],
2609
2525
  "flags": {
2610
- "tag": {
2611
- "char": "t",
2612
- "description": "Release tag to install (e.g. v4.3.0). If omitted, shows a version picker.",
2613
- "name": "tag",
2526
+ "source-dir": {
2527
+ "description": "Source T-SQL migrations directory",
2528
+ "name": "source-dir",
2529
+ "default": "./migrations/v5",
2614
2530
  "hasDynamicHelp": false,
2615
2531
  "multiple": false,
2616
2532
  "type": "option"
2617
2533
  },
2618
- "dir": {
2619
- "description": "Target directory for the installation",
2620
- "name": "dir",
2621
- "default": ".",
2534
+ "output-dir": {
2535
+ "description": "PG migrations directory (committed files read here + baked output written here)",
2536
+ "name": "output-dir",
2537
+ "default": "./migrations-pg/v5",
2622
2538
  "hasDynamicHelp": false,
2623
2539
  "multiple": false,
2624
2540
  "type": "option"
2625
2541
  },
2626
- "config": {
2627
- "char": "c",
2628
- "description": "Path to JSON config file with install settings (database, auth, ports, etc.)",
2629
- "name": "config",
2542
+ "schema": {
2543
+ "description": "Target schema name",
2544
+ "name": "schema",
2545
+ "default": "__mj",
2630
2546
  "hasDynamicHelp": false,
2631
2547
  "multiple": false,
2632
2548
  "type": "option"
2633
2549
  },
2634
- "legacy": {
2635
- "description": "Use the legacy interactive installer (ZIP-only distribution)",
2636
- "hidden": true,
2637
- "name": "legacy",
2638
- "allowNo": false,
2639
- "type": "boolean"
2640
- },
2641
- "dry-run": {
2642
- "description": "Show the install plan without executing it",
2643
- "name": "dry-run",
2644
- "allowNo": false,
2645
- "type": "boolean"
2646
- },
2647
- "yes": {
2648
- "char": "y",
2649
- "description": "Non-interactive mode: auto-select latest version and accept defaults",
2650
- "name": "yes",
2651
- "allowNo": false,
2652
- "type": "boolean"
2653
- },
2654
- "verbose": {
2655
- "char": "v",
2656
- "description": "Show detailed output",
2657
- "name": "verbose",
2658
- "allowNo": false,
2659
- "type": "boolean"
2660
- },
2661
- "skip-db": {
2662
- "description": "Skip database provisioning phases",
2663
- "name": "skip-db",
2664
- "allowNo": false,
2665
- "type": "boolean"
2666
- },
2667
- "skip-start": {
2668
- "description": "Skip service startup and smoke tests",
2669
- "name": "skip-start",
2670
- "allowNo": false,
2671
- "type": "boolean"
2672
- },
2673
- "no-resume": {
2674
- "description": "Ignore any existing checkpoint and start fresh",
2675
- "name": "no-resume",
2676
- "allowNo": false,
2677
- "type": "boolean"
2678
- },
2679
- "fast": {
2680
- "description": "Fast mode: skip smoke test and optimize post-codegen steps. Re-run without --fast if you encounter issues.",
2681
- "name": "fast",
2682
- "allowNo": false,
2683
- "type": "boolean"
2684
- },
2685
- "overwrite-config": {
2686
- "description": "Overwrite existing config files (.env, mj.config.cjs, environment.ts) instead of preserving them",
2687
- "name": "overwrite-config",
2688
- "allowNo": false,
2689
- "type": "boolean"
2550
+ "core-schema": {
2551
+ "description": "MJ core schema substituted for ${mjSchema} (default __mj). Distinct from --schema, which is the app's OWN schema: an Open App migration references core as ${mjSchema} and itself as ${flyway:defaultSchema}, and for every app those differ.",
2552
+ "name": "core-schema",
2553
+ "default": "__mj",
2554
+ "hasDynamicHelp": false,
2555
+ "multiple": false,
2556
+ "type": "option"
2690
2557
  },
2691
- "monorepo": {
2692
- "description": "Install the full MemberJunction source repository instead of the lightweight distribution. Use this for MJ framework development.",
2693
- "name": "monorepo",
2694
- "allowNo": false,
2695
- "type": "boolean"
2558
+ "baseline-floor": {
2559
+ "description": "Re-bake migrations strictly AFTER this version key (default: the latest B* in output-dir)",
2560
+ "name": "baseline-floor",
2561
+ "hasDynamicHelp": false,
2562
+ "multiple": false,
2563
+ "type": "option"
2696
2564
  },
2697
- "no-claude-pack": {
2698
- "description": "Exclude the Claude Code pack (CLAUDE.md + .claude/ tree) from the scaffold. By default the pack ships with the install so opening Claude Code in your new MJ project gives you the curated MJ-aware experience immediately.",
2699
- "name": "no-claude-pack",
2565
+ "dry-run": {
2566
+ "description": "Report what would be re-baked without writing files",
2567
+ "name": "dry-run",
2700
2568
  "allowNo": false,
2701
2569
  "type": "boolean"
2702
2570
  }
2703
2571
  },
2704
2572
  "hasDynamicHelp": false,
2705
2573
  "hiddenAliases": [],
2706
- "id": "install",
2574
+ "id": "migrate:rebake",
2707
2575
  "pluginAlias": "@memberjunction/cli",
2708
2576
  "pluginName": "@memberjunction/cli",
2709
2577
  "pluginType": "core",
@@ -2713,14 +2581,14 @@
2713
2581
  "relativePath": [
2714
2582
  "dist",
2715
2583
  "commands",
2716
- "install",
2717
- "index.js"
2584
+ "migrate",
2585
+ "rebake.js"
2718
2586
  ]
2719
2587
  },
2720
- "install:usage": {
2588
+ "migrate:usage": {
2721
2589
  "aliases": [],
2722
2590
  "args": {},
2723
- "description": "Show usage, flags, examples, and runtime hints for every `mj install` command.",
2591
+ "description": "Show usage, flags, examples, and runtime hints for every `mj migrate` command.",
2724
2592
  "flags": {
2725
2593
  "format": {
2726
2594
  "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
@@ -2737,7 +2605,7 @@
2737
2605
  },
2738
2606
  "hasDynamicHelp": false,
2739
2607
  "hiddenAliases": [],
2740
- "id": "install:usage",
2608
+ "id": "migrate:usage",
2741
2609
  "pluginAlias": "@memberjunction/cli",
2742
2610
  "pluginName": "@memberjunction/cli",
2743
2611
  "pluginType": "core",
@@ -2747,102 +2615,120 @@
2747
2615
  "relativePath": [
2748
2616
  "dist",
2749
2617
  "commands",
2750
- "install",
2618
+ "migrate",
2751
2619
  "usage.js"
2752
2620
  ]
2753
2621
  },
2754
- "migrate:convert": {
2622
+ "plugin:add": {
2755
2623
  "aliases": [],
2756
- "args": {},
2757
- "description": "Convert T-SQL migrations to PostgreSQL",
2624
+ "args": {
2625
+ "package": {
2626
+ "description": "Plugin entry-point specifier (package name, subpath, or relative path)",
2627
+ "name": "package",
2628
+ "required": true
2629
+ }
2630
+ },
2631
+ "description": "Register a CLI plugin package in mj-cli-plugins.json so `mj` loads it at startup.",
2758
2632
  "examples": [
2759
- "<%= config.bin %> migrate convert --split",
2760
- "<%= config.bin %> migrate convert --split --dry-run",
2761
- "<%= config.bin %> migrate convert --split --file V202604060452__v5.24.x__KnowledgeHub.sql",
2762
- "<%= config.bin %> migrate convert --source-dir ./migrations/v5 --output-dir ./migrations-pg/v5",
2763
- "<%= config.bin %> migrate convert --verbose"
2633
+ "<%= config.bin %> <%= command.id %> @my-org/mj-plugin/plugins",
2634
+ "<%= config.bin %> <%= command.id %> ./local-plugins/my-tool"
2764
2635
  ],
2765
2636
  "flags": {
2766
- "source-dir": {
2767
- "description": "Source T-SQL migrations directory",
2768
- "name": "source-dir",
2769
- "default": "./migrations/v5",
2770
- "hasDynamicHelp": false,
2771
- "multiple": false,
2772
- "type": "option"
2773
- },
2774
- "output-dir": {
2775
- "description": "Output PG migrations directory",
2776
- "name": "output-dir",
2777
- "default": "./migrations-pg/v5",
2637
+ "format": {
2638
+ "description": "Output format",
2639
+ "name": "format",
2640
+ "default": "text",
2778
2641
  "hasDynamicHelp": false,
2779
2642
  "multiple": false,
2643
+ "options": [
2644
+ "text",
2645
+ "json"
2646
+ ],
2780
2647
  "type": "option"
2781
- },
2782
- "file": {
2783
- "description": "Convert a specific file (filename only, looked up in source-dir)",
2784
- "name": "file",
2648
+ }
2649
+ },
2650
+ "hasDynamicHelp": false,
2651
+ "hiddenAliases": [],
2652
+ "id": "plugin:add",
2653
+ "pluginAlias": "@memberjunction/cli",
2654
+ "pluginName": "@memberjunction/cli",
2655
+ "pluginType": "core",
2656
+ "strict": true,
2657
+ "enableJsonFlag": false,
2658
+ "isESM": true,
2659
+ "relativePath": [
2660
+ "dist",
2661
+ "commands",
2662
+ "plugin",
2663
+ "add.js"
2664
+ ]
2665
+ },
2666
+ "plugin:usage": {
2667
+ "aliases": [],
2668
+ "args": {},
2669
+ "description": "Show usage, flags, examples, and runtime hints for every `mj plugin` command.",
2670
+ "flags": {
2671
+ "format": {
2672
+ "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
2673
+ "name": "format",
2785
2674
  "hasDynamicHelp": false,
2786
2675
  "multiple": false,
2676
+ "options": [
2677
+ "text",
2678
+ "json",
2679
+ "md"
2680
+ ],
2787
2681
  "type": "option"
2788
- },
2789
- "schema": {
2790
- "description": "Target schema name",
2791
- "name": "schema",
2792
- "default": "__mj",
2682
+ }
2683
+ },
2684
+ "hasDynamicHelp": false,
2685
+ "hiddenAliases": [],
2686
+ "id": "plugin:usage",
2687
+ "pluginAlias": "@memberjunction/cli",
2688
+ "pluginName": "@memberjunction/cli",
2689
+ "pluginType": "core",
2690
+ "strict": true,
2691
+ "enableJsonFlag": false,
2692
+ "isESM": true,
2693
+ "relativePath": [
2694
+ "dist",
2695
+ "commands",
2696
+ "plugin",
2697
+ "usage.js"
2698
+ ]
2699
+ },
2700
+ "dbdoc:analyze": {
2701
+ "aliases": [],
2702
+ "args": {},
2703
+ "description": "Analyze database and generate documentation (delegates to db-auto-doc analyze)",
2704
+ "examples": [
2705
+ "<%= config.bin %> <%= command.id %>",
2706
+ "<%= config.bin %> <%= command.id %> --resume ./output/run-6/state.json",
2707
+ "<%= config.bin %> <%= command.id %> --config ./my-config.json"
2708
+ ],
2709
+ "flags": {
2710
+ "resume": {
2711
+ "char": "r",
2712
+ "description": "Resume from an existing state file",
2713
+ "name": "resume",
2714
+ "required": false,
2793
2715
  "hasDynamicHelp": false,
2794
2716
  "multiple": false,
2795
2717
  "type": "option"
2796
2718
  },
2797
- "core-schema": {
2798
- "description": "MJ core schema substituted for ${mjSchema} (default __mj). Distinct from --schema, which is the app's OWN schema: an Open App migration references core as ${mjSchema} and itself as ${flyway:defaultSchema}, and for every app those differ.",
2799
- "name": "core-schema",
2800
- "default": "__mj",
2719
+ "config": {
2720
+ "char": "c",
2721
+ "description": "Path to config file",
2722
+ "name": "config",
2723
+ "default": "./config.json",
2801
2724
  "hasDynamicHelp": false,
2802
2725
  "multiple": false,
2803
2726
  "type": "option"
2804
- },
2805
- "dry-run": {
2806
- "description": "Show what would be converted without writing files",
2807
- "name": "dry-run",
2808
- "allowNo": false,
2809
- "type": "boolean"
2810
- },
2811
- "no-header": {
2812
- "description": "Skip PG header (extensions, schema, implicit cast)",
2813
- "name": "no-header",
2814
- "allowNo": false,
2815
- "type": "boolean"
2816
- },
2817
- "verbose": {
2818
- "char": "v",
2819
- "description": "Show per-statement progress",
2820
- "name": "verbose",
2821
- "allowNo": false,
2822
- "type": "boolean"
2823
- },
2824
- "split": {
2825
- "description": "Split-and-regenerate (the standard path): transpile only hand-written DDL via the AST dialect; CodeGen objects are regenerated by `mj codegen` and mj-sync metadata re-seeded by `mj sync push`; every conversion gap is surfaced and fails the run unless --allow-gaps.",
2826
- "name": "split",
2827
- "allowNo": false,
2828
- "type": "boolean"
2829
- },
2830
- "allow-gaps": {
2831
- "description": "Exit 0 even when migrations have conversion gaps — with --split: hand-authoring needed or unhandled statements; on the legacy path: \"-- Could not parse\" / \"-- ERROR converting batch\" markers in the output. Gaps are still embedded as comments and listed in the summary.",
2832
- "name": "allow-gaps",
2833
- "allowNo": false,
2834
- "type": "boolean"
2835
- },
2836
- "bake-codegen": {
2837
- "description": "With --split: bake native PG CodeGen objects inline per migration (Path C), so the set deploys with `mj migrate` alone — no `mj codegen` step. Requires a LIVE working PG database (DB_PLATFORM=postgresql + PG_* env, same as `mj codegen`) seeded to the state just BEFORE the migrations being converted (typically the latest baseline); the converter brings it forward in committed order as it bakes. Not compatible with --dry-run.",
2838
- "name": "bake-codegen",
2839
- "allowNo": false,
2840
- "type": "boolean"
2841
2727
  }
2842
2728
  },
2843
2729
  "hasDynamicHelp": false,
2844
2730
  "hiddenAliases": [],
2845
- "id": "migrate:convert",
2731
+ "id": "dbdoc:analyze",
2846
2732
  "pluginAlias": "@memberjunction/cli",
2847
2733
  "pluginName": "@memberjunction/cli",
2848
2734
  "pluginType": "core",
@@ -2852,63 +2738,105 @@
2852
2738
  "relativePath": [
2853
2739
  "dist",
2854
2740
  "commands",
2855
- "migrate",
2856
- "convert.js"
2741
+ "dbdoc",
2742
+ "analyze.js"
2857
2743
  ]
2858
2744
  },
2859
- "migrate:create": {
2745
+ "dbdoc:export-sample-queries": {
2860
2746
  "aliases": [],
2861
- "args": {
2862
- "description": {
2863
- "description": "Short description (will be converted to PascalCase with underscores)",
2864
- "name": "description",
2865
- "required": true
2866
- }
2867
- },
2868
- "description": "Scaffold a new migration file for the current database platform",
2747
+ "args": {},
2748
+ "description": "Export sample queries to MemberJunction metadata format (delegates to db-auto-doc export-sample-queries)",
2869
2749
  "examples": [
2870
- "<%= config.bin %> <%= command.id %> \"Add FooID to Bar\"",
2871
- "<%= config.bin %> <%= command.id %> \"Add FooID to Bar\" --version 5.25 --platform postgresql",
2872
- "<%= config.bin %> <%= command.id %> \"Add FooID to Bar\" --dir ./migrations/v5"
2750
+ "<%= config.bin %> <%= command.id %> --input ./output/sample-queries.json --output ./metadata/queries/.queries.json",
2751
+ "<%= config.bin %> <%= command.id %> --input ./sample-queries.json --output ./metadata/queries/.queries.json --separate-sql-files",
2752
+ "<%= config.bin %> <%= command.id %> --input ./sample-queries.json --output ./queries/.queries.json --category \"Database Documentation\"",
2753
+ "<%= config.bin %> <%= command.id %> --input ./sample-queries.json --output ./queries/.queries.json --status Pending --min-confidence 0.8"
2873
2754
  ],
2874
2755
  "flags": {
2875
- "version": {
2876
- "char": "v",
2877
- "description": "Migration version tag, e.g. \"5.25\" (default: parsed from repo baseline or \"0.0\")",
2878
- "name": "version",
2756
+ "input": {
2757
+ "char": "i",
2758
+ "description": "Path to sample-queries.json file generated by generate-queries command",
2759
+ "name": "input",
2760
+ "required": true,
2879
2761
  "hasDynamicHelp": false,
2880
2762
  "multiple": false,
2881
2763
  "type": "option"
2882
2764
  },
2883
- "platform": {
2884
- "char": "p",
2885
- "description": "Override platform: sqlserver | postgresql (default: config.dbPlatform)",
2886
- "name": "platform",
2765
+ "output": {
2766
+ "char": "o",
2767
+ "description": "Output path for the .queries.json metadata file",
2768
+ "name": "output",
2769
+ "required": true,
2770
+ "hasDynamicHelp": false,
2771
+ "multiple": false,
2772
+ "type": "option"
2773
+ },
2774
+ "separate-sql-files": {
2775
+ "description": "Write SQL to separate files and use @file: references",
2776
+ "name": "separate-sql-files",
2777
+ "allowNo": false,
2778
+ "type": "boolean"
2779
+ },
2780
+ "sql-dir": {
2781
+ "description": "Directory for SQL files when using --separate-sql-files (relative to output file)",
2782
+ "name": "sql-dir",
2783
+ "default": "SQL",
2784
+ "hasDynamicHelp": false,
2785
+ "multiple": false,
2786
+ "type": "option"
2787
+ },
2788
+ "category": {
2789
+ "description": "Category name for @lookup reference (e.g., \"Database Documentation\")",
2790
+ "name": "category",
2791
+ "required": false,
2792
+ "hasDynamicHelp": false,
2793
+ "multiple": false,
2794
+ "type": "option"
2795
+ },
2796
+ "status": {
2797
+ "description": "Status to assign to exported queries",
2798
+ "name": "status",
2799
+ "default": "Pending",
2887
2800
  "hasDynamicHelp": false,
2888
2801
  "multiple": false,
2889
2802
  "options": [
2890
- "sqlserver",
2891
- "postgresql"
2803
+ "Approved",
2804
+ "Pending",
2805
+ "Rejected",
2806
+ "Expired"
2892
2807
  ],
2893
2808
  "type": "option"
2894
2809
  },
2895
- "dir": {
2896
- "description": "Output directory (default: ./migrations/v5 or ./migrations-pg/v5)",
2897
- "name": "dir",
2810
+ "min-confidence": {
2811
+ "description": "Minimum confidence threshold to export (0-1)",
2812
+ "name": "min-confidence",
2813
+ "default": "0",
2898
2814
  "hasDynamicHelp": false,
2899
2815
  "multiple": false,
2900
2816
  "type": "option"
2901
2817
  },
2902
- "x-x": {
2903
- "description": "Use {version}.x.x suffix instead of {version}.x (e.g. 5.25.x instead of 5.25.x)",
2904
- "name": "x-x",
2818
+ "validated-only": {
2819
+ "description": "Only export queries that were successfully validated",
2820
+ "name": "validated-only",
2821
+ "allowNo": false,
2822
+ "type": "boolean"
2823
+ },
2824
+ "append": {
2825
+ "description": "Append to existing metadata file instead of overwriting",
2826
+ "name": "append",
2827
+ "allowNo": false,
2828
+ "type": "boolean"
2829
+ },
2830
+ "include-primary-key": {
2831
+ "description": "Include primaryKey and sync fields (for updating existing records)",
2832
+ "name": "include-primary-key",
2905
2833
  "allowNo": false,
2906
2834
  "type": "boolean"
2907
2835
  }
2908
2836
  },
2909
2837
  "hasDynamicHelp": false,
2910
2838
  "hiddenAliases": [],
2911
- "id": "migrate:create",
2839
+ "id": "dbdoc:export-sample-queries",
2912
2840
  "pluginAlias": "@memberjunction/cli",
2913
2841
  "pluginName": "@memberjunction/cli",
2914
2842
  "pluginType": "core",
@@ -2918,60 +2846,100 @@
2918
2846
  "relativePath": [
2919
2847
  "dist",
2920
2848
  "commands",
2921
- "migrate",
2922
- "create.js"
2849
+ "dbdoc",
2850
+ "export-sample-queries.js"
2923
2851
  ]
2924
2852
  },
2925
- "migrate": {
2853
+ "dbdoc:export": {
2926
2854
  "aliases": [],
2927
2855
  "args": {},
2928
- "description": "Migrate MemberJunction database to latest version. Open App migrates also run the core metadata-heal procs (same work as R__RefreshMetadata) scoped to the app schema, on SQL Server and PostgreSQL.",
2856
+ "description": "Export documentation in multiple formats (delegates to db-auto-doc export)",
2929
2857
  "examples": [
2930
- "<%= config.bin %> <%= command.id %>\n",
2931
- "<%= config.bin %> <%= command.id %> --schema __BCSaaS --dir ./migrations/v1\n",
2932
- "<%= config.bin %> <%= command.id %> --schema __BCSaaS --tag v1.0.0\n"
2858
+ "<%= config.bin %> <%= command.id %> --state-file=./db-doc-state.json",
2859
+ "<%= config.bin %> <%= command.id %> --sql",
2860
+ "<%= config.bin %> <%= command.id %> --markdown",
2861
+ "<%= config.bin %> <%= command.id %> --html",
2862
+ "<%= config.bin %> <%= command.id %> --csv",
2863
+ "<%= config.bin %> <%= command.id %> --mermaid",
2864
+ "<%= config.bin %> <%= command.id %> --sql --markdown --html --csv --mermaid --apply"
2933
2865
  ],
2934
2866
  "flags": {
2935
- "verbose": {
2936
- "char": "v",
2937
- "description": "Enable additional logging",
2938
- "name": "verbose",
2939
- "allowNo": false,
2940
- "type": "boolean"
2941
- },
2942
- "tag": {
2943
- "char": "t",
2944
- "description": "Version tag to use for running remote migrations",
2945
- "name": "tag",
2946
- "hasDynamicHelp": false,
2947
- "multiple": false,
2948
- "type": "option"
2949
- },
2950
- "schema": {
2867
+ "state-file": {
2951
2868
  "char": "s",
2952
- "description": "Target schema (overrides coreSchema from config)",
2953
- "name": "schema",
2869
+ "description": "Path to state JSON file",
2870
+ "name": "state-file",
2954
2871
  "hasDynamicHelp": false,
2955
2872
  "multiple": false,
2956
2873
  "type": "option"
2957
2874
  },
2958
- "dir": {
2959
- "description": "Migration source directory (overrides migrationsLocation from config)",
2960
- "name": "dir",
2875
+ "output-dir": {
2876
+ "char": "o",
2877
+ "description": "Output directory for generated files",
2878
+ "name": "output-dir",
2961
2879
  "hasDynamicHelp": false,
2962
2880
  "multiple": false,
2963
2881
  "type": "option"
2964
2882
  },
2965
- "check-connection": {
2966
- "description": "Verify the database connection (including TLS) and exit without migrating",
2967
- "name": "check-connection",
2883
+ "sql": {
2884
+ "description": "Generate SQL script",
2885
+ "name": "sql",
2886
+ "allowNo": false,
2887
+ "type": "boolean"
2888
+ },
2889
+ "markdown": {
2890
+ "description": "Generate Markdown documentation",
2891
+ "name": "markdown",
2892
+ "allowNo": false,
2893
+ "type": "boolean"
2894
+ },
2895
+ "html": {
2896
+ "description": "Generate interactive HTML documentation",
2897
+ "name": "html",
2898
+ "allowNo": false,
2899
+ "type": "boolean"
2900
+ },
2901
+ "csv": {
2902
+ "description": "Generate CSV exports (tables and columns)",
2903
+ "name": "csv",
2904
+ "allowNo": false,
2905
+ "type": "boolean"
2906
+ },
2907
+ "mermaid": {
2908
+ "description": "Generate Mermaid ERD diagram files",
2909
+ "name": "mermaid",
2910
+ "allowNo": false,
2911
+ "type": "boolean"
2912
+ },
2913
+ "report": {
2914
+ "description": "Generate analysis report",
2915
+ "name": "report",
2916
+ "allowNo": false,
2917
+ "type": "boolean"
2918
+ },
2919
+ "apply": {
2920
+ "description": "Apply SQL to database",
2921
+ "name": "apply",
2922
+ "allowNo": false,
2923
+ "type": "boolean"
2924
+ },
2925
+ "approved-only": {
2926
+ "description": "Only export approved items",
2927
+ "name": "approved-only",
2968
2928
  "allowNo": false,
2969
2929
  "type": "boolean"
2930
+ },
2931
+ "confidence-threshold": {
2932
+ "description": "Minimum confidence threshold",
2933
+ "name": "confidence-threshold",
2934
+ "default": "0",
2935
+ "hasDynamicHelp": false,
2936
+ "multiple": false,
2937
+ "type": "option"
2970
2938
  }
2971
2939
  },
2972
2940
  "hasDynamicHelp": false,
2973
2941
  "hiddenAliases": [],
2974
- "id": "migrate",
2942
+ "id": "dbdoc:export",
2975
2943
  "pluginAlias": "@memberjunction/cli",
2976
2944
  "pluginName": "@memberjunction/cli",
2977
2945
  "pluginType": "core",
@@ -2981,68 +2949,65 @@
2981
2949
  "relativePath": [
2982
2950
  "dist",
2983
2951
  "commands",
2984
- "migrate",
2985
- "index.js"
2952
+ "dbdoc",
2953
+ "export.js"
2986
2954
  ]
2987
2955
  },
2988
- "migrate:rebake": {
2956
+ "dbdoc:generate-queries": {
2989
2957
  "aliases": [],
2990
2958
  "args": {},
2991
- "description": "Re-bake the post-baseline PG migration set with inline native CodeGen",
2959
+ "description": "Generate sample SQL queries from existing analysis state (delegates to db-auto-doc generate-queries)",
2992
2960
  "examples": [
2993
- "<%= config.bin %> migrate rebake",
2994
- "<%= config.bin %> migrate rebake --baseline-floor V202605291452 --dry-run"
2961
+ "<%= config.bin %> <%= command.id %> --from-state ./output/run-1/state.json",
2962
+ "<%= config.bin %> <%= command.id %> --from-state ./output/run-1/state.json --output-dir ./queries",
2963
+ "<%= config.bin %> <%= command.id %> --from-state ./output/run-1/state.json --queries-per-table 10"
2995
2964
  ],
2996
2965
  "flags": {
2997
- "source-dir": {
2998
- "description": "Source T-SQL migrations directory",
2999
- "name": "source-dir",
3000
- "default": "./migrations/v5",
2966
+ "from-state": {
2967
+ "description": "Path to existing state.json file from previous analysis",
2968
+ "name": "from-state",
2969
+ "required": true,
3001
2970
  "hasDynamicHelp": false,
3002
2971
  "multiple": false,
3003
2972
  "type": "option"
3004
2973
  },
3005
2974
  "output-dir": {
3006
- "description": "PG migrations directory (committed files read here + baked output written here)",
2975
+ "description": "Output directory for generated queries",
3007
2976
  "name": "output-dir",
3008
- "default": "./migrations-pg/v5",
2977
+ "required": false,
3009
2978
  "hasDynamicHelp": false,
3010
2979
  "multiple": false,
3011
2980
  "type": "option"
3012
2981
  },
3013
- "schema": {
3014
- "description": "Target schema name",
3015
- "name": "schema",
3016
- "default": "__mj",
2982
+ "config": {
2983
+ "char": "c",
2984
+ "description": "Path to config file (for database connection and AI settings)",
2985
+ "name": "config",
2986
+ "default": "./config.json",
3017
2987
  "hasDynamicHelp": false,
3018
2988
  "multiple": false,
3019
2989
  "type": "option"
3020
2990
  },
3021
- "core-schema": {
3022
- "description": "MJ core schema substituted for ${mjSchema} (default __mj). Distinct from --schema, which is the app's OWN schema: an Open App migration references core as ${mjSchema} and itself as ${flyway:defaultSchema}, and for every app those differ.",
3023
- "name": "core-schema",
3024
- "default": "__mj",
2991
+ "queries-per-table": {
2992
+ "description": "Number of queries to generate per table",
2993
+ "name": "queries-per-table",
2994
+ "required": false,
3025
2995
  "hasDynamicHelp": false,
3026
2996
  "multiple": false,
3027
2997
  "type": "option"
3028
2998
  },
3029
- "baseline-floor": {
3030
- "description": "Re-bake migrations strictly AFTER this version key (default: the latest B* in output-dir)",
3031
- "name": "baseline-floor",
2999
+ "max-execution-time": {
3000
+ "description": "Maximum execution time for query validation (ms)",
3001
+ "name": "max-execution-time",
3002
+ "required": false,
3032
3003
  "hasDynamicHelp": false,
3033
3004
  "multiple": false,
3034
3005
  "type": "option"
3035
- },
3036
- "dry-run": {
3037
- "description": "Report what would be re-baked without writing files",
3038
- "name": "dry-run",
3039
- "allowNo": false,
3040
- "type": "boolean"
3041
3006
  }
3042
3007
  },
3043
3008
  "hasDynamicHelp": false,
3044
3009
  "hiddenAliases": [],
3045
- "id": "migrate:rebake",
3010
+ "id": "dbdoc:generate-queries",
3046
3011
  "pluginAlias": "@memberjunction/cli",
3047
3012
  "pluginName": "@memberjunction/cli",
3048
3013
  "pluginType": "core",
@@ -3052,31 +3017,76 @@
3052
3017
  "relativePath": [
3053
3018
  "dist",
3054
3019
  "commands",
3055
- "migrate",
3056
- "rebake.js"
3020
+ "dbdoc",
3021
+ "generate-queries.js"
3057
3022
  ]
3058
3023
  },
3059
- "migrate:usage": {
3024
+ "dbdoc": {
3060
3025
  "aliases": [],
3061
3026
  "args": {},
3062
- "description": "Show usage, flags, examples, and runtime hints for every `mj migrate` command.",
3063
- "flags": {
3064
- "format": {
3065
- "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
3066
- "name": "format",
3067
- "hasDynamicHelp": false,
3068
- "multiple": false,
3069
- "options": [
3070
- "text",
3071
- "json",
3072
- "md"
3073
- ],
3074
- "type": "option"
3027
+ "description": "AI-powered database documentation generator",
3028
+ "flags": {},
3029
+ "hasDynamicHelp": false,
3030
+ "hidden": false,
3031
+ "hiddenAliases": [],
3032
+ "id": "dbdoc",
3033
+ "pluginAlias": "@memberjunction/cli",
3034
+ "pluginName": "@memberjunction/cli",
3035
+ "pluginType": "core",
3036
+ "strict": true,
3037
+ "enableJsonFlag": false,
3038
+ "isESM": true,
3039
+ "relativePath": [
3040
+ "dist",
3041
+ "commands",
3042
+ "dbdoc",
3043
+ "index.js"
3044
+ ]
3045
+ },
3046
+ "dbdoc:init": {
3047
+ "aliases": [],
3048
+ "args": {},
3049
+ "description": "Initialize DBAutoDoc project (delegates to db-auto-doc init)",
3050
+ "examples": [
3051
+ "<%= config.bin %> <%= command.id %>"
3052
+ ],
3053
+ "flags": {},
3054
+ "hasDynamicHelp": false,
3055
+ "hiddenAliases": [],
3056
+ "id": "dbdoc:init",
3057
+ "pluginAlias": "@memberjunction/cli",
3058
+ "pluginName": "@memberjunction/cli",
3059
+ "pluginType": "core",
3060
+ "strict": true,
3061
+ "enableJsonFlag": false,
3062
+ "isESM": true,
3063
+ "relativePath": [
3064
+ "dist",
3065
+ "commands",
3066
+ "dbdoc",
3067
+ "init.js"
3068
+ ]
3069
+ },
3070
+ "dbdoc:reset": {
3071
+ "aliases": [],
3072
+ "args": {},
3073
+ "description": "Reset analysis state (delegates to db-auto-doc reset)",
3074
+ "examples": [
3075
+ "<%= config.bin %> <%= command.id %>",
3076
+ "<%= config.bin %> <%= command.id %> --force"
3077
+ ],
3078
+ "flags": {
3079
+ "force": {
3080
+ "char": "f",
3081
+ "description": "Force reset without confirmation",
3082
+ "name": "force",
3083
+ "allowNo": false,
3084
+ "type": "boolean"
3075
3085
  }
3076
3086
  },
3077
3087
  "hasDynamicHelp": false,
3078
3088
  "hiddenAliases": [],
3079
- "id": "migrate:usage",
3089
+ "id": "dbdoc:reset",
3080
3090
  "pluginAlias": "@memberjunction/cli",
3081
3091
  "pluginName": "@memberjunction/cli",
3082
3092
  "pluginType": "core",
@@ -3086,41 +3096,31 @@
3086
3096
  "relativePath": [
3087
3097
  "dist",
3088
3098
  "commands",
3089
- "migrate",
3090
- "usage.js"
3099
+ "dbdoc",
3100
+ "reset.js"
3091
3101
  ]
3092
3102
  },
3093
- "plugin:add": {
3103
+ "dbdoc:status": {
3094
3104
  "aliases": [],
3095
- "args": {
3096
- "package": {
3097
- "description": "Plugin entry-point specifier (package name, subpath, or relative path)",
3098
- "name": "package",
3099
- "required": true
3100
- }
3101
- },
3102
- "description": "Register a CLI plugin package in mj-cli-plugins.json so `mj` loads it at startup.",
3105
+ "args": {},
3106
+ "description": "Show analysis status and progress (delegates to db-auto-doc status)",
3103
3107
  "examples": [
3104
- "<%= config.bin %> <%= command.id %> @my-org/mj-plugin/plugins",
3105
- "<%= config.bin %> <%= command.id %> ./local-plugins/my-tool"
3108
+ "<%= config.bin %> <%= command.id %>",
3109
+ "<%= config.bin %> <%= command.id %> --state-file ./custom-state.json"
3106
3110
  ],
3107
3111
  "flags": {
3108
- "format": {
3109
- "description": "Output format",
3110
- "name": "format",
3111
- "default": "text",
3112
+ "state-file": {
3113
+ "char": "s",
3114
+ "description": "Path to state JSON file",
3115
+ "name": "state-file",
3112
3116
  "hasDynamicHelp": false,
3113
3117
  "multiple": false,
3114
- "options": [
3115
- "text",
3116
- "json"
3117
- ],
3118
3118
  "type": "option"
3119
3119
  }
3120
3120
  },
3121
3121
  "hasDynamicHelp": false,
3122
3122
  "hiddenAliases": [],
3123
- "id": "plugin:add",
3123
+ "id": "dbdoc:status",
3124
3124
  "pluginAlias": "@memberjunction/cli",
3125
3125
  "pluginName": "@memberjunction/cli",
3126
3126
  "pluginType": "core",
@@ -3130,14 +3130,14 @@
3130
3130
  "relativePath": [
3131
3131
  "dist",
3132
3132
  "commands",
3133
- "plugin",
3134
- "add.js"
3133
+ "dbdoc",
3134
+ "status.js"
3135
3135
  ]
3136
3136
  },
3137
- "plugin:usage": {
3137
+ "dbdoc:usage": {
3138
3138
  "aliases": [],
3139
3139
  "args": {},
3140
- "description": "Show usage, flags, examples, and runtime hints for every `mj plugin` command.",
3140
+ "description": "Show usage, flags, examples, and runtime hints for every `mj dbdoc` command.",
3141
3141
  "flags": {
3142
3142
  "format": {
3143
3143
  "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
@@ -3154,7 +3154,7 @@
3154
3154
  },
3155
3155
  "hasDynamicHelp": false,
3156
3156
  "hiddenAliases": [],
3157
- "id": "plugin:usage",
3157
+ "id": "dbdoc:usage",
3158
3158
  "pluginAlias": "@memberjunction/cli",
3159
3159
  "pluginName": "@memberjunction/cli",
3160
3160
  "pluginType": "core",
@@ -3164,7 +3164,7 @@
3164
3164
  "relativePath": [
3165
3165
  "dist",
3166
3166
  "commands",
3167
- "plugin",
3167
+ "dbdoc",
3168
3168
  "usage.js"
3169
3169
  ]
3170
3170
  },
@@ -3403,7 +3403,241 @@
3403
3403
  },
3404
3404
  "hasDynamicHelp": false,
3405
3405
  "hiddenAliases": [],
3406
- "id": "querygen:validate",
3406
+ "id": "querygen:validate",
3407
+ "pluginAlias": "@memberjunction/cli",
3408
+ "pluginName": "@memberjunction/cli",
3409
+ "pluginType": "core",
3410
+ "strict": true,
3411
+ "enableJsonFlag": false,
3412
+ "isESM": true,
3413
+ "relativePath": [
3414
+ "dist",
3415
+ "commands",
3416
+ "querygen",
3417
+ "validate.js"
3418
+ ]
3419
+ },
3420
+ "sql-audit": {
3421
+ "aliases": [],
3422
+ "args": {},
3423
+ "description": "Compare source and target databases for migration verification",
3424
+ "examples": [
3425
+ "<%= config.bin %> sql-audit --source \"mssql://sa:pass@host/db\" --target \"postgres://user:pass@host:5432/db\"",
3426
+ "<%= config.bin %> sql-audit --source \"mssql://sa:pass@host/db\" --target \"postgres://user:pass@host:5432/db\" --output report.txt",
3427
+ "<%= config.bin %> sql-audit --source \"mssql://sa:pass@host/db\" --target \"postgres://user:pass@host:5432/db\" --source-schema __mj --target-schema __mj"
3428
+ ],
3429
+ "flags": {
3430
+ "source": {
3431
+ "description": "Source database connection string (mssql://... or postgres://...)",
3432
+ "name": "source",
3433
+ "required": true,
3434
+ "hasDynamicHelp": false,
3435
+ "multiple": false,
3436
+ "type": "option"
3437
+ },
3438
+ "target": {
3439
+ "description": "Target database connection string (mssql://... or postgres://...)",
3440
+ "name": "target",
3441
+ "required": true,
3442
+ "hasDynamicHelp": false,
3443
+ "multiple": false,
3444
+ "type": "option"
3445
+ },
3446
+ "source-schema": {
3447
+ "description": "Source schema name",
3448
+ "name": "source-schema",
3449
+ "default": "__mj",
3450
+ "hasDynamicHelp": false,
3451
+ "multiple": false,
3452
+ "type": "option"
3453
+ },
3454
+ "target-schema": {
3455
+ "description": "Target schema name",
3456
+ "name": "target-schema",
3457
+ "default": "__mj",
3458
+ "hasDynamicHelp": false,
3459
+ "multiple": false,
3460
+ "type": "option"
3461
+ },
3462
+ "output": {
3463
+ "char": "o",
3464
+ "description": "Save report to file",
3465
+ "name": "output",
3466
+ "hasDynamicHelp": false,
3467
+ "multiple": false,
3468
+ "type": "option"
3469
+ }
3470
+ },
3471
+ "hasDynamicHelp": false,
3472
+ "hiddenAliases": [],
3473
+ "id": "sql-audit",
3474
+ "pluginAlias": "@memberjunction/cli",
3475
+ "pluginName": "@memberjunction/cli",
3476
+ "pluginType": "core",
3477
+ "strict": true,
3478
+ "enableJsonFlag": false,
3479
+ "isESM": true,
3480
+ "relativePath": [
3481
+ "dist",
3482
+ "commands",
3483
+ "sql-audit",
3484
+ "index.js"
3485
+ ]
3486
+ },
3487
+ "sql-audit:usage": {
3488
+ "aliases": [],
3489
+ "args": {},
3490
+ "description": "Show usage, flags, examples, and runtime hints for every `mj sql-audit` command.",
3491
+ "flags": {
3492
+ "format": {
3493
+ "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
3494
+ "name": "format",
3495
+ "hasDynamicHelp": false,
3496
+ "multiple": false,
3497
+ "options": [
3498
+ "text",
3499
+ "json",
3500
+ "md"
3501
+ ],
3502
+ "type": "option"
3503
+ }
3504
+ },
3505
+ "hasDynamicHelp": false,
3506
+ "hiddenAliases": [],
3507
+ "id": "sql-audit:usage",
3508
+ "pluginAlias": "@memberjunction/cli",
3509
+ "pluginName": "@memberjunction/cli",
3510
+ "pluginType": "core",
3511
+ "strict": true,
3512
+ "enableJsonFlag": false,
3513
+ "isESM": true,
3514
+ "relativePath": [
3515
+ "dist",
3516
+ "commands",
3517
+ "sql-audit",
3518
+ "usage.js"
3519
+ ]
3520
+ },
3521
+ "rubric:diff": {
3522
+ "aliases": [],
3523
+ "args": {
3524
+ "rubric": {
3525
+ "description": "Rubric name or id",
3526
+ "name": "rubric",
3527
+ "required": true
3528
+ },
3529
+ "from": {
3530
+ "description": "Version 1.2.0 or id",
3531
+ "name": "from",
3532
+ "required": true
3533
+ },
3534
+ "to": {
3535
+ "description": "Version 1.2.0 or id",
3536
+ "name": "to",
3537
+ "required": true
3538
+ }
3539
+ },
3540
+ "description": "Print the version bump between two rubric versions.",
3541
+ "flags": {},
3542
+ "hasDynamicHelp": false,
3543
+ "hiddenAliases": [],
3544
+ "id": "rubric:diff",
3545
+ "pluginAlias": "@memberjunction/cli",
3546
+ "pluginName": "@memberjunction/cli",
3547
+ "pluginType": "core",
3548
+ "strict": true,
3549
+ "enableJsonFlag": false,
3550
+ "isESM": true,
3551
+ "relativePath": [
3552
+ "dist",
3553
+ "commands",
3554
+ "rubric",
3555
+ "diff.js"
3556
+ ]
3557
+ },
3558
+ "rubric:evaluate": {
3559
+ "aliases": [],
3560
+ "args": {},
3561
+ "description": "Evaluate one record against a rubric. Does not publish.",
3562
+ "flags": {
3563
+ "rubric": {
3564
+ "description": "Rubric name or id, optionally @version",
3565
+ "name": "rubric",
3566
+ "required": true,
3567
+ "hasDynamicHelp": false,
3568
+ "multiple": false,
3569
+ "type": "option"
3570
+ },
3571
+ "entity": {
3572
+ "description": "Subject entity name",
3573
+ "name": "entity",
3574
+ "required": true,
3575
+ "hasDynamicHelp": false,
3576
+ "multiple": false,
3577
+ "type": "option"
3578
+ },
3579
+ "record": {
3580
+ "description": "Subject record id",
3581
+ "name": "record",
3582
+ "required": true,
3583
+ "hasDynamicHelp": false,
3584
+ "multiple": false,
3585
+ "type": "option"
3586
+ },
3587
+ "evaluator": {
3588
+ "description": "LLM or Deterministic",
3589
+ "name": "evaluator",
3590
+ "default": "LLM",
3591
+ "hasDynamicHelp": false,
3592
+ "multiple": false,
3593
+ "type": "option"
3594
+ }
3595
+ },
3596
+ "hasDynamicHelp": false,
3597
+ "hiddenAliases": [],
3598
+ "id": "rubric:evaluate",
3599
+ "pluginAlias": "@memberjunction/cli",
3600
+ "pluginName": "@memberjunction/cli",
3601
+ "pluginType": "core",
3602
+ "strict": true,
3603
+ "enableJsonFlag": false,
3604
+ "isESM": true,
3605
+ "relativePath": [
3606
+ "dist",
3607
+ "commands",
3608
+ "rubric",
3609
+ "evaluate.js"
3610
+ ]
3611
+ },
3612
+ "rubric": {
3613
+ "aliases": [],
3614
+ "args": {},
3615
+ "description": "List, show, diff, validate, and evaluate rubrics.",
3616
+ "flags": {},
3617
+ "hasDynamicHelp": false,
3618
+ "hiddenAliases": [],
3619
+ "id": "rubric",
3620
+ "pluginAlias": "@memberjunction/cli",
3621
+ "pluginName": "@memberjunction/cli",
3622
+ "pluginType": "core",
3623
+ "strict": true,
3624
+ "enableJsonFlag": false,
3625
+ "isESM": true,
3626
+ "relativePath": [
3627
+ "dist",
3628
+ "commands",
3629
+ "rubric",
3630
+ "index.js"
3631
+ ]
3632
+ },
3633
+ "rubric:list": {
3634
+ "aliases": [],
3635
+ "args": {},
3636
+ "description": "List rubrics.",
3637
+ "flags": {},
3638
+ "hasDynamicHelp": false,
3639
+ "hiddenAliases": [],
3640
+ "id": "rubric:list",
3407
3641
  "pluginAlias": "@memberjunction/cli",
3408
3642
  "pluginName": "@memberjunction/cli",
3409
3643
  "pluginType": "core",
@@ -3413,64 +3647,24 @@
3413
3647
  "relativePath": [
3414
3648
  "dist",
3415
3649
  "commands",
3416
- "querygen",
3417
- "validate.js"
3650
+ "rubric",
3651
+ "list.js"
3418
3652
  ]
3419
3653
  },
3420
- "sql-audit": {
3654
+ "rubric:show": {
3421
3655
  "aliases": [],
3422
- "args": {},
3423
- "description": "Compare source and target databases for migration verification",
3424
- "examples": [
3425
- "<%= config.bin %> sql-audit --source \"mssql://sa:pass@host/db\" --target \"postgres://user:pass@host:5432/db\"",
3426
- "<%= config.bin %> sql-audit --source \"mssql://sa:pass@host/db\" --target \"postgres://user:pass@host:5432/db\" --output report.txt",
3427
- "<%= config.bin %> sql-audit --source \"mssql://sa:pass@host/db\" --target \"postgres://user:pass@host:5432/db\" --source-schema __mj --target-schema __mj"
3428
- ],
3429
- "flags": {
3430
- "source": {
3431
- "description": "Source database connection string (mssql://... or postgres://...)",
3432
- "name": "source",
3433
- "required": true,
3434
- "hasDynamicHelp": false,
3435
- "multiple": false,
3436
- "type": "option"
3437
- },
3438
- "target": {
3439
- "description": "Target database connection string (mssql://... or postgres://...)",
3440
- "name": "target",
3441
- "required": true,
3442
- "hasDynamicHelp": false,
3443
- "multiple": false,
3444
- "type": "option"
3445
- },
3446
- "source-schema": {
3447
- "description": "Source schema name",
3448
- "name": "source-schema",
3449
- "default": "__mj",
3450
- "hasDynamicHelp": false,
3451
- "multiple": false,
3452
- "type": "option"
3453
- },
3454
- "target-schema": {
3455
- "description": "Target schema name",
3456
- "name": "target-schema",
3457
- "default": "__mj",
3458
- "hasDynamicHelp": false,
3459
- "multiple": false,
3460
- "type": "option"
3461
- },
3462
- "output": {
3463
- "char": "o",
3464
- "description": "Save report to file",
3465
- "name": "output",
3466
- "hasDynamicHelp": false,
3467
- "multiple": false,
3468
- "type": "option"
3656
+ "args": {
3657
+ "rubric": {
3658
+ "description": "Rubric name or id, optionally @version",
3659
+ "name": "rubric",
3660
+ "required": true
3469
3661
  }
3470
3662
  },
3663
+ "description": "Show a rubric version and its criteria.",
3664
+ "flags": {},
3471
3665
  "hasDynamicHelp": false,
3472
3666
  "hiddenAliases": [],
3473
- "id": "sql-audit",
3667
+ "id": "rubric:show",
3474
3668
  "pluginAlias": "@memberjunction/cli",
3475
3669
  "pluginName": "@memberjunction/cli",
3476
3670
  "pluginType": "core",
@@ -3480,31 +3674,24 @@
3480
3674
  "relativePath": [
3481
3675
  "dist",
3482
3676
  "commands",
3483
- "sql-audit",
3484
- "index.js"
3677
+ "rubric",
3678
+ "show.js"
3485
3679
  ]
3486
3680
  },
3487
- "sql-audit:usage": {
3681
+ "rubric:validate": {
3488
3682
  "aliases": [],
3489
- "args": {},
3490
- "description": "Show usage, flags, examples, and runtime hints for every `mj sql-audit` command.",
3491
- "flags": {
3492
- "format": {
3493
- "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
3494
- "name": "format",
3495
- "hasDynamicHelp": false,
3496
- "multiple": false,
3497
- "options": [
3498
- "text",
3499
- "json",
3500
- "md"
3501
- ],
3502
- "type": "option"
3683
+ "args": {
3684
+ "file": {
3685
+ "description": "JSON snapshot file",
3686
+ "name": "file",
3687
+ "required": true
3503
3688
  }
3504
3689
  },
3690
+ "description": "Check a rubric snapshot file for duplicate keys, gates, weights, and scales.",
3691
+ "flags": {},
3505
3692
  "hasDynamicHelp": false,
3506
3693
  "hiddenAliases": [],
3507
- "id": "sql-audit:usage",
3694
+ "id": "rubric:validate",
3508
3695
  "pluginAlias": "@memberjunction/cli",
3509
3696
  "pluginName": "@memberjunction/cli",
3510
3697
  "pluginType": "core",
@@ -3514,8 +3701,8 @@
3514
3701
  "relativePath": [
3515
3702
  "dist",
3516
3703
  "commands",
3517
- "sql-audit",
3518
- "usage.js"
3704
+ "rubric",
3705
+ "validate.js"
3519
3706
  ]
3520
3707
  },
3521
3708
  "sql-convert": {
@@ -4002,11 +4189,6 @@
4002
4189
  "aliases": [],
4003
4190
  "args": {},
4004
4191
  "description": "Pull metadata from database to local files",
4005
- "examples": [
4006
- "<%= config.bin %> <%= command.id %> --entity=\"MJ: AI Prompts\"",
4007
- "<%= config.bin %> <%= command.id %> --entity=\"MJ: AI Agents\" --merge-strategy=overwrite",
4008
- "<%= config.bin %> <%= command.id %> --entity=\"Templates\" --dry-run --verbose"
4009
- ],
4010
4192
  "flags": {
4011
4193
  "format": {
4012
4194
  "description": "Output format: text (human), json (machine-readable), md (Markdown-fenced). Defaults to text on a terminal and json when stdout is piped.",
@@ -4163,6 +4345,11 @@
4163
4345
  "pluginType": "core",
4164
4346
  "strict": true,
4165
4347
  "enableJsonFlag": false,
4348
+ "Examples": [
4349
+ "<%= config.bin %> <%= command.id %> --entity=\"MJ: AI Prompts\"",
4350
+ "<%= config.bin %> <%= command.id %> --entity=\"MJ: AI Agents\" --merge-strategy=overwrite",
4351
+ "<%= config.bin %> <%= command.id %> --entity=\"Templates\" --dry-run --verbose"
4352
+ ],
4166
4353
  "Usage": {
4167
4354
  "domain": "sync",
4168
4355
  "command": "sync:pull",
@@ -4217,12 +4404,6 @@
4217
4404
  "aliases": [],
4218
4405
  "args": {},
4219
4406
  "description": "Push local file changes to the database",
4220
- "examples": [
4221
- "<%= config.bin %> <%= command.id %>",
4222
- "<%= config.bin %> <%= command.id %> --dry-run",
4223
- "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
4224
- "<%= config.bin %> <%= command.id %> --ci --format=json"
4225
- ],
4226
4407
  "flags": {
4227
4408
  "format": {
4228
4409
  "description": "Output format: text (human), json (machine-readable), md (Markdown-fenced). Defaults to text on a terminal and json when stdout is piped.",
@@ -4343,6 +4524,12 @@
4343
4524
  "pluginType": "core",
4344
4525
  "strict": true,
4345
4526
  "enableJsonFlag": false,
4527
+ "Examples": [
4528
+ "<%= config.bin %> <%= command.id %>",
4529
+ "<%= config.bin %> <%= command.id %> --dry-run",
4530
+ "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
4531
+ "<%= config.bin %> <%= command.id %> --ci --format=json"
4532
+ ],
4346
4533
  "Usage": {
4347
4534
  "domain": "sync",
4348
4535
  "command": "sync:push",
@@ -4522,23 +4709,177 @@
4522
4709
  "allowNo": false,
4523
4710
  "type": "boolean"
4524
4711
  },
4525
- "save-report": {
4526
- "description": "Save validation report as markdown file",
4527
- "name": "save-report",
4712
+ "save-report": {
4713
+ "description": "Save validation report as markdown file",
4714
+ "name": "save-report",
4715
+ "allowNo": false,
4716
+ "type": "boolean"
4717
+ },
4718
+ "output": {
4719
+ "description": "Output file path for validation report (default: validation-report.md)",
4720
+ "name": "output",
4721
+ "hasDynamicHelp": false,
4722
+ "multiple": false,
4723
+ "type": "option"
4724
+ }
4725
+ },
4726
+ "hasDynamicHelp": false,
4727
+ "hiddenAliases": [],
4728
+ "id": "sync:validate",
4729
+ "pluginAlias": "@memberjunction/cli",
4730
+ "pluginName": "@memberjunction/cli",
4731
+ "pluginType": "core",
4732
+ "strict": true,
4733
+ "enableJsonFlag": false,
4734
+ "isESM": true,
4735
+ "relativePath": [
4736
+ "dist",
4737
+ "commands",
4738
+ "sync",
4739
+ "validate.js"
4740
+ ]
4741
+ },
4742
+ "sync:watch": {
4743
+ "aliases": [],
4744
+ "args": {},
4745
+ "description": "Watch for file changes and sync automatically",
4746
+ "examples": [
4747
+ "<%= config.bin %> <%= command.id %>",
4748
+ "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
4749
+ "<%= config.bin %> <%= command.id %> --debounce=1000",
4750
+ "<%= config.bin %> <%= command.id %> --no-validate"
4751
+ ],
4752
+ "flags": {
4753
+ "dir": {
4754
+ "description": "Specific entity directory to watch",
4755
+ "name": "dir",
4756
+ "hasDynamicHelp": false,
4757
+ "multiple": false,
4758
+ "type": "option"
4759
+ },
4760
+ "debounce": {
4761
+ "description": "Debounce delay in milliseconds (default: 500)",
4762
+ "name": "debounce",
4763
+ "hasDynamicHelp": false,
4764
+ "multiple": false,
4765
+ "type": "option"
4766
+ },
4767
+ "no-validate": {
4768
+ "description": "Skip validation before sync",
4769
+ "name": "no-validate",
4770
+ "allowNo": false,
4771
+ "type": "boolean"
4772
+ },
4773
+ "verbose": {
4774
+ "char": "v",
4775
+ "description": "Show detailed output",
4776
+ "name": "verbose",
4777
+ "allowNo": false,
4778
+ "type": "boolean"
4779
+ }
4780
+ },
4781
+ "hasDynamicHelp": false,
4782
+ "hiddenAliases": [],
4783
+ "id": "sync:watch",
4784
+ "pluginAlias": "@memberjunction/cli",
4785
+ "pluginName": "@memberjunction/cli",
4786
+ "pluginType": "core",
4787
+ "strict": true,
4788
+ "enableJsonFlag": false,
4789
+ "isESM": true,
4790
+ "relativePath": [
4791
+ "dist",
4792
+ "commands",
4793
+ "sync",
4794
+ "watch.js"
4795
+ ]
4796
+ },
4797
+ "translate-sql": {
4798
+ "aliases": [],
4799
+ "args": {},
4800
+ "description": "Translate SQL fragments between database dialects (SQL Server ↔ PostgreSQL)",
4801
+ "examples": [
4802
+ "<%= config.bin %> translate-sql --from sqlserver --to postgresql --dry-run",
4803
+ "<%= config.bin %> translate-sql --from sqlserver --to postgresql --scope queries",
4804
+ "<%= config.bin %> translate-sql --from sqlserver --to postgresql --sql \"SELECT TOP 10 [Name] FROM [Users]\"",
4805
+ "<%= config.bin %> translate-sql --from sqlserver --to postgresql --scope all --output ./reports"
4806
+ ],
4807
+ "flags": {
4808
+ "from": {
4809
+ "description": "Source SQL dialect",
4810
+ "name": "from",
4811
+ "required": true,
4812
+ "hasDynamicHelp": false,
4813
+ "multiple": false,
4814
+ "options": [
4815
+ "sqlserver",
4816
+ "postgresql"
4817
+ ],
4818
+ "type": "option"
4819
+ },
4820
+ "to": {
4821
+ "description": "Target SQL dialect",
4822
+ "name": "to",
4823
+ "required": true,
4824
+ "hasDynamicHelp": false,
4825
+ "multiple": false,
4826
+ "options": [
4827
+ "sqlserver",
4828
+ "postgresql"
4829
+ ],
4830
+ "type": "option"
4831
+ },
4832
+ "scope": {
4833
+ "description": "What to scan for translation",
4834
+ "name": "scope",
4835
+ "default": "all",
4836
+ "hasDynamicHelp": false,
4837
+ "multiple": false,
4838
+ "options": [
4839
+ "queries",
4840
+ "views",
4841
+ "filters",
4842
+ "all"
4843
+ ],
4844
+ "type": "option"
4845
+ },
4846
+ "sql": {
4847
+ "description": "Translate a single SQL fragment (inline mode)",
4848
+ "name": "sql",
4849
+ "hasDynamicHelp": false,
4850
+ "multiple": false,
4851
+ "type": "option"
4852
+ },
4853
+ "dry-run": {
4854
+ "description": "Show what would be translated without making changes",
4855
+ "name": "dry-run",
4856
+ "allowNo": false,
4857
+ "type": "boolean"
4858
+ },
4859
+ "review": {
4860
+ "description": "Generate review report only (no writes to database)",
4861
+ "name": "review",
4528
4862
  "allowNo": false,
4529
4863
  "type": "boolean"
4530
4864
  },
4531
4865
  "output": {
4532
- "description": "Output file path for validation report (default: validation-report.md)",
4866
+ "char": "o",
4867
+ "description": "Output directory for the translation report",
4533
4868
  "name": "output",
4534
4869
  "hasDynamicHelp": false,
4535
4870
  "multiple": false,
4536
4871
  "type": "option"
4872
+ },
4873
+ "force": {
4874
+ "description": "Re-translate even if platform variants already exist",
4875
+ "name": "force",
4876
+ "allowNo": false,
4877
+ "type": "boolean"
4537
4878
  }
4538
4879
  },
4539
4880
  "hasDynamicHelp": false,
4540
4881
  "hiddenAliases": [],
4541
- "id": "sync:validate",
4882
+ "id": "translate-sql",
4542
4883
  "pluginAlias": "@memberjunction/cli",
4543
4884
  "pluginName": "@memberjunction/cli",
4544
4885
  "pluginType": "core",
@@ -4548,52 +4889,31 @@
4548
4889
  "relativePath": [
4549
4890
  "dist",
4550
4891
  "commands",
4551
- "sync",
4552
- "validate.js"
4892
+ "translate-sql",
4893
+ "index.js"
4553
4894
  ]
4554
4895
  },
4555
- "sync:watch": {
4896
+ "translate-sql:usage": {
4556
4897
  "aliases": [],
4557
4898
  "args": {},
4558
- "description": "Watch for file changes and sync automatically",
4559
- "examples": [
4560
- "<%= config.bin %> <%= command.id %>",
4561
- "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
4562
- "<%= config.bin %> <%= command.id %> --debounce=1000",
4563
- "<%= config.bin %> <%= command.id %> --no-validate"
4564
- ],
4899
+ "description": "Show usage, flags, examples, and runtime hints for every `mj translate-sql` command.",
4565
4900
  "flags": {
4566
- "dir": {
4567
- "description": "Specific entity directory to watch",
4568
- "name": "dir",
4569
- "hasDynamicHelp": false,
4570
- "multiple": false,
4571
- "type": "option"
4572
- },
4573
- "debounce": {
4574
- "description": "Debounce delay in milliseconds (default: 500)",
4575
- "name": "debounce",
4901
+ "format": {
4902
+ "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
4903
+ "name": "format",
4576
4904
  "hasDynamicHelp": false,
4577
4905
  "multiple": false,
4906
+ "options": [
4907
+ "text",
4908
+ "json",
4909
+ "md"
4910
+ ],
4578
4911
  "type": "option"
4579
- },
4580
- "no-validate": {
4581
- "description": "Skip validation before sync",
4582
- "name": "no-validate",
4583
- "allowNo": false,
4584
- "type": "boolean"
4585
- },
4586
- "verbose": {
4587
- "char": "v",
4588
- "description": "Show detailed output",
4589
- "name": "verbose",
4590
- "allowNo": false,
4591
- "type": "boolean"
4592
4912
  }
4593
4913
  },
4594
4914
  "hasDynamicHelp": false,
4595
4915
  "hiddenAliases": [],
4596
- "id": "sync:watch",
4916
+ "id": "translate-sql:usage",
4597
4917
  "pluginAlias": "@memberjunction/cli",
4598
4918
  "pluginName": "@memberjunction/cli",
4599
4919
  "pluginType": "core",
@@ -4603,8 +4923,8 @@
4603
4923
  "relativePath": [
4604
4924
  "dist",
4605
4925
  "commands",
4606
- "sync",
4607
- "watch.js"
4926
+ "translate-sql",
4927
+ "usage.js"
4608
4928
  ]
4609
4929
  },
4610
4930
  "test:compare": {
@@ -4944,6 +5264,64 @@
4944
5264
  "list.js"
4945
5265
  ]
4946
5266
  },
5267
+ "test:promote-criteria": {
5268
+ "aliases": [],
5269
+ "args": {
5270
+ "test": {
5271
+ "description": "Test name or ID",
5272
+ "name": "test",
5273
+ "required": true
5274
+ }
5275
+ },
5276
+ "description": "Copy a test's inline judge criteria into a Draft rubric and set Test.RubricID. Does not publish.",
5277
+ "examples": [
5278
+ "<%= config.bin %> <%= command.id %> <test-id>",
5279
+ "<%= config.bin %> <%= command.id %> \"Reply check\""
5280
+ ],
5281
+ "flags": {},
5282
+ "hasDynamicHelp": false,
5283
+ "hiddenAliases": [],
5284
+ "id": "test:promote-criteria",
5285
+ "pluginAlias": "@memberjunction/cli",
5286
+ "pluginName": "@memberjunction/cli",
5287
+ "pluginType": "core",
5288
+ "strict": true,
5289
+ "enableJsonFlag": false,
5290
+ "isESM": true,
5291
+ "relativePath": [
5292
+ "dist",
5293
+ "commands",
5294
+ "test",
5295
+ "promote-criteria.js"
5296
+ ]
5297
+ },
5298
+ "test:report": {
5299
+ "aliases": [],
5300
+ "args": {
5301
+ "runId": {
5302
+ "description": "Test run ID",
5303
+ "name": "runId",
5304
+ "required": true
5305
+ }
5306
+ },
5307
+ "description": "Print the per-criterion rubric breakdown for a test run.",
5308
+ "flags": {},
5309
+ "hasDynamicHelp": false,
5310
+ "hiddenAliases": [],
5311
+ "id": "test:report",
5312
+ "pluginAlias": "@memberjunction/cli",
5313
+ "pluginName": "@memberjunction/cli",
5314
+ "pluginType": "core",
5315
+ "strict": true,
5316
+ "enableJsonFlag": false,
5317
+ "isESM": true,
5318
+ "relativePath": [
5319
+ "dist",
5320
+ "commands",
5321
+ "test",
5322
+ "report.js"
5323
+ ]
5324
+ },
4947
5325
  "test:run": {
4948
5326
  "aliases": [],
4949
5327
  "args": {
@@ -5024,6 +5402,13 @@
5024
5402
  "multiple": false,
5025
5403
  "type": "option"
5026
5404
  },
5405
+ "rubric": {
5406
+ "description": "Rubric override: name or id, optionally @version (1.2.0 or a version id)",
5407
+ "name": "rubric",
5408
+ "hasDynamicHelp": false,
5409
+ "multiple": false,
5410
+ "type": "option"
5411
+ },
5027
5412
  "oracles-module": {
5028
5413
  "description": "Path to a JS/TS module that exports custom IOracle classes or instances. Each export is registered on the engine before the test runs — used by non-MJ adopters to plug app-specific oracle types without modifying TestingFramework.",
5029
5414
  "name": "oracles-module",
@@ -5191,6 +5576,13 @@
5191
5576
  "multiple": false,
5192
5577
  "type": "option"
5193
5578
  },
5579
+ "rubric": {
5580
+ "description": "Rubric override for every test: name or id, optionally @version",
5581
+ "name": "rubric",
5582
+ "hasDynamicHelp": false,
5583
+ "multiple": false,
5584
+ "type": "option"
5585
+ },
5194
5586
  "flaky-check": {
5195
5587
  "description": "Run each test N times to detect flakiness (variance > 0.3 or mixed pass/fail = flaky). Recommended: 3 or 5",
5196
5588
  "name": "flaky-check",
@@ -5352,139 +5744,6 @@
5352
5744
  "validate.js"
5353
5745
  ]
5354
5746
  },
5355
- "translate-sql": {
5356
- "aliases": [],
5357
- "args": {},
5358
- "description": "Translate SQL fragments between database dialects (SQL Server ↔ PostgreSQL)",
5359
- "examples": [
5360
- "<%= config.bin %> translate-sql --from sqlserver --to postgresql --dry-run",
5361
- "<%= config.bin %> translate-sql --from sqlserver --to postgresql --scope queries",
5362
- "<%= config.bin %> translate-sql --from sqlserver --to postgresql --sql \"SELECT TOP 10 [Name] FROM [Users]\"",
5363
- "<%= config.bin %> translate-sql --from sqlserver --to postgresql --scope all --output ./reports"
5364
- ],
5365
- "flags": {
5366
- "from": {
5367
- "description": "Source SQL dialect",
5368
- "name": "from",
5369
- "required": true,
5370
- "hasDynamicHelp": false,
5371
- "multiple": false,
5372
- "options": [
5373
- "sqlserver",
5374
- "postgresql"
5375
- ],
5376
- "type": "option"
5377
- },
5378
- "to": {
5379
- "description": "Target SQL dialect",
5380
- "name": "to",
5381
- "required": true,
5382
- "hasDynamicHelp": false,
5383
- "multiple": false,
5384
- "options": [
5385
- "sqlserver",
5386
- "postgresql"
5387
- ],
5388
- "type": "option"
5389
- },
5390
- "scope": {
5391
- "description": "What to scan for translation",
5392
- "name": "scope",
5393
- "default": "all",
5394
- "hasDynamicHelp": false,
5395
- "multiple": false,
5396
- "options": [
5397
- "queries",
5398
- "views",
5399
- "filters",
5400
- "all"
5401
- ],
5402
- "type": "option"
5403
- },
5404
- "sql": {
5405
- "description": "Translate a single SQL fragment (inline mode)",
5406
- "name": "sql",
5407
- "hasDynamicHelp": false,
5408
- "multiple": false,
5409
- "type": "option"
5410
- },
5411
- "dry-run": {
5412
- "description": "Show what would be translated without making changes",
5413
- "name": "dry-run",
5414
- "allowNo": false,
5415
- "type": "boolean"
5416
- },
5417
- "review": {
5418
- "description": "Generate review report only (no writes to database)",
5419
- "name": "review",
5420
- "allowNo": false,
5421
- "type": "boolean"
5422
- },
5423
- "output": {
5424
- "char": "o",
5425
- "description": "Output directory for the translation report",
5426
- "name": "output",
5427
- "hasDynamicHelp": false,
5428
- "multiple": false,
5429
- "type": "option"
5430
- },
5431
- "force": {
5432
- "description": "Re-translate even if platform variants already exist",
5433
- "name": "force",
5434
- "allowNo": false,
5435
- "type": "boolean"
5436
- }
5437
- },
5438
- "hasDynamicHelp": false,
5439
- "hiddenAliases": [],
5440
- "id": "translate-sql",
5441
- "pluginAlias": "@memberjunction/cli",
5442
- "pluginName": "@memberjunction/cli",
5443
- "pluginType": "core",
5444
- "strict": true,
5445
- "enableJsonFlag": false,
5446
- "isESM": true,
5447
- "relativePath": [
5448
- "dist",
5449
- "commands",
5450
- "translate-sql",
5451
- "index.js"
5452
- ]
5453
- },
5454
- "translate-sql:usage": {
5455
- "aliases": [],
5456
- "args": {},
5457
- "description": "Show usage, flags, examples, and runtime hints for every `mj translate-sql` command.",
5458
- "flags": {
5459
- "format": {
5460
- "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
5461
- "name": "format",
5462
- "hasDynamicHelp": false,
5463
- "multiple": false,
5464
- "options": [
5465
- "text",
5466
- "json",
5467
- "md"
5468
- ],
5469
- "type": "option"
5470
- }
5471
- },
5472
- "hasDynamicHelp": false,
5473
- "hiddenAliases": [],
5474
- "id": "translate-sql:usage",
5475
- "pluginAlias": "@memberjunction/cli",
5476
- "pluginName": "@memberjunction/cli",
5477
- "pluginType": "core",
5478
- "strict": true,
5479
- "enableJsonFlag": false,
5480
- "isESM": true,
5481
- "relativePath": [
5482
- "dist",
5483
- "commands",
5484
- "translate-sql",
5485
- "usage.js"
5486
- ]
5487
- },
5488
5747
  "update:claude": {
5489
5748
  "aliases": [],
5490
5749
  "args": {},
@@ -7020,5 +7279,5 @@
7020
7279
  ]
7021
7280
  }
7022
7281
  },
7023
- "version": "6.2.0-edge.0"
7282
+ "version": "6.2.0-edge.2"
7024
7283
  }