@xylabs/toolchain 7.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (622) hide show
  1. package/dist/actions/analyze.mjs +140 -0
  2. package/dist/actions/analyze.mjs.map +1 -0
  3. package/dist/actions/build.mjs +173 -0
  4. package/dist/actions/build.mjs.map +1 -0
  5. package/dist/actions/claude-check.mjs +199 -0
  6. package/dist/actions/claude-check.mjs.map +1 -0
  7. package/dist/actions/claude-clean.mjs +70 -0
  8. package/dist/actions/claude-clean.mjs.map +1 -0
  9. package/dist/actions/claude-commands.mjs +126 -0
  10. package/dist/actions/claude-commands.mjs.map +1 -0
  11. package/dist/actions/claude-rules.mjs +151 -0
  12. package/dist/actions/claude-rules.mjs.map +1 -0
  13. package/dist/actions/claude-settings.mjs +99 -0
  14. package/dist/actions/claude-settings.mjs.map +1 -0
  15. package/dist/actions/claude-skills.mjs +131 -0
  16. package/dist/actions/claude-skills.mjs.map +1 -0
  17. package/dist/actions/clean-docs.mjs +66 -0
  18. package/dist/actions/clean-docs.mjs.map +1 -0
  19. package/dist/actions/clean-eslint.mjs +47 -0
  20. package/dist/actions/clean-eslint.mjs.map +1 -0
  21. package/dist/actions/clean.mjs +166 -0
  22. package/dist/actions/clean.mjs.map +1 -0
  23. package/dist/actions/compile.mjs +184 -0
  24. package/dist/actions/compile.mjs.map +1 -0
  25. package/dist/actions/copy-assets.mjs +81 -0
  26. package/dist/actions/copy-assets.mjs.map +1 -0
  27. package/dist/actions/cycle.mjs +275 -0
  28. package/dist/actions/cycle.mjs.map +1 -0
  29. package/dist/actions/dead.mjs +119 -0
  30. package/dist/actions/dead.mjs.map +1 -0
  31. package/dist/actions/deplint/checkPackage/checkPackage.mjs +1556 -0
  32. package/dist/actions/deplint/checkPackage/checkPackage.mjs.map +1 -0
  33. package/dist/actions/deplint/checkPackage/checkPackageTypes.mjs +1 -0
  34. package/dist/actions/deplint/checkPackage/checkPackageTypes.mjs.map +1 -0
  35. package/dist/actions/deplint/checkPackage/getMismatchedPeerDevVersions.mjs +77 -0
  36. package/dist/actions/deplint/checkPackage/getMismatchedPeerDevVersions.mjs.map +1 -0
  37. package/dist/actions/deplint/checkPackage/getUnlistedDependencies.mjs +158 -0
  38. package/dist/actions/deplint/checkPackage/getUnlistedDependencies.mjs.map +1 -0
  39. package/dist/actions/deplint/checkPackage/getUnlistedDevDependencies.mjs +125 -0
  40. package/dist/actions/deplint/checkPackage/getUnlistedDevDependencies.mjs.map +1 -0
  41. package/dist/actions/deplint/checkPackage/getUnnecessaryPeerDependencies.mjs +207 -0
  42. package/dist/actions/deplint/checkPackage/getUnnecessaryPeerDependencies.mjs.map +1 -0
  43. package/dist/actions/deplint/checkPackage/getUnsatisfiedPeerDependencies.mjs +318 -0
  44. package/dist/actions/deplint/checkPackage/getUnsatisfiedPeerDependencies.mjs.map +1 -0
  45. package/dist/actions/deplint/checkPackage/getUnusedDependencies.mjs +163 -0
  46. package/dist/actions/deplint/checkPackage/getUnusedDependencies.mjs.map +1 -0
  47. package/dist/actions/deplint/checkPackage/getUnusedDevDependencies.mjs +408 -0
  48. package/dist/actions/deplint/checkPackage/getUnusedDevDependencies.mjs.map +1 -0
  49. package/dist/actions/deplint/checkPackage/getUnusedPeerDependencies.mjs +75 -0
  50. package/dist/actions/deplint/checkPackage/getUnusedPeerDependencies.mjs.map +1 -0
  51. package/dist/actions/deplint/checkPackage/getWorkspaceVersionProblems.mjs +128 -0
  52. package/dist/actions/deplint/checkPackage/getWorkspaceVersionProblems.mjs.map +1 -0
  53. package/dist/actions/deplint/checkPackage/index.mjs +1609 -0
  54. package/dist/actions/deplint/checkPackage/index.mjs.map +1 -0
  55. package/dist/actions/deplint/deplint.mjs +1840 -0
  56. package/dist/actions/deplint/deplint.mjs.map +1 -0
  57. package/dist/actions/deplint/engine.mjs +1736 -0
  58. package/dist/actions/deplint/engine.mjs.map +1 -0
  59. package/dist/actions/deplint/findFiles.mjs +39 -0
  60. package/dist/actions/deplint/findFiles.mjs.map +1 -0
  61. package/dist/actions/deplint/findFilesByGlob.mjs +14 -0
  62. package/dist/actions/deplint/findFilesByGlob.mjs.map +1 -0
  63. package/dist/actions/deplint/fixer.mjs +103 -0
  64. package/dist/actions/deplint/fixer.mjs.map +1 -0
  65. package/dist/actions/deplint/getBasePackageName.mjs +13 -0
  66. package/dist/actions/deplint/getBasePackageName.mjs.map +1 -0
  67. package/dist/actions/deplint/getCliReferencedPackagesFromFiles.mjs +140 -0
  68. package/dist/actions/deplint/getCliReferencedPackagesFromFiles.mjs.map +1 -0
  69. package/dist/actions/deplint/getDependenciesFromPackageJson.mjs +29 -0
  70. package/dist/actions/deplint/getDependenciesFromPackageJson.mjs.map +1 -0
  71. package/dist/actions/deplint/getExtendsFromTsconfigs.mjs +68 -0
  72. package/dist/actions/deplint/getExtendsFromTsconfigs.mjs.map +1 -0
  73. package/dist/actions/deplint/getExternalImportsFromFiles.mjs +143 -0
  74. package/dist/actions/deplint/getExternalImportsFromFiles.mjs.map +1 -0
  75. package/dist/actions/deplint/getImportsFromFile.mjs +85 -0
  76. package/dist/actions/deplint/getImportsFromFile.mjs.map +1 -0
  77. package/dist/actions/deplint/getRequiredPeerDependencies.mjs +37 -0
  78. package/dist/actions/deplint/getRequiredPeerDependencies.mjs.map +1 -0
  79. package/dist/actions/deplint/getScriptReferencedPackages.mjs +83 -0
  80. package/dist/actions/deplint/getScriptReferencedPackages.mjs.map +1 -0
  81. package/dist/actions/deplint/implicitDevDependencies.mjs +116 -0
  82. package/dist/actions/deplint/implicitDevDependencies.mjs.map +1 -0
  83. package/dist/actions/deplint/index.mjs +1848 -0
  84. package/dist/actions/deplint/index.mjs.map +1 -0
  85. package/dist/actions/deplint/packageEditor.mjs +82 -0
  86. package/dist/actions/deplint/packageEditor.mjs.map +1 -0
  87. package/dist/actions/deplint/packageJsonEditor.mjs +101 -0
  88. package/dist/actions/deplint/packageJsonEditor.mjs.map +1 -0
  89. package/dist/actions/deplint/reporters.mjs +36 -0
  90. package/dist/actions/deplint/reporters.mjs.map +1 -0
  91. package/dist/actions/deplint/rules.mjs +1223 -0
  92. package/dist/actions/deplint/rules.mjs.map +1 -0
  93. package/dist/actions/deplint/snapshot.mjs +372 -0
  94. package/dist/actions/deplint/snapshot.mjs.map +1 -0
  95. package/dist/actions/deplint/tsScriptsAliases.mjs +20 -0
  96. package/dist/actions/deplint/tsScriptsAliases.mjs.map +1 -0
  97. package/dist/actions/deplint/types.mjs +1 -0
  98. package/dist/actions/deplint/types.mjs.map +1 -0
  99. package/dist/actions/deploy.mjs +194 -0
  100. package/dist/actions/deploy.mjs.map +1 -0
  101. package/dist/actions/dupdeps.mjs +226 -0
  102. package/dist/actions/dupdeps.mjs.map +1 -0
  103. package/dist/actions/eject.mjs +142 -0
  104. package/dist/actions/eject.mjs.map +1 -0
  105. package/dist/actions/fix.mjs +359 -0
  106. package/dist/actions/fix.mjs.map +1 -0
  107. package/dist/actions/gen-docs.mjs +155 -0
  108. package/dist/actions/gen-docs.mjs.map +1 -0
  109. package/dist/actions/gitignore.mjs +159 -0
  110. package/dist/actions/gitignore.mjs.map +1 -0
  111. package/dist/actions/gitlint-fix.mjs +27 -0
  112. package/dist/actions/gitlint-fix.mjs.map +1 -0
  113. package/dist/actions/gitlint.mjs +48 -0
  114. package/dist/actions/gitlint.mjs.map +1 -0
  115. package/dist/actions/index.mjs +8259 -0
  116. package/dist/actions/index.mjs.map +1 -0
  117. package/dist/actions/knip.mjs +119 -0
  118. package/dist/actions/knip.mjs.map +1 -0
  119. package/dist/actions/license.mjs +92 -0
  120. package/dist/actions/license.mjs.map +1 -0
  121. package/dist/actions/lint-init.mjs +275 -0
  122. package/dist/actions/lint-init.mjs.map +1 -0
  123. package/dist/actions/lint.mjs +356 -0
  124. package/dist/actions/lint.mjs.map +1 -0
  125. package/dist/actions/lintNext.mjs +209 -0
  126. package/dist/actions/lintNext.mjs.map +1 -0
  127. package/dist/actions/lintlint.mjs +341 -0
  128. package/dist/actions/lintlint.mjs.map +1 -0
  129. package/dist/actions/npmignore-gen.mjs +90 -0
  130. package/dist/actions/npmignore-gen.mjs.map +1 -0
  131. package/dist/actions/orphan.mjs +110 -0
  132. package/dist/actions/orphan.mjs.map +1 -0
  133. package/dist/actions/package/clean-outputs.mjs +50 -0
  134. package/dist/actions/package/clean-outputs.mjs.map +1 -0
  135. package/dist/actions/package/clean-typescript.mjs +50 -0
  136. package/dist/actions/package/clean-typescript.mjs.map +1 -0
  137. package/dist/actions/package/clean.mjs +69 -0
  138. package/dist/actions/package/clean.mjs.map +1 -0
  139. package/dist/actions/package/compile/XyConfig.mjs +32 -0
  140. package/dist/actions/package/compile/XyConfig.mjs.map +1 -0
  141. package/dist/actions/package/compile/buildEntries.mjs +53 -0
  142. package/dist/actions/package/compile/buildEntries.mjs.map +1 -0
  143. package/dist/actions/package/compile/compile.mjs +439 -0
  144. package/dist/actions/package/compile/compile.mjs.map +1 -0
  145. package/dist/actions/package/compile/copyTypeFiles.mjs +34 -0
  146. package/dist/actions/package/compile/copyTypeFiles.mjs.map +1 -0
  147. package/dist/actions/package/compile/deepMerge.mjs +27 -0
  148. package/dist/actions/package/compile/deepMerge.mjs.map +1 -0
  149. package/dist/actions/package/compile/getCompilerOptions.mjs +12 -0
  150. package/dist/actions/package/compile/getCompilerOptions.mjs.map +1 -0
  151. package/dist/actions/package/compile/index.mjs +472 -0
  152. package/dist/actions/package/compile/index.mjs.map +1 -0
  153. package/dist/actions/package/compile/inputs.mjs +22 -0
  154. package/dist/actions/package/compile/inputs.mjs.map +1 -0
  155. package/dist/actions/package/compile/packageCompileTsc.mjs +93 -0
  156. package/dist/actions/package/compile/packageCompileTsc.mjs.map +1 -0
  157. package/dist/actions/package/compile/packageCompileTscTypes.mjs +92 -0
  158. package/dist/actions/package/compile/packageCompileTscTypes.mjs.map +1 -0
  159. package/dist/actions/package/compile/packageCompileTsup.mjs +402 -0
  160. package/dist/actions/package/compile/packageCompileTsup.mjs.map +1 -0
  161. package/dist/actions/package/copy-assets.mjs +69 -0
  162. package/dist/actions/package/copy-assets.mjs.map +1 -0
  163. package/dist/actions/package/cycle.mjs +62 -0
  164. package/dist/actions/package/cycle.mjs.map +1 -0
  165. package/dist/actions/package/gen-docs.mjs +137 -0
  166. package/dist/actions/package/gen-docs.mjs.map +1 -0
  167. package/dist/actions/package/index.mjs +1131 -0
  168. package/dist/actions/package/index.mjs.map +1 -0
  169. package/dist/actions/package/lint.mjs +87 -0
  170. package/dist/actions/package/lint.mjs.map +1 -0
  171. package/dist/actions/package/publint.mjs +336 -0
  172. package/dist/actions/package/publint.mjs.map +1 -0
  173. package/dist/actions/package/recompile.mjs +510 -0
  174. package/dist/actions/package/recompile.mjs.map +1 -0
  175. package/dist/actions/package-lint-deps.mjs +348 -0
  176. package/dist/actions/package-lint-deps.mjs.map +1 -0
  177. package/dist/actions/package-lint.mjs +774 -0
  178. package/dist/actions/package-lint.mjs.map +1 -0
  179. package/dist/actions/packman/clean.mjs +144 -0
  180. package/dist/actions/packman/clean.mjs.map +1 -0
  181. package/dist/actions/packman/convert.mjs +1331 -0
  182. package/dist/actions/packman/convert.mjs.map +1 -0
  183. package/dist/actions/packman/convertToPnpm.mjs +295 -0
  184. package/dist/actions/packman/convertToPnpm.mjs.map +1 -0
  185. package/dist/actions/packman/convertToYarn.mjs +307 -0
  186. package/dist/actions/packman/convertToYarn.mjs.map +1 -0
  187. package/dist/actions/packman/index.mjs +1493 -0
  188. package/dist/actions/packman/index.mjs.map +1 -0
  189. package/dist/actions/packman/lint.mjs +109 -0
  190. package/dist/actions/packman/lint.mjs.map +1 -0
  191. package/dist/actions/packman/rewriteScripts.mjs +52 -0
  192. package/dist/actions/packman/rewriteScripts.mjs.map +1 -0
  193. package/dist/actions/packman/rewriteSourceImports.mjs +60 -0
  194. package/dist/actions/packman/rewriteSourceImports.mjs.map +1 -0
  195. package/dist/actions/packman/swapTsScriptsDependency.mjs +57 -0
  196. package/dist/actions/packman/swapTsScriptsDependency.mjs.map +1 -0
  197. package/dist/actions/publint.mjs +748 -0
  198. package/dist/actions/publint.mjs.map +1 -0
  199. package/dist/actions/publish.mjs +208 -0
  200. package/dist/actions/publish.mjs.map +1 -0
  201. package/dist/actions/reactTest.mjs +142 -0
  202. package/dist/actions/reactTest.mjs.map +1 -0
  203. package/dist/actions/readme-gen.mjs +362 -0
  204. package/dist/actions/readme-gen.mjs.map +1 -0
  205. package/dist/actions/readme-init.mjs +89 -0
  206. package/dist/actions/readme-init.mjs.map +1 -0
  207. package/dist/actions/readme-lint.mjs +147 -0
  208. package/dist/actions/readme-lint.mjs.map +1 -0
  209. package/dist/actions/rebuild.mjs +143 -0
  210. package/dist/actions/rebuild.mjs.map +1 -0
  211. package/dist/actions/recompile.mjs +196 -0
  212. package/dist/actions/recompile.mjs.map +1 -0
  213. package/dist/actions/reinstall.mjs +283 -0
  214. package/dist/actions/reinstall.mjs.map +1 -0
  215. package/dist/actions/relint.mjs +355 -0
  216. package/dist/actions/relint.mjs.map +1 -0
  217. package/dist/actions/repo-init.mjs +217 -0
  218. package/dist/actions/repo-init.mjs.map +1 -0
  219. package/dist/actions/retest.mjs +150 -0
  220. package/dist/actions/retest.mjs.map +1 -0
  221. package/dist/actions/sitemap.mjs +121 -0
  222. package/dist/actions/sitemap.mjs.map +1 -0
  223. package/dist/actions/sonar.mjs +119 -0
  224. package/dist/actions/sonar.mjs.map +1 -0
  225. package/dist/actions/start.mjs +142 -0
  226. package/dist/actions/start.mjs.map +1 -0
  227. package/dist/actions/statics.mjs +225 -0
  228. package/dist/actions/statics.mjs.map +1 -0
  229. package/dist/actions/test.mjs +144 -0
  230. package/dist/actions/test.mjs.map +1 -0
  231. package/dist/actions/up.mjs +140 -0
  232. package/dist/actions/up.mjs.map +1 -0
  233. package/dist/actions/updo.mjs +533 -0
  234. package/dist/actions/updo.mjs.map +1 -0
  235. package/dist/actions/upplug.mjs +124 -0
  236. package/dist/actions/upplug.mjs.map +1 -0
  237. package/dist/actions/upyarn.mjs +119 -0
  238. package/dist/actions/upyarn.mjs.map +1 -0
  239. package/dist/actions/yarn3only.mjs +60 -0
  240. package/dist/actions/yarn3only.mjs.map +1 -0
  241. package/dist/bin/package/build-only.mjs +451 -0
  242. package/dist/bin/package/build-only.mjs.map +1 -0
  243. package/dist/bin/package/build.mjs +451 -0
  244. package/dist/bin/package/build.mjs.map +1 -0
  245. package/dist/bin/package/clean-outputs.mjs +50 -0
  246. package/dist/bin/package/clean-outputs.mjs.map +1 -0
  247. package/dist/bin/package/clean-typescript.mjs +50 -0
  248. package/dist/bin/package/clean-typescript.mjs.map +1 -0
  249. package/dist/bin/package/clean.mjs +75 -0
  250. package/dist/bin/package/clean.mjs.map +1 -0
  251. package/dist/bin/package/compile-only.mjs +447 -0
  252. package/dist/bin/package/compile-only.mjs.map +1 -0
  253. package/dist/bin/package/compile-tsup.mjs +409 -0
  254. package/dist/bin/package/compile-tsup.mjs.map +1 -0
  255. package/dist/bin/package/compile.mjs +451 -0
  256. package/dist/bin/package/compile.mjs.map +1 -0
  257. package/dist/bin/package/copy-assets-cjs.mjs +75 -0
  258. package/dist/bin/package/copy-assets-cjs.mjs.map +1 -0
  259. package/dist/bin/package/copy-assets-esm.mjs +75 -0
  260. package/dist/bin/package/copy-assets-esm.mjs.map +1 -0
  261. package/dist/bin/package/cycle.mjs +72 -0
  262. package/dist/bin/package/cycle.mjs.map +1 -0
  263. package/dist/bin/package/fix.mjs +97 -0
  264. package/dist/bin/package/fix.mjs.map +1 -0
  265. package/dist/bin/package/gen-docs.mjs +142 -0
  266. package/dist/bin/package/gen-docs.mjs.map +1 -0
  267. package/dist/bin/package/lint-verbose.mjs +97 -0
  268. package/dist/bin/package/lint-verbose.mjs.map +1 -0
  269. package/dist/bin/package/lint.mjs +97 -0
  270. package/dist/bin/package/lint.mjs.map +1 -0
  271. package/dist/bin/package/publint.mjs +423 -0
  272. package/dist/bin/package/publint.mjs.map +1 -0
  273. package/dist/bin/package/recompile.mjs +516 -0
  274. package/dist/bin/package/recompile.mjs.map +1 -0
  275. package/dist/bin/package/relint.mjs +97 -0
  276. package/dist/bin/package/relint.mjs.map +1 -0
  277. package/dist/bin/run-or-exec.mjs +20 -0
  278. package/dist/bin/run-or-exec.mjs.map +1 -0
  279. package/dist/bin/xy.mjs +8885 -0
  280. package/dist/bin/xy.mjs.map +1 -0
  281. package/dist/index.d.ts +1102 -0
  282. package/dist/index.mjs +9986 -0
  283. package/dist/index.mjs.map +1 -0
  284. package/dist/lib/checkResult.mjs +16 -0
  285. package/dist/lib/checkResult.mjs.map +1 -0
  286. package/dist/lib/claudeMdTemplate.mjs +69 -0
  287. package/dist/lib/claudeMdTemplate.mjs.map +1 -0
  288. package/dist/lib/concurrency.mjs +38 -0
  289. package/dist/lib/concurrency.mjs.map +1 -0
  290. package/dist/lib/createBuildConfig.mjs +55 -0
  291. package/dist/lib/createBuildConfig.mjs.map +1 -0
  292. package/dist/lib/defaultBuildConfig.mjs +23 -0
  293. package/dist/lib/defaultBuildConfig.mjs.map +1 -0
  294. package/dist/lib/deleteGlob.mjs +13 -0
  295. package/dist/lib/deleteGlob.mjs.map +1 -0
  296. package/dist/lib/dependencies/DuplicateDetector.mjs +99 -0
  297. package/dist/lib/dependencies/DuplicateDetector.mjs.map +1 -0
  298. package/dist/lib/dependencies/detectDuplicateDependencies.mjs +203 -0
  299. package/dist/lib/dependencies/detectDuplicateDependencies.mjs.map +1 -0
  300. package/dist/lib/dependencies/index.mjs +281 -0
  301. package/dist/lib/dependencies/index.mjs.map +1 -0
  302. package/dist/lib/dependencies/workspaceCycles.mjs +79 -0
  303. package/dist/lib/dependencies/workspaceCycles.mjs.map +1 -0
  304. package/dist/lib/file/ReadFileSyncOptions.mjs +6 -0
  305. package/dist/lib/file/ReadFileSyncOptions.mjs.map +1 -0
  306. package/dist/lib/file/constants.mjs +8 -0
  307. package/dist/lib/file/constants.mjs.map +1 -0
  308. package/dist/lib/file/fileLines.mjs +32 -0
  309. package/dist/lib/file/fileLines.mjs.map +1 -0
  310. package/dist/lib/file/index.mjs +42 -0
  311. package/dist/lib/file/index.mjs.map +1 -0
  312. package/dist/lib/file/tryReadFileSync.mjs +14 -0
  313. package/dist/lib/file/tryReadFileSync.mjs.map +1 -0
  314. package/dist/lib/fillTemplate.mjs +8 -0
  315. package/dist/lib/fillTemplate.mjs.map +1 -0
  316. package/dist/lib/generateIgnoreFiles.mjs +86 -0
  317. package/dist/lib/generateIgnoreFiles.mjs.map +1 -0
  318. package/dist/lib/generateReadmeFiles.mjs +323 -0
  319. package/dist/lib/generateReadmeFiles.mjs.map +1 -0
  320. package/dist/lib/gitignoreTemplate.mjs +12 -0
  321. package/dist/lib/gitignoreTemplate.mjs.map +1 -0
  322. package/dist/lib/index.mjs +1627 -0
  323. package/dist/lib/index.mjs.map +1 -0
  324. package/dist/lib/initCwd.mjs +8 -0
  325. package/dist/lib/initCwd.mjs.map +1 -0
  326. package/dist/lib/jsonFormatters.mjs +11 -0
  327. package/dist/lib/jsonFormatters.mjs.map +1 -0
  328. package/dist/lib/latestVersions.mjs +12 -0
  329. package/dist/lib/latestVersions.mjs.map +1 -0
  330. package/dist/lib/loadConfig.mjs +72 -0
  331. package/dist/lib/loadConfig.mjs.map +1 -0
  332. package/dist/lib/packageName.mjs +26 -0
  333. package/dist/lib/packageName.mjs.map +1 -0
  334. package/dist/lib/parsedPackageJSON.mjs +11 -0
  335. package/dist/lib/parsedPackageJSON.mjs.map +1 -0
  336. package/dist/lib/processEx.mjs +36 -0
  337. package/dist/lib/processEx.mjs.map +1 -0
  338. package/dist/lib/repoTemplates.mjs +34 -0
  339. package/dist/lib/repoTemplates.mjs.map +1 -0
  340. package/dist/lib/runInstall.mjs +30 -0
  341. package/dist/lib/runInstall.mjs.map +1 -0
  342. package/dist/lib/runSteps.mjs +118 -0
  343. package/dist/lib/runSteps.mjs.map +1 -0
  344. package/dist/lib/runStepsAsync.mjs +136 -0
  345. package/dist/lib/runStepsAsync.mjs.map +1 -0
  346. package/dist/lib/runXy.mjs +147 -0
  347. package/dist/lib/runXy.mjs.map +1 -0
  348. package/dist/lib/runXyWithWarning.mjs +36 -0
  349. package/dist/lib/runXyWithWarning.mjs.map +1 -0
  350. package/dist/lib/safeExit.mjs +61 -0
  351. package/dist/lib/safeExit.mjs.map +1 -0
  352. package/dist/lib/string/empty.mjs +8 -0
  353. package/dist/lib/string/empty.mjs.map +1 -0
  354. package/dist/lib/string/index.mjs +12 -0
  355. package/dist/lib/string/index.mjs.map +1 -0
  356. package/dist/lib/string/union.mjs +6 -0
  357. package/dist/lib/string/union.mjs.map +1 -0
  358. package/dist/lib/tryRunLocalScript.mjs +57 -0
  359. package/dist/lib/tryRunLocalScript.mjs.map +1 -0
  360. package/dist/lib/updo/applyUpdates.mjs +44 -0
  361. package/dist/lib/updo/applyUpdates.mjs.map +1 -0
  362. package/dist/lib/updo/collectWorkspaceDeps.mjs +48 -0
  363. package/dist/lib/updo/collectWorkspaceDeps.mjs.map +1 -0
  364. package/dist/lib/updo/fetchRegistryInfo.mjs +53 -0
  365. package/dist/lib/updo/fetchRegistryInfo.mjs.map +1 -0
  366. package/dist/lib/updo/index.mjs +594 -0
  367. package/dist/lib/updo/index.mjs.map +1 -0
  368. package/dist/lib/updo/interactiveSelect.mjs +185 -0
  369. package/dist/lib/updo/interactiveSelect.mjs.map +1 -0
  370. package/dist/lib/updo/interfaces.mjs +1 -0
  371. package/dist/lib/updo/interfaces.mjs.map +1 -0
  372. package/dist/lib/updo/renderTable.mjs +79 -0
  373. package/dist/lib/updo/renderTable.mjs.map +1 -0
  374. package/dist/lib/updo/resolveVersions.mjs +49 -0
  375. package/dist/lib/updo/resolveVersions.mjs.map +1 -0
  376. package/dist/lib/updo/runUpdo.mjs +511 -0
  377. package/dist/lib/updo/runUpdo.mjs.map +1 -0
  378. package/dist/lib/withErrnoException.mjs +13 -0
  379. package/dist/lib/withErrnoException.mjs.map +1 -0
  380. package/dist/lib/withError.mjs +8 -0
  381. package/dist/lib/withError.mjs.map +1 -0
  382. package/dist/lib/yarn/index.mjs +39 -0
  383. package/dist/lib/yarn/index.mjs.map +1 -0
  384. package/dist/lib/yarn/isYarnVersionOrGreater.mjs +18 -0
  385. package/dist/lib/yarn/isYarnVersionOrGreater.mjs.map +1 -0
  386. package/dist/lib/yarn/workspace/Workspace.mjs +1 -0
  387. package/dist/lib/yarn/workspace/Workspace.mjs.map +1 -0
  388. package/dist/lib/yarn/workspace/index.mjs +23 -0
  389. package/dist/lib/yarn/workspace/index.mjs.map +1 -0
  390. package/dist/lib/yarn/workspace/yarnWorkspace.mjs +22 -0
  391. package/dist/lib/yarn/workspace/yarnWorkspace.mjs.map +1 -0
  392. package/dist/lib/yarn/workspace/yarnWorkspaces.mjs +15 -0
  393. package/dist/lib/yarn/workspace/yarnWorkspaces.mjs.map +1 -0
  394. package/dist/lib/yarn/yarnInitCwd.mjs +8 -0
  395. package/dist/lib/yarn/yarnInitCwd.mjs.map +1 -0
  396. package/dist/loadPackageConfig.mjs +18 -0
  397. package/dist/loadPackageConfig.mjs.map +1 -0
  398. package/dist/pm/PackageManager.mjs +1 -0
  399. package/dist/pm/PackageManager.mjs.map +1 -0
  400. package/dist/pm/detectPackageManager.mjs +10 -0
  401. package/dist/pm/detectPackageManager.mjs.map +1 -0
  402. package/dist/pm/detectReact.mjs +52 -0
  403. package/dist/pm/detectReact.mjs.map +1 -0
  404. package/dist/pm/index.mjs +263 -0
  405. package/dist/pm/index.mjs.map +1 -0
  406. package/dist/pm/pnpmPackageManager.mjs +97 -0
  407. package/dist/pm/pnpmPackageManager.mjs.map +1 -0
  408. package/dist/pm/registry.mjs +27 -0
  409. package/dist/pm/registry.mjs.map +1 -0
  410. package/dist/pm/yarnPackageManager.mjs +112 -0
  411. package/dist/pm/yarnPackageManager.mjs.map +1 -0
  412. package/dist/types.d.mjs +1 -0
  413. package/dist/types.d.mjs.map +1 -0
  414. package/dist/xy/build/buildCommand.mjs +194 -0
  415. package/dist/xy/build/buildCommand.mjs.map +1 -0
  416. package/dist/xy/build/compileCommand.mjs +203 -0
  417. package/dist/xy/build/compileCommand.mjs.map +1 -0
  418. package/dist/xy/build/compileOnlyCommand.mjs +204 -0
  419. package/dist/xy/build/compileOnlyCommand.mjs.map +1 -0
  420. package/dist/xy/build/copyAssetsCommand.mjs +92 -0
  421. package/dist/xy/build/copyAssetsCommand.mjs.map +1 -0
  422. package/dist/xy/build/index.mjs +487 -0
  423. package/dist/xy/build/index.mjs.map +1 -0
  424. package/dist/xy/build/rebuildCommand.mjs +156 -0
  425. package/dist/xy/build/rebuildCommand.mjs.map +1 -0
  426. package/dist/xy/build/recompileCommand.mjs +215 -0
  427. package/dist/xy/build/recompileCommand.mjs.map +1 -0
  428. package/dist/xy/common/checkCommand.mjs +1909 -0
  429. package/dist/xy/common/checkCommand.mjs.map +1 -0
  430. package/dist/xy/common/claude/checkCommand.mjs +207 -0
  431. package/dist/xy/common/claude/checkCommand.mjs.map +1 -0
  432. package/dist/xy/common/claude/cleanCommand.mjs +78 -0
  433. package/dist/xy/common/claude/cleanCommand.mjs.map +1 -0
  434. package/dist/xy/common/claude/commandsCommand.mjs +134 -0
  435. package/dist/xy/common/claude/commandsCommand.mjs.map +1 -0
  436. package/dist/xy/common/claude/index.mjs +734 -0
  437. package/dist/xy/common/claude/index.mjs.map +1 -0
  438. package/dist/xy/common/claude/initCommand.mjs +458 -0
  439. package/dist/xy/common/claude/initCommand.mjs.map +1 -0
  440. package/dist/xy/common/claude/rulesCommand.mjs +167 -0
  441. package/dist/xy/common/claude/rulesCommand.mjs.map +1 -0
  442. package/dist/xy/common/claude/settingsCommand.mjs +115 -0
  443. package/dist/xy/common/claude/settingsCommand.mjs.map +1 -0
  444. package/dist/xy/common/claude/skillsCommand.mjs +140 -0
  445. package/dist/xy/common/claude/skillsCommand.mjs.map +1 -0
  446. package/dist/xy/common/cleanDocsCommand.mjs +74 -0
  447. package/dist/xy/common/cleanDocsCommand.mjs.map +1 -0
  448. package/dist/xy/common/deadCommand.mjs +137 -0
  449. package/dist/xy/common/deadCommand.mjs.map +1 -0
  450. package/dist/xy/common/genDocsCommand.mjs +175 -0
  451. package/dist/xy/common/genDocsCommand.mjs.map +1 -0
  452. package/dist/xy/common/gitignoreCommand.mjs +165 -0
  453. package/dist/xy/common/gitignoreCommand.mjs.map +1 -0
  454. package/dist/xy/common/gitlintCommand.mjs +89 -0
  455. package/dist/xy/common/gitlintCommand.mjs.map +1 -0
  456. package/dist/xy/common/index.mjs +4654 -0
  457. package/dist/xy/common/index.mjs.map +1 -0
  458. package/dist/xy/common/licenseCommand.mjs +108 -0
  459. package/dist/xy/common/licenseCommand.mjs.map +1 -0
  460. package/dist/xy/common/npmignoreGenCommand.mjs +100 -0
  461. package/dist/xy/common/npmignoreGenCommand.mjs.map +1 -0
  462. package/dist/xy/common/orphan/cleanCommand.mjs +102 -0
  463. package/dist/xy/common/orphan/cleanCommand.mjs.map +1 -0
  464. package/dist/xy/common/orphan/index.mjs +138 -0
  465. package/dist/xy/common/orphan/index.mjs.map +1 -0
  466. package/dist/xy/common/orphan/listCommand.mjs +100 -0
  467. package/dist/xy/common/orphan/listCommand.mjs.map +1 -0
  468. package/dist/xy/common/packmanCommand.mjs +1538 -0
  469. package/dist/xy/common/packmanCommand.mjs.map +1 -0
  470. package/dist/xy/common/readme/genCommand.mjs +395 -0
  471. package/dist/xy/common/readme/genCommand.mjs.map +1 -0
  472. package/dist/xy/common/readme/index.mjs +538 -0
  473. package/dist/xy/common/readme/index.mjs.map +1 -0
  474. package/dist/xy/common/readme/initCommand.mjs +109 -0
  475. package/dist/xy/common/readme/initCommand.mjs.map +1 -0
  476. package/dist/xy/common/readme/lintCommand.mjs +181 -0
  477. package/dist/xy/common/readme/lintCommand.mjs.map +1 -0
  478. package/dist/xy/common/repo/index.mjs +1070 -0
  479. package/dist/xy/common/repo/index.mjs.map +1 -0
  480. package/dist/xy/common/repo/initCommand.mjs +273 -0
  481. package/dist/xy/common/repo/initCommand.mjs.map +1 -0
  482. package/dist/xy/common/repo/lintCommand.mjs +789 -0
  483. package/dist/xy/common/repo/lintCommand.mjs.map +1 -0
  484. package/dist/xy/common/retestCommand.mjs +163 -0
  485. package/dist/xy/common/retestCommand.mjs.map +1 -0
  486. package/dist/xy/common/testCommand.mjs +157 -0
  487. package/dist/xy/common/testCommand.mjs.map +1 -0
  488. package/dist/xy/deploy/deployCommand.mjs +214 -0
  489. package/dist/xy/deploy/deployCommand.mjs.map +1 -0
  490. package/dist/xy/deploy/index.mjs +289 -0
  491. package/dist/xy/deploy/index.mjs.map +1 -0
  492. package/dist/xy/deploy/publishCommand.mjs +218 -0
  493. package/dist/xy/deploy/publishCommand.mjs.map +1 -0
  494. package/dist/xy/index.mjs +8887 -0
  495. package/dist/xy/index.mjs.map +1 -0
  496. package/dist/xy/install/cleanCommand.mjs +182 -0
  497. package/dist/xy/install/cleanCommand.mjs.map +1 -0
  498. package/dist/xy/install/dupdepsCommand.mjs +234 -0
  499. package/dist/xy/install/dupdepsCommand.mjs.map +1 -0
  500. package/dist/xy/install/index.mjs +1006 -0
  501. package/dist/xy/install/index.mjs.map +1 -0
  502. package/dist/xy/install/reinstallCommand.mjs +292 -0
  503. package/dist/xy/install/reinstallCommand.mjs.map +1 -0
  504. package/dist/xy/install/staticsCommand.mjs +233 -0
  505. package/dist/xy/install/staticsCommand.mjs.map +1 -0
  506. package/dist/xy/install/upCommand.mjs +150 -0
  507. package/dist/xy/install/upCommand.mjs.map +1 -0
  508. package/dist/xy/install/updoCommand.mjs +550 -0
  509. package/dist/xy/install/updoCommand.mjs.map +1 -0
  510. package/dist/xy/lint/cycleCommand.mjs +289 -0
  511. package/dist/xy/lint/cycleCommand.mjs.map +1 -0
  512. package/dist/xy/lint/deplintCommand.mjs +1897 -0
  513. package/dist/xy/lint/deplintCommand.mjs.map +1 -0
  514. package/dist/xy/lint/fixCommand.mjs +398 -0
  515. package/dist/xy/lint/fixCommand.mjs.map +1 -0
  516. package/dist/xy/lint/index.mjs +3759 -0
  517. package/dist/xy/lint/index.mjs.map +1 -0
  518. package/dist/xy/lint/knipCommand.mjs +142 -0
  519. package/dist/xy/lint/knipCommand.mjs.map +1 -0
  520. package/dist/xy/lint/lint/index.mjs +695 -0
  521. package/dist/xy/lint/lint/index.mjs.map +1 -0
  522. package/dist/xy/lint/lint/initCommand.mjs +282 -0
  523. package/dist/xy/lint/lint/initCommand.mjs.map +1 -0
  524. package/dist/xy/lint/lint/runCommand.mjs +405 -0
  525. package/dist/xy/lint/lint/runCommand.mjs.map +1 -0
  526. package/dist/xy/lint/lintCommand.mjs +695 -0
  527. package/dist/xy/lint/lintCommand.mjs.map +1 -0
  528. package/dist/xy/lint/lintlintCommand.mjs +359 -0
  529. package/dist/xy/lint/lintlintCommand.mjs.map +1 -0
  530. package/dist/xy/lint/publintCommand.mjs +778 -0
  531. package/dist/xy/lint/publintCommand.mjs.map +1 -0
  532. package/dist/xy/lint/relintCommand.mjs +381 -0
  533. package/dist/xy/lint/relintCommand.mjs.map +1 -0
  534. package/dist/xy/lint/sonarCommand.mjs +137 -0
  535. package/dist/xy/lint/sonarCommand.mjs.map +1 -0
  536. package/dist/xy/param.mjs +8 -0
  537. package/dist/xy/param.mjs.map +1 -0
  538. package/dist/xy/react/analyzeCommand.mjs +150 -0
  539. package/dist/xy/react/analyzeCommand.mjs.map +1 -0
  540. package/dist/xy/react/ejectCommand.mjs +150 -0
  541. package/dist/xy/react/ejectCommand.mjs.map +1 -0
  542. package/dist/xy/react/index.mjs +202 -0
  543. package/dist/xy/react/index.mjs.map +1 -0
  544. package/dist/xy/react/sitemapCommand.mjs +129 -0
  545. package/dist/xy/react/sitemapCommand.mjs.map +1 -0
  546. package/dist/xy/react/startCommand.mjs +150 -0
  547. package/dist/xy/react/startCommand.mjs.map +1 -0
  548. package/dist/xy/xy.mjs +8879 -0
  549. package/dist/xy/xy.mjs.map +1 -0
  550. package/dist/xy/xyParseOptions.mjs +117 -0
  551. package/dist/xy/xyParseOptions.mjs.map +1 -0
  552. package/dist/xy/yarn/index.mjs +188 -0
  553. package/dist/xy/yarn/index.mjs.map +1 -0
  554. package/dist/xy/yarn/upplugCommand.mjs +134 -0
  555. package/dist/xy/yarn/upplugCommand.mjs.map +1 -0
  556. package/dist/xy/yarn/upyarnCommand.mjs +129 -0
  557. package/dist/xy/yarn/upyarnCommand.mjs.map +1 -0
  558. package/dist/xy/yarn/yarn3OnlyCommand.mjs +70 -0
  559. package/dist/xy/yarn/yarn3OnlyCommand.mjs.map +1 -0
  560. package/package.json +119 -0
  561. package/templates/claude/CLAUDE-local.md +4 -0
  562. package/templates/claude/CLAUDE-project.md +4 -0
  563. package/templates/claude/commands/xy-build.md +7 -0
  564. package/templates/claude/commands/xy-clean.md +7 -0
  565. package/templates/claude/commands/xy-compile.md +7 -0
  566. package/templates/claude/commands/xy-cycle.md +7 -0
  567. package/templates/claude/commands/xy-dead.md +7 -0
  568. package/templates/claude/commands/xy-deplint.md +7 -0
  569. package/templates/claude/commands/xy-deps.md +24 -0
  570. package/templates/claude/commands/xy-dupdeps.md +7 -0
  571. package/templates/claude/commands/xy-fix.md +7 -0
  572. package/templates/claude/commands/xy-gen-docs.md +7 -0
  573. package/templates/claude/commands/xy-gitignore.md +7 -0
  574. package/templates/claude/commands/xy-gitlint.md +7 -0
  575. package/templates/claude/commands/xy-knip.md +7 -0
  576. package/templates/claude/commands/xy-license.md +7 -0
  577. package/templates/claude/commands/xy-lint-rules.md +44 -0
  578. package/templates/claude/commands/xy-lint.md +7 -0
  579. package/templates/claude/commands/xy-publint.md +7 -0
  580. package/templates/claude/commands/xy-rebuild.md +7 -0
  581. package/templates/claude/commands/xy-recompile.md +7 -0
  582. package/templates/claude/commands/xy-reinstall.md +7 -0
  583. package/templates/claude/commands/xy-relint.md +7 -0
  584. package/templates/claude/commands/xy-retest.md +7 -0
  585. package/templates/claude/commands/xy-sonar.md +7 -0
  586. package/templates/claude/commands/xy-test.md +7 -0
  587. package/templates/claude/commands/xy-up.md +9 -0
  588. package/templates/claude/rules/xylabs-architecture.md +8 -0
  589. package/templates/claude/rules/xylabs-git-workflow.md +7 -0
  590. package/templates/claude/rules/xylabs-naming.md +7 -0
  591. package/templates/claude/rules/xylabs-style.md +17 -0
  592. package/templates/claude/skills/xylabs-e2e-setup/SKILL.md +223 -0
  593. package/templates/claude/skills/xylabs-xy-cli/SKILL.md +236 -0
  594. package/templates/claude/skills/xylabs-xy-deplint-fix/SKILL.md +122 -0
  595. package/templates/gitignore/gitignore/template.gitignore +51 -0
  596. package/templates/gitignore/template.gitignore +51 -0
  597. package/templates/readme/README.body.md +25 -0
  598. package/templates/readme/README.template.md +22 -0
  599. package/templates/repo/cli/package/package.json.tmpl +63 -0
  600. package/templates/repo/cli/package/src/__packageName__.ts.tmpl +21 -0
  601. package/templates/repo/cli/package/src/actions/index.ts +1 -0
  602. package/templates/repo/cli/package/src/actions/printVersion.ts.tmpl +8 -0
  603. package/templates/repo/cli/package/src/bin/__packageName__.ts.tmpl +12 -0
  604. package/templates/repo/cli/package/src/commands/index.ts +1 -0
  605. package/templates/repo/cli/package/src/commands/versionCommand.ts.tmpl +11 -0
  606. package/templates/repo/cli/package/src/index.ts.tmpl +1 -0
  607. package/templates/repo/cli/package/tsconfig.build.json +25 -0
  608. package/templates/repo/cli/package/tsconfig.json +4 -0
  609. package/templates/repo/cli/package/tsup.config.ts +15 -0
  610. package/templates/repo/cli/package/xy.config.ts +3 -0
  611. package/templates/repo/cli/root/CLAUDE.md.tmpl +38 -0
  612. package/templates/repo/cli/root/cspell.json.tmpl +13 -0
  613. package/templates/repo/cli/root/eslint.config.ts +28 -0
  614. package/templates/repo/cli/root/github/workflows/build-pnpm.yml.tmpl +34 -0
  615. package/templates/repo/cli/root/github/workflows/build-yarn.yml.tmpl +32 -0
  616. package/templates/repo/cli/root/gitignore.tmpl +47 -0
  617. package/templates/repo/cli/root/knip.config.ts +16 -0
  618. package/templates/repo/cli/root/package.json.tmpl +54 -0
  619. package/templates/repo/cli/root/pnpm-workspace.yaml +2 -0
  620. package/templates/repo/cli/root/tsconfig.json +4 -0
  621. package/templates/repo/cli/root/vitest.config.ts +31 -0
  622. package/templates/repo/cli/root/xy.config.ts.tmpl +5 -0
@@ -0,0 +1,734 @@
1
+ // src/lib/claudeMdTemplate.ts
2
+ import {
3
+ readdirSync,
4
+ readFileSync,
5
+ statSync
6
+ } from "fs";
7
+ import { createRequire } from "module";
8
+ import PATH from "path";
9
+ var require2 = createRequire(import.meta.url);
10
+ var packageRoot = PATH.dirname(require2.resolve("@xylabs/ts-scripts-common/package.json"));
11
+ var templatesDir = PATH.resolve(packageRoot, "templates", "claude");
12
+ function applyPackageManager(content, pm) {
13
+ return content.replaceAll("yarn xy", `${pm} xy`).replaceAll("yarn add", `${pm} add`);
14
+ }
15
+ var XYLABS_RULES_PREFIX = "xylabs-";
16
+ var XYLABS_COMMANDS_PREFIX = "xy-";
17
+ var LEGACY_COMMANDS_PREFIX = "xylabs-";
18
+ var XYLABS_SKILLS_PREFIX = "xylabs-";
19
+ var claudeMdRuleTemplates = () => {
20
+ const rulesDir = PATH.resolve(templatesDir, "rules");
21
+ const files = readdirSync(rulesDir).filter((f) => f.startsWith(XYLABS_RULES_PREFIX) && f.endsWith(".md"));
22
+ const result = {};
23
+ for (const file of files) {
24
+ result[file] = readFileSync(PATH.resolve(rulesDir, file), "utf8");
25
+ }
26
+ return result;
27
+ };
28
+ var claudeCommandTemplates = () => {
29
+ const commandsDir = PATH.resolve(templatesDir, "commands");
30
+ const files = readdirSync(commandsDir).filter((f) => f.startsWith(XYLABS_COMMANDS_PREFIX) && f.endsWith(".md"));
31
+ const result = {};
32
+ for (const file of files) {
33
+ result[file] = readFileSync(PATH.resolve(commandsDir, file), "utf8");
34
+ }
35
+ return result;
36
+ };
37
+ var claudeSkillTemplates = () => {
38
+ const skillsDir = PATH.resolve(templatesDir, "skills");
39
+ const dirs = readdirSync(skillsDir).filter(
40
+ (f) => f.startsWith(XYLABS_SKILLS_PREFIX) && statSync(PATH.resolve(skillsDir, f)).isDirectory()
41
+ );
42
+ const result = {};
43
+ for (const dir of dirs) {
44
+ const dirPath = PATH.resolve(skillsDir, dir);
45
+ const files = readdirSync(dirPath, { recursive: true, encoding: "utf8" });
46
+ result[dir] = {};
47
+ for (const file of files) {
48
+ if (statSync(PATH.resolve(dirPath, file)).isFile()) {
49
+ result[dir][file] = readFileSync(PATH.resolve(dirPath, file), "utf8");
50
+ }
51
+ }
52
+ }
53
+ return result;
54
+ };
55
+ var claudeMdLocalTemplate = () => readFileSync(PATH.resolve(templatesDir, "CLAUDE-local.md"), "utf8");
56
+
57
+ // src/pm/detectPackageManager.ts
58
+ import { existsSync } from "fs";
59
+ function detectPackageManager() {
60
+ if (existsSync("pnpm-lock.yaml") || existsSync("pnpm-workspace.yaml")) return "pnpm";
61
+ return "yarn";
62
+ }
63
+
64
+ // src/lib/initCwd.ts
65
+ function INIT_CWD() {
66
+ return process.env.INIT_CWD ?? process.cwd();
67
+ }
68
+
69
+ // src/actions/claude-check.ts
70
+ import {
71
+ existsSync as existsSync2,
72
+ readdirSync as readdirSync2,
73
+ readFileSync as readFileSync2,
74
+ statSync as statSync2
75
+ } from "fs";
76
+ import PATH2 from "path";
77
+ import chalk from "chalk";
78
+ var checkCommands = (commandsDir) => {
79
+ const pm = detectPackageManager();
80
+ const rawTemplates = claudeCommandTemplates();
81
+ const templates = {};
82
+ for (const [name, content] of Object.entries(rawTemplates)) {
83
+ templates[name] = applyPackageManager(content, pm);
84
+ }
85
+ const missing = [];
86
+ const outdated = [];
87
+ for (const [filename, content] of Object.entries(templates)) {
88
+ const targetPath = PATH2.resolve(commandsDir, filename);
89
+ if (!existsSync2(targetPath)) {
90
+ missing.push(filename);
91
+ } else if (readFileSync2(targetPath, "utf8") !== content) {
92
+ outdated.push(filename);
93
+ }
94
+ }
95
+ const templateNames = new Set(Object.keys(templates));
96
+ const stale = existsSync2(commandsDir) ? readdirSync2(commandsDir).filter((f) => f.startsWith(XYLABS_COMMANDS_PREFIX) && f.endsWith(".md") && !templateNames.has(f)) : [];
97
+ return {
98
+ missing,
99
+ outdated,
100
+ stale
101
+ };
102
+ };
103
+ var checkRules = (rulesDir) => {
104
+ const pm = detectPackageManager();
105
+ const rawTemplates = claudeMdRuleTemplates();
106
+ const templates = {};
107
+ for (const [name, content] of Object.entries(rawTemplates)) {
108
+ templates[name] = applyPackageManager(content, pm);
109
+ }
110
+ const missing = [];
111
+ const outdated = [];
112
+ for (const [filename, content] of Object.entries(templates)) {
113
+ const targetPath = PATH2.resolve(rulesDir, filename);
114
+ if (!existsSync2(targetPath)) {
115
+ missing.push(filename);
116
+ } else if (readFileSync2(targetPath, "utf8") !== content) {
117
+ outdated.push(filename);
118
+ }
119
+ }
120
+ const templateNames = new Set(Object.keys(templates));
121
+ const stale = existsSync2(rulesDir) ? readdirSync2(rulesDir).filter((f) => f.startsWith(XYLABS_RULES_PREFIX) && f.endsWith(".md") && !templateNames.has(f)) : [];
122
+ return {
123
+ missing,
124
+ outdated,
125
+ stale
126
+ };
127
+ };
128
+ var checkSkills = (skillsDir) => {
129
+ const pm = detectPackageManager();
130
+ const rawTemplates = claudeSkillTemplates();
131
+ const missing = [];
132
+ const outdated = [];
133
+ for (const [skillName, files] of Object.entries(rawTemplates)) {
134
+ const skillDir = PATH2.resolve(skillsDir, skillName);
135
+ if (!existsSync2(skillDir)) {
136
+ missing.push(skillName);
137
+ continue;
138
+ }
139
+ for (const [filename, rawContent] of Object.entries(files)) {
140
+ const content = applyPackageManager(rawContent, pm);
141
+ const targetPath = PATH2.resolve(skillDir, filename);
142
+ if (!existsSync2(targetPath)) {
143
+ missing.push(`${skillName}/${filename}`);
144
+ } else if (readFileSync2(targetPath, "utf8") !== content) {
145
+ outdated.push(`${skillName}/${filename}`);
146
+ }
147
+ }
148
+ }
149
+ const templateNames = new Set(Object.keys(rawTemplates));
150
+ const stale = existsSync2(skillsDir) ? readdirSync2(skillsDir).filter(
151
+ (f) => f.startsWith(XYLABS_SKILLS_PREFIX) && statSync2(PATH2.resolve(skillsDir, f)).isDirectory() && !templateNames.has(f)
152
+ ) : [];
153
+ return {
154
+ missing,
155
+ outdated,
156
+ stale
157
+ };
158
+ };
159
+ var logSection = (label, result) => {
160
+ const issues = [...result.missing, ...result.outdated, ...result.stale];
161
+ if (issues.length === 0) {
162
+ console.log(chalk.green(` \u2714 ${label}`));
163
+ return true;
164
+ }
165
+ console.log(chalk.red(` \u2718 ${label}`));
166
+ for (const file of result.missing) {
167
+ console.log(chalk.yellow(` missing: ${file}`));
168
+ }
169
+ for (const file of result.outdated) {
170
+ console.log(chalk.yellow(` outdated: ${file}`));
171
+ }
172
+ for (const file of result.stale) {
173
+ console.log(chalk.yellow(` stale: ${file}`));
174
+ }
175
+ return false;
176
+ };
177
+ function claudeCheck() {
178
+ const cwd = INIT_CWD();
179
+ const claudeDir = PATH2.resolve(cwd, ".claude");
180
+ console.log(chalk.bold("Claude configuration check:"));
181
+ console.log();
182
+ const commandsResult = checkCommands(PATH2.resolve(claudeDir, "commands"));
183
+ const rulesResult = checkRules(PATH2.resolve(claudeDir, "rules"));
184
+ const skillsResult = checkSkills(PATH2.resolve(claudeDir, "skills"));
185
+ const commandsOk = logSection("commands", commandsResult);
186
+ const rulesOk = logSection("rules", rulesResult);
187
+ const skillsOk = logSection("skills", skillsResult);
188
+ console.log();
189
+ if (commandsOk && rulesOk && skillsOk) {
190
+ console.log(chalk.green("All Claude configuration is up to date."));
191
+ } else {
192
+ console.log(chalk.yellow("Run `xy claude init` to sync all configuration."));
193
+ }
194
+ return 0;
195
+ }
196
+
197
+ // src/actions/claude-clean.ts
198
+ import {
199
+ existsSync as existsSync3,
200
+ readdirSync as readdirSync3,
201
+ rmSync,
202
+ unlinkSync
203
+ } from "fs";
204
+ import PATH3 from "path";
205
+ import chalk2 from "chalk";
206
+ function removeFile(filePath, label) {
207
+ if (existsSync3(filePath)) {
208
+ unlinkSync(filePath);
209
+ console.log(chalk2.yellow(` Removed ${label}`));
210
+ return true;
211
+ }
212
+ return false;
213
+ }
214
+ function removeDir(dirPath, label) {
215
+ if (existsSync3(dirPath)) {
216
+ rmSync(dirPath, { recursive: true });
217
+ console.log(chalk2.yellow(` Removed ${label}`));
218
+ return true;
219
+ }
220
+ return false;
221
+ }
222
+ function claudeClean() {
223
+ console.log(chalk2.green("Clean Claude configuration"));
224
+ const cwd = INIT_CWD();
225
+ let removed = 0;
226
+ const rootFiles = ["CLAUDE.md", "CLAUDE.local.md"];
227
+ for (const file of rootFiles) {
228
+ if (removeFile(PATH3.resolve(cwd, file), file)) removed++;
229
+ }
230
+ if (removeDir(PATH3.resolve(cwd, ".claude"), ".claude/")) removed++;
231
+ const packagesDir = PATH3.resolve(cwd, "packages");
232
+ if (existsSync3(packagesDir)) {
233
+ const findClaudeFiles = (dir, prefix) => {
234
+ const entries = readdirSync3(dir, { withFileTypes: true });
235
+ for (const entry of entries) {
236
+ const fullPath = PATH3.resolve(dir, entry.name);
237
+ const label = `${prefix}${entry.name}`;
238
+ if (entry.isFile() && (entry.name === "CLAUDE.md" || entry.name === "CLAUDE.local.md")) {
239
+ if (removeFile(fullPath, label)) removed++;
240
+ } else if (entry.isDirectory() && entry.name === ".claude") {
241
+ if (removeDir(fullPath, `${label}/`)) removed++;
242
+ } else if (entry.isDirectory() && entry.name !== "node_modules" && entry.name !== "dist") {
243
+ findClaudeFiles(fullPath, `${label}/`);
244
+ }
245
+ }
246
+ };
247
+ findClaudeFiles(packagesDir, "packages/");
248
+ }
249
+ if (removed > 0) {
250
+ console.log(chalk2.green(` Removed ${removed} item(s)`));
251
+ } else {
252
+ console.log(chalk2.gray(" Nothing to clean"));
253
+ }
254
+ return 0;
255
+ }
256
+
257
+ // src/actions/claude-commands.ts
258
+ import {
259
+ existsSync as existsSync4,
260
+ mkdirSync,
261
+ readdirSync as readdirSync4,
262
+ readFileSync as readFileSync3,
263
+ unlinkSync as unlinkSync2,
264
+ writeFileSync
265
+ } from "fs";
266
+ import PATH4 from "path";
267
+ import chalk3 from "chalk";
268
+ var syncCommandFiles = (commandsDir) => {
269
+ const pm = detectPackageManager();
270
+ const rawTemplates = claudeCommandTemplates();
271
+ const templates = {};
272
+ for (const [name, content] of Object.entries(rawTemplates)) {
273
+ templates[name] = applyPackageManager(content, pm);
274
+ }
275
+ const templateNames = new Set(Object.keys(templates));
276
+ let updated = 0;
277
+ let created = 0;
278
+ for (const [filename, content] of Object.entries(templates)) {
279
+ const targetPath = PATH4.resolve(commandsDir, filename);
280
+ const existing = existsSync4(targetPath) ? readFileSync3(targetPath, "utf8") : void 0;
281
+ if (existing === content) continue;
282
+ writeFileSync(targetPath, content, "utf8");
283
+ if (existing) {
284
+ updated++;
285
+ } else {
286
+ created++;
287
+ }
288
+ }
289
+ return {
290
+ created,
291
+ templateNames,
292
+ updated
293
+ };
294
+ };
295
+ var removeStaleCommands = (commandsDir, templateNames) => {
296
+ const existingCommands = readdirSync4(commandsDir).filter((f) => f.startsWith(XYLABS_COMMANDS_PREFIX) && f.endsWith(".md"));
297
+ let removed = 0;
298
+ for (const file of existingCommands) {
299
+ if (!templateNames.has(file)) {
300
+ unlinkSync2(PATH4.resolve(commandsDir, file));
301
+ removed++;
302
+ }
303
+ }
304
+ return removed;
305
+ };
306
+ var removeLegacyCommands = (commandsDir) => {
307
+ const legacyFiles = readdirSync4(commandsDir).filter((f) => f.startsWith(LEGACY_COMMANDS_PREFIX) && f.endsWith(".md"));
308
+ for (const file of legacyFiles) {
309
+ unlinkSync2(PATH4.resolve(commandsDir, file));
310
+ }
311
+ return legacyFiles.length;
312
+ };
313
+ var logCommandsResult = (created, updated, removed) => {
314
+ if (created || updated || removed) {
315
+ const parts = [
316
+ created ? `${created} created` : "",
317
+ updated ? `${updated} updated` : "",
318
+ removed ? `${removed} removed` : ""
319
+ ].filter(Boolean);
320
+ console.log(chalk3.green(`.claude/commands/${XYLABS_COMMANDS_PREFIX}*.md: ${parts.join(", ")}`));
321
+ } else {
322
+ console.log(chalk3.gray(`.claude/commands/${XYLABS_COMMANDS_PREFIX}*.md: already up to date`));
323
+ }
324
+ };
325
+ var claudeCommands = () => {
326
+ const cwd = INIT_CWD();
327
+ const commandsDir = PATH4.resolve(cwd, ".claude", "commands");
328
+ mkdirSync(commandsDir, { recursive: true });
329
+ const legacy = removeLegacyCommands(commandsDir);
330
+ const {
331
+ created,
332
+ templateNames,
333
+ updated
334
+ } = syncCommandFiles(commandsDir);
335
+ const removed = removeStaleCommands(commandsDir, templateNames);
336
+ logCommandsResult(created, updated, removed + legacy);
337
+ return 0;
338
+ };
339
+
340
+ // src/actions/claude-rules.ts
341
+ import { spawnSync } from "child_process";
342
+ import {
343
+ existsSync as existsSync5,
344
+ mkdirSync as mkdirSync2,
345
+ readdirSync as readdirSync5,
346
+ readFileSync as readFileSync4,
347
+ unlinkSync as unlinkSync3,
348
+ writeFileSync as writeFileSync2
349
+ } from "fs";
350
+ import PATH5 from "path";
351
+ import chalk4 from "chalk";
352
+ var syncRuleFiles = (rulesDir) => {
353
+ const pm = detectPackageManager();
354
+ const rawTemplates = claudeMdRuleTemplates();
355
+ const templates = {};
356
+ for (const [name, content] of Object.entries(rawTemplates)) {
357
+ templates[name] = applyPackageManager(content, pm);
358
+ }
359
+ const templateNames = new Set(Object.keys(templates));
360
+ let updated = 0;
361
+ let created = 0;
362
+ for (const [filename, content] of Object.entries(templates)) {
363
+ const targetPath = PATH5.resolve(rulesDir, filename);
364
+ const existing = existsSync5(targetPath) ? readFileSync4(targetPath, "utf8") : void 0;
365
+ if (existing === content) continue;
366
+ writeFileSync2(targetPath, content, "utf8");
367
+ if (existing) {
368
+ updated++;
369
+ } else {
370
+ created++;
371
+ }
372
+ }
373
+ return {
374
+ created,
375
+ templateNames,
376
+ updated
377
+ };
378
+ };
379
+ var removeStaleRules = (rulesDir, templateNames) => {
380
+ const existingRules = readdirSync5(rulesDir).filter((f) => f.startsWith(XYLABS_RULES_PREFIX) && f.endsWith(".md"));
381
+ let removed = 0;
382
+ for (const file of existingRules) {
383
+ if (!templateNames.has(file)) {
384
+ unlinkSync3(PATH5.resolve(rulesDir, file));
385
+ removed++;
386
+ }
387
+ }
388
+ return removed;
389
+ };
390
+ var logRulesResult = (created, updated, removed) => {
391
+ if (created || updated || removed) {
392
+ const parts = [
393
+ created ? `${created} created` : "",
394
+ updated ? `${updated} updated` : "",
395
+ removed ? `${removed} removed` : ""
396
+ ].filter(Boolean);
397
+ console.log(chalk4.green(`.claude/rules/${XYLABS_RULES_PREFIX}*.md: ${parts.join(", ")}`));
398
+ } else {
399
+ console.log(chalk4.gray(`.claude/rules/${XYLABS_RULES_PREFIX}*.md: already up to date`));
400
+ }
401
+ };
402
+ var ensureProjectClaudeMd = (cwd, force) => {
403
+ const projectPath = PATH5.resolve(cwd, "CLAUDE.md");
404
+ if (!existsSync5(projectPath) || force) {
405
+ if (force && existsSync5(projectPath)) {
406
+ console.log(chalk4.yellow("Regenerating CLAUDE.md"));
407
+ }
408
+ console.log(chalk4.green("Generating CLAUDE.md via claude /init..."));
409
+ const result = spawnSync("claude", ["-p", "/init", "--allowedTools", "Read", "Write", "Glob", "Grep"], {
410
+ cwd,
411
+ shell: true,
412
+ stdio: "inherit"
413
+ });
414
+ if (result.status !== 0) {
415
+ console.error(chalk4.red("claude /init failed \u2014 is Claude Code installed?"));
416
+ return 1;
417
+ }
418
+ } else {
419
+ console.log(chalk4.gray("CLAUDE.md already exists (skipped, use --force to regenerate)"));
420
+ }
421
+ return 0;
422
+ };
423
+ var ensureLocalClaudeMd = (cwd) => {
424
+ const localPath = PATH5.resolve(cwd, "CLAUDE.local.md");
425
+ if (existsSync5(localPath)) {
426
+ console.log(chalk4.gray("CLAUDE.local.md already exists (skipped)"));
427
+ } else {
428
+ writeFileSync2(localPath, claudeMdLocalTemplate(), "utf8");
429
+ console.log(chalk4.green("Generated CLAUDE.local.md"));
430
+ }
431
+ };
432
+ var claudeRules = ({ force } = {}) => {
433
+ const cwd = INIT_CWD();
434
+ const rulesDir = PATH5.resolve(cwd, ".claude", "rules");
435
+ mkdirSync2(rulesDir, { recursive: true });
436
+ const {
437
+ created,
438
+ templateNames,
439
+ updated
440
+ } = syncRuleFiles(rulesDir);
441
+ const removed = removeStaleRules(rulesDir, templateNames);
442
+ logRulesResult(created, updated, removed);
443
+ const claudeMdResult = ensureProjectClaudeMd(cwd, force);
444
+ ensureLocalClaudeMd(cwd);
445
+ return claudeMdResult ?? 0;
446
+ };
447
+
448
+ // src/actions/claude-settings.ts
449
+ import {
450
+ existsSync as existsSync6,
451
+ mkdirSync as mkdirSync3,
452
+ writeFileSync as writeFileSync3
453
+ } from "fs";
454
+ import PATH6 from "path";
455
+ import { createInterface } from "readline";
456
+ import chalk5 from "chalk";
457
+ var DENY_LIST = [
458
+ "Bash(git push --force *)",
459
+ "Bash(git reset --hard *)",
460
+ "Bash(rm -rf /*)"
461
+ ];
462
+ var RESTRICTIVE_ALLOW = [
463
+ "Bash(git *)",
464
+ "Bash(yarn *)",
465
+ "Bash(pnpm *)",
466
+ "Bash(npx *)",
467
+ "Bash(ls *)",
468
+ "Bash(mkdir *)",
469
+ "Bash(cp *)",
470
+ "Bash(mv *)",
471
+ "Bash(rm *)",
472
+ "Bash(cat *)",
473
+ "Bash(head *)",
474
+ "Bash(tail *)",
475
+ "Bash(echo *)",
476
+ "Bash(pwd)",
477
+ "Bash(which *)",
478
+ "Bash(grep *)",
479
+ "Bash(find *)",
480
+ "Bash(wc *)",
481
+ "Bash(npm view *)",
482
+ "Bash(gh *)",
483
+ "Read",
484
+ "Edit",
485
+ "Write",
486
+ "Glob",
487
+ "Grep",
488
+ "Skill"
489
+ ];
490
+ var PERMISSIVE_ALLOW = [
491
+ ...RESTRICTIVE_ALLOW,
492
+ "Bash(node *)",
493
+ "Bash(python3 *)",
494
+ "Bash(claude *)",
495
+ "Bash(sed *)",
496
+ "Bash(xargs *)",
497
+ "Bash(tee *)"
498
+ ];
499
+ function buildSettings(level) {
500
+ return {
501
+ permissions: {
502
+ allow: level === "restrictive" ? RESTRICTIVE_ALLOW : PERMISSIVE_ALLOW,
503
+ deny: DENY_LIST
504
+ }
505
+ };
506
+ }
507
+ function askConfirmation(question) {
508
+ const rl = createInterface({ input: process.stdin, output: process.stdout });
509
+ return new Promise((resolve) => {
510
+ rl.question(question, (answer) => {
511
+ rl.close();
512
+ resolve(answer.toLowerCase() === "y" || answer.toLowerCase() === "yes");
513
+ });
514
+ });
515
+ }
516
+ async function claudeSettings({ level = "permissive" } = {}) {
517
+ const cwd = INIT_CWD();
518
+ const claudeDir = PATH6.resolve(cwd, ".claude");
519
+ const settingsPath = PATH6.resolve(claudeDir, "settings.local.json");
520
+ mkdirSync3(claudeDir, { recursive: true });
521
+ if (existsSync6(settingsPath)) {
522
+ const confirmed = await askConfirmation(
523
+ chalk5.yellow(`${settingsPath} already exists. Replace it? (y/N) `)
524
+ );
525
+ if (!confirmed) {
526
+ console.log(chalk5.gray("Skipped \u2014 existing settings.local.json preserved"));
527
+ return 0;
528
+ }
529
+ }
530
+ const settings = buildSettings(level);
531
+ writeFileSync3(settingsPath, `${JSON.stringify(settings, null, 2)}
532
+ `, "utf8");
533
+ console.log(chalk5.green(`Generated .claude/settings.local.json (${level})`));
534
+ return 0;
535
+ }
536
+
537
+ // src/actions/claude-skills.ts
538
+ import {
539
+ existsSync as existsSync7,
540
+ mkdirSync as mkdirSync4,
541
+ readdirSync as readdirSync6,
542
+ readFileSync as readFileSync5,
543
+ rmSync as rmSync2,
544
+ statSync as statSync3,
545
+ writeFileSync as writeFileSync4
546
+ } from "fs";
547
+ import PATH7 from "path";
548
+ import chalk6 from "chalk";
549
+ var syncSkillFiles = (skillsDir) => {
550
+ const pm = detectPackageManager();
551
+ const rawTemplates = claudeSkillTemplates();
552
+ const templateNames = new Set(Object.keys(rawTemplates));
553
+ let updated = 0;
554
+ let created = 0;
555
+ for (const [skillName, files] of Object.entries(rawTemplates)) {
556
+ const skillDir = PATH7.resolve(skillsDir, skillName);
557
+ mkdirSync4(skillDir, { recursive: true });
558
+ for (const [filename, rawContent] of Object.entries(files)) {
559
+ const content = applyPackageManager(rawContent, pm);
560
+ const targetPath = PATH7.resolve(skillDir, filename);
561
+ mkdirSync4(PATH7.dirname(targetPath), { recursive: true });
562
+ const existing = existsSync7(targetPath) ? readFileSync5(targetPath, "utf8") : void 0;
563
+ if (existing === content) continue;
564
+ writeFileSync4(targetPath, content, "utf8");
565
+ if (existing) {
566
+ updated++;
567
+ } else {
568
+ created++;
569
+ }
570
+ }
571
+ }
572
+ return {
573
+ created,
574
+ templateNames,
575
+ updated
576
+ };
577
+ };
578
+ var removeStaleSkills = (skillsDir, templateNames) => {
579
+ const existingSkills = readdirSync6(skillsDir).filter(
580
+ (f) => f.startsWith(XYLABS_SKILLS_PREFIX) && statSync3(PATH7.resolve(skillsDir, f)).isDirectory()
581
+ );
582
+ let removed = 0;
583
+ for (const dir of existingSkills) {
584
+ if (!templateNames.has(dir)) {
585
+ rmSync2(PATH7.resolve(skillsDir, dir), { recursive: true });
586
+ removed++;
587
+ }
588
+ }
589
+ return removed;
590
+ };
591
+ var logSkillsResult = (created, updated, removed) => {
592
+ if (created || updated || removed) {
593
+ const parts = [
594
+ created ? `${created} created` : "",
595
+ updated ? `${updated} updated` : "",
596
+ removed ? `${removed} removed` : ""
597
+ ].filter(Boolean);
598
+ console.log(chalk6.green(`.claude/skills/${XYLABS_SKILLS_PREFIX}*/: ${parts.join(", ")}`));
599
+ } else {
600
+ console.log(chalk6.gray(`.claude/skills/${XYLABS_SKILLS_PREFIX}*/: already up to date`));
601
+ }
602
+ };
603
+ var claudeSkills = () => {
604
+ const cwd = INIT_CWD();
605
+ const skillsDir = PATH7.resolve(cwd, ".claude", "skills");
606
+ mkdirSync4(skillsDir, { recursive: true });
607
+ const {
608
+ created,
609
+ templateNames,
610
+ updated
611
+ } = syncSkillFiles(skillsDir);
612
+ const removed = removeStaleSkills(skillsDir, templateNames);
613
+ logSkillsResult(created, updated, removed);
614
+ return 0;
615
+ };
616
+
617
+ // src/xy/common/claude/checkCommand.ts
618
+ var checkCommand = {
619
+ command: "check",
620
+ describe: "Check if Claude configuration is up to date with templates",
621
+ handler: (argv) => {
622
+ if (argv.verbose) console.log("Claude Check");
623
+ process.exitCode = claudeCheck();
624
+ }
625
+ };
626
+
627
+ // src/xy/common/claude/cleanCommand.ts
628
+ var cleanCommand = {
629
+ command: "clean",
630
+ describe: "Remove all Claude configuration files from the repo",
631
+ handler: (argv) => {
632
+ if (argv.verbose) console.log("Claude Clean");
633
+ process.exitCode = claudeClean();
634
+ }
635
+ };
636
+
637
+ // src/xy/common/claude/commandsCommand.ts
638
+ var commandsCommand = {
639
+ command: "commands",
640
+ describe: "Sync XY Labs standard Claude slash commands to .claude/commands/",
641
+ handler: (argv) => {
642
+ if (argv.verbose) console.log("Claude Commands");
643
+ process.exitCode = claudeCommands();
644
+ }
645
+ };
646
+
647
+ // src/xy/common/claude/initCommand.ts
648
+ var initCommand = {
649
+ builder: (yargs) => {
650
+ return yargs.option("force", {
651
+ alias: "f",
652
+ default: false,
653
+ description: "Overwrite existing CLAUDE.md",
654
+ type: "boolean"
655
+ }).option("level", {
656
+ choices: ["restrictive", "permissive"],
657
+ default: "permissive",
658
+ description: "Permission level for settings (restrictive omits node, python3, claude, sed, xargs, tee)",
659
+ type: "string"
660
+ });
661
+ },
662
+ command: "init",
663
+ describe: "Initialize all Claude configuration (commands, rules, skills, settings)",
664
+ handler: async (argv) => {
665
+ if (argv.verbose) console.log("Claude Init");
666
+ const commandsResult = claudeCommands();
667
+ const rulesResult = claudeRules({ force: argv.force });
668
+ const skillsResult = claudeSkills();
669
+ const settingsResult = await claudeSettings({ level: argv.level });
670
+ process.exitCode = commandsResult || rulesResult || skillsResult || settingsResult;
671
+ }
672
+ };
673
+
674
+ // src/xy/common/claude/rulesCommand.ts
675
+ var rulesCommand = {
676
+ builder: (yargs) => {
677
+ return yargs.option("force", {
678
+ alias: "f",
679
+ default: false,
680
+ description: "Overwrite existing CLAUDE.md",
681
+ type: "boolean"
682
+ });
683
+ },
684
+ command: "rules",
685
+ describe: "Sync XY Labs standard Claude rules to .claude/rules/",
686
+ handler: (argv) => {
687
+ if (argv.verbose) console.log("Claude Rules");
688
+ process.exitCode = claudeRules({ force: argv.force });
689
+ }
690
+ };
691
+
692
+ // src/xy/common/claude/settingsCommand.ts
693
+ var settingsCommand = {
694
+ builder: (yargs) => {
695
+ return yargs.option("level", {
696
+ choices: ["restrictive", "permissive"],
697
+ default: "permissive",
698
+ description: "Permission level (restrictive omits node, python3, claude, sed, xargs, tee)",
699
+ type: "string"
700
+ });
701
+ },
702
+ command: "settings",
703
+ describe: "Initialize .claude/settings.local.json with XY Labs defaults",
704
+ handler: async (argv) => {
705
+ if (argv.verbose) console.log("Claude Settings");
706
+ process.exitCode = await claudeSettings({ level: argv.level });
707
+ }
708
+ };
709
+
710
+ // src/xy/common/claude/skillsCommand.ts
711
+ var skillsCommand = {
712
+ builder: (yargs) => yargs,
713
+ command: "skills",
714
+ describe: "Sync XY Labs standard Claude skills to .claude/skills/",
715
+ handler: (argv) => {
716
+ if (argv.verbose) console.log("Claude Skills");
717
+ process.exitCode = claudeSkills();
718
+ }
719
+ };
720
+
721
+ // src/xy/common/claude/index.ts
722
+ var claudeCommand = {
723
+ builder: (yargs) => {
724
+ return yargs.command(checkCommand).command(cleanCommand).command(commandsCommand).command(initCommand).command(rulesCommand).command(settingsCommand).command(skillsCommand).demandCommand(1, "Please specify a claude subcommand").strictCommands();
725
+ },
726
+ command: "claude",
727
+ describe: "Claude - Claude Code configuration utilities",
728
+ handler: () => {
729
+ }
730
+ };
731
+ export {
732
+ claudeCommand
733
+ };
734
+ //# sourceMappingURL=index.mjs.map