@kjanat/dreamcli 3.0.0-rc.9 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (502) hide show
  1. package/CHANGELOG.md +262 -1
  2. package/README.md +32 -13
  3. package/dist/core/cli/dispatch.mjs +0 -11
  4. package/dist/core/cli/index.d.mts +133 -9
  5. package/dist/core/cli/index.mjs +108 -21
  6. package/dist/core/cli/planner.mjs +7 -1
  7. package/dist/core/cli/root-help.mjs +5 -0
  8. package/dist/core/cli/runtime-preflight.d.mts +4 -0
  9. package/dist/core/cli/runtime-preflight.mjs +5 -3
  10. package/dist/core/completion/shells/shared.mjs +1 -0
  11. package/dist/core/config/index.d.mts +43 -12
  12. package/dist/core/config/index.mjs +55 -16
  13. package/dist/core/config/package-json.d.mts +1 -0
  14. package/dist/core/errors/index.d.mts +2 -2
  15. package/dist/core/execution/index.mjs +6 -2
  16. package/dist/core/help/ansi.d.mts +11 -5
  17. package/dist/core/help/ansi.mjs +14 -16
  18. package/dist/core/help/index.d.mts +22 -0
  19. package/dist/core/help/index.mjs +75 -25
  20. package/dist/core/json-schema/index.d.mts +7 -8
  21. package/dist/core/json-schema/index.mjs +271 -88
  22. package/dist/core/json-schema/meta-descriptions.generated.d.mts +40 -40
  23. package/dist/core/output/contracts.d.mts +5 -5
  24. package/dist/core/output/contracts.mjs +1 -1
  25. package/dist/core/output/index.d.mts +38 -1
  26. package/dist/core/output/index.mjs +37 -2
  27. package/dist/core/parse/index.mjs +9 -6
  28. package/dist/core/resolve/contracts.d.mts +7 -2
  29. package/dist/core/resolve/flags.d.mts +3 -1
  30. package/dist/core/resolve/flags.mjs +29 -12
  31. package/dist/core/resolve/index.mjs +6 -1
  32. package/dist/core/resolve/property.d.mts +1 -1
  33. package/dist/core/resolve/standard.d.mts +24 -0
  34. package/dist/core/resolve/standard.mjs +114 -0
  35. package/dist/core/schema/arg.d.mts +37 -2
  36. package/dist/core/schema/arg.mjs +5 -2
  37. package/dist/core/schema/command.d.mts +49 -7
  38. package/dist/core/schema/command.mjs +15 -5
  39. package/dist/core/schema/flag.d.mts +77 -9
  40. package/dist/core/schema/flag.mjs +7 -3
  41. package/dist/core/schema/index.d.mts +3 -2
  42. package/dist/core/schema/prompt.d.mts +1 -1
  43. package/dist/core/schema/run.d.mts +7 -0
  44. package/dist/core/schema/standard.d.mts +100 -0
  45. package/dist/core/schema/standard.mjs +15 -0
  46. package/dist/core/testkit/index.d.mts +7 -5
  47. package/dist/core/testkit/index.mjs +12 -7
  48. package/dist/index.d.mts +5 -4
  49. package/dist/index.mjs +4 -4
  50. package/dist/runtime/adapter.d.mts +33 -0
  51. package/dist/runtime/adapter.mjs +6 -1
  52. package/dist/runtime/deno.d.mts +4 -0
  53. package/dist/runtime/deno.mjs +4 -1
  54. package/dist/runtime/node.mjs +9 -1
  55. package/dist/version.mjs +2 -2
  56. package/dreamcli.schema.json +82 -0
  57. package/examples/basic.ts +2 -2
  58. package/examples/flag-types.ts +79 -0
  59. package/examples/gh/node_modules/typescript/LICENSE +55 -0
  60. package/examples/gh/node_modules/typescript/NOTICE.txt +436 -0
  61. package/examples/gh/node_modules/typescript/README.md +49 -0
  62. package/examples/gh/node_modules/typescript/bin/tsc +2 -0
  63. package/examples/gh/node_modules/typescript/dist/api/async/api.d.ts +529 -0
  64. package/examples/gh/node_modules/typescript/dist/api/async/api.d.ts.map +1 -0
  65. package/examples/gh/node_modules/typescript/dist/api/async/api.js +1657 -0
  66. package/examples/gh/node_modules/typescript/dist/api/async/api.js.map +1 -0
  67. package/examples/gh/node_modules/typescript/dist/api/async/client.d.ts +39 -0
  68. package/examples/gh/node_modules/typescript/dist/api/async/client.d.ts.map +1 -0
  69. package/examples/gh/node_modules/typescript/dist/api/async/client.js +211 -0
  70. package/examples/gh/node_modules/typescript/dist/api/async/client.js.map +1 -0
  71. package/examples/gh/node_modules/typescript/dist/api/async/types.d.ts +310 -0
  72. package/examples/gh/node_modules/typescript/dist/api/async/types.d.ts.map +1 -0
  73. package/examples/gh/node_modules/typescript/dist/api/async/types.js +2 -0
  74. package/examples/gh/node_modules/typescript/dist/api/async/types.js.map +1 -0
  75. package/examples/gh/node_modules/typescript/dist/api/compilerOptions.d.ts +109 -0
  76. package/examples/gh/node_modules/typescript/dist/api/compilerOptions.d.ts.map +1 -0
  77. package/examples/gh/node_modules/typescript/dist/api/compilerOptions.js +2 -0
  78. package/examples/gh/node_modules/typescript/dist/api/compilerOptions.js.map +1 -0
  79. package/examples/gh/node_modules/typescript/dist/api/fs.d.ts +23 -0
  80. package/examples/gh/node_modules/typescript/dist/api/fs.d.ts.map +1 -0
  81. package/examples/gh/node_modules/typescript/dist/api/fs.js +109 -0
  82. package/examples/gh/node_modules/typescript/dist/api/fs.js.map +1 -0
  83. package/examples/gh/node_modules/typescript/dist/api/node/encoder.d.ts +15 -0
  84. package/examples/gh/node_modules/typescript/dist/api/node/encoder.d.ts.map +1 -0
  85. package/examples/gh/node_modules/typescript/dist/api/node/encoder.generated.d.ts +5 -0
  86. package/examples/gh/node_modules/typescript/dist/api/node/encoder.generated.d.ts.map +1 -0
  87. package/examples/gh/node_modules/typescript/dist/api/node/encoder.generated.js +74 -0
  88. package/examples/gh/node_modules/typescript/dist/api/node/encoder.generated.js.map +1 -0
  89. package/examples/gh/node_modules/typescript/dist/api/node/encoder.js +287 -0
  90. package/examples/gh/node_modules/typescript/dist/api/node/encoder.js.map +1 -0
  91. package/examples/gh/node_modules/typescript/dist/api/node/msgpack.d.ts +32 -0
  92. package/examples/gh/node_modules/typescript/dist/api/node/msgpack.d.ts.map +1 -0
  93. package/examples/gh/node_modules/typescript/dist/api/node/msgpack.js +213 -0
  94. package/examples/gh/node_modules/typescript/dist/api/node/msgpack.js.map +1 -0
  95. package/examples/gh/node_modules/typescript/dist/api/node/node.d.ts +76 -0
  96. package/examples/gh/node_modules/typescript/dist/api/node/node.d.ts.map +1 -0
  97. package/examples/gh/node_modules/typescript/dist/api/node/node.generated.d.ts +182 -0
  98. package/examples/gh/node_modules/typescript/dist/api/node/node.generated.d.ts.map +1 -0
  99. package/examples/gh/node_modules/typescript/dist/api/node/node.generated.js +835 -0
  100. package/examples/gh/node_modules/typescript/dist/api/node/node.generated.js.map +1 -0
  101. package/examples/gh/node_modules/typescript/dist/api/node/node.infrastructure.d.ts +62 -0
  102. package/examples/gh/node_modules/typescript/dist/api/node/node.infrastructure.d.ts.map +1 -0
  103. package/examples/gh/node_modules/typescript/dist/api/node/node.infrastructure.js +122 -0
  104. package/examples/gh/node_modules/typescript/dist/api/node/node.infrastructure.js.map +1 -0
  105. package/examples/gh/node_modules/typescript/dist/api/node/node.js +298 -0
  106. package/examples/gh/node_modules/typescript/dist/api/node/node.js.map +1 -0
  107. package/examples/gh/node_modules/typescript/dist/api/node/protocol.d.ts +29 -0
  108. package/examples/gh/node_modules/typescript/dist/api/node/protocol.d.ts.map +1 -0
  109. package/examples/gh/node_modules/typescript/dist/api/node/protocol.generated.d.ts +4 -0
  110. package/examples/gh/node_modules/typescript/dist/api/node/protocol.generated.d.ts.map +1 -0
  111. package/examples/gh/node_modules/typescript/dist/api/node/protocol.generated.js +241 -0
  112. package/examples/gh/node_modules/typescript/dist/api/node/protocol.generated.js.map +1 -0
  113. package/examples/gh/node_modules/typescript/dist/api/node/protocol.js +30 -0
  114. package/examples/gh/node_modules/typescript/dist/api/node/protocol.js.map +1 -0
  115. package/examples/gh/node_modules/typescript/dist/api/node/wtf8.d.ts +6 -0
  116. package/examples/gh/node_modules/typescript/dist/api/node/wtf8.d.ts.map +1 -0
  117. package/examples/gh/node_modules/typescript/dist/api/node/wtf8.js +61 -0
  118. package/examples/gh/node_modules/typescript/dist/api/node/wtf8.js.map +1 -0
  119. package/examples/gh/node_modules/typescript/dist/api/options.d.ts +32 -0
  120. package/examples/gh/node_modules/typescript/dist/api/options.d.ts.map +1 -0
  121. package/examples/gh/node_modules/typescript/dist/api/options.js +11 -0
  122. package/examples/gh/node_modules/typescript/dist/api/options.js.map +1 -0
  123. package/examples/gh/node_modules/typescript/dist/api/path.d.ts +110 -0
  124. package/examples/gh/node_modules/typescript/dist/api/path.d.ts.map +1 -0
  125. package/examples/gh/node_modules/typescript/dist/api/path.js +508 -0
  126. package/examples/gh/node_modules/typescript/dist/api/path.js.map +1 -0
  127. package/examples/gh/node_modules/typescript/dist/api/proto.d.ts +239 -0
  128. package/examples/gh/node_modules/typescript/dist/api/proto.d.ts.map +1 -0
  129. package/examples/gh/node_modules/typescript/dist/api/proto.js +37 -0
  130. package/examples/gh/node_modules/typescript/dist/api/proto.js.map +1 -0
  131. package/examples/gh/node_modules/typescript/dist/api/sourceFileCache.d.ts +79 -0
  132. package/examples/gh/node_modules/typescript/dist/api/sourceFileCache.d.ts.map +1 -0
  133. package/examples/gh/node_modules/typescript/dist/api/sourceFileCache.js +169 -0
  134. package/examples/gh/node_modules/typescript/dist/api/sourceFileCache.js.map +1 -0
  135. package/examples/gh/node_modules/typescript/dist/api/sync/api.d.ts +529 -0
  136. package/examples/gh/node_modules/typescript/dist/api/sync/api.d.ts.map +1 -0
  137. package/examples/gh/node_modules/typescript/dist/api/sync/api.js +1665 -0
  138. package/examples/gh/node_modules/typescript/dist/api/sync/api.js.map +1 -0
  139. package/examples/gh/node_modules/typescript/dist/api/sync/client.d.ts +30 -0
  140. package/examples/gh/node_modules/typescript/dist/api/sync/client.d.ts.map +1 -0
  141. package/examples/gh/node_modules/typescript/dist/api/sync/client.js +124 -0
  142. package/examples/gh/node_modules/typescript/dist/api/sync/client.js.map +1 -0
  143. package/examples/gh/node_modules/typescript/dist/api/sync/types.d.ts +310 -0
  144. package/examples/gh/node_modules/typescript/dist/api/sync/types.d.ts.map +1 -0
  145. package/examples/gh/node_modules/typescript/dist/api/sync/types.js +2 -0
  146. package/examples/gh/node_modules/typescript/dist/api/sync/types.js.map +1 -0
  147. package/examples/gh/node_modules/typescript/dist/api/syncChannel.d.ts +114 -0
  148. package/examples/gh/node_modules/typescript/dist/api/syncChannel.d.ts.map +1 -0
  149. package/examples/gh/node_modules/typescript/dist/api/syncChannel.js +508 -0
  150. package/examples/gh/node_modules/typescript/dist/api/syncChannel.js.map +1 -0
  151. package/examples/gh/node_modules/typescript/dist/api/timing.d.ts +175 -0
  152. package/examples/gh/node_modules/typescript/dist/api/timing.d.ts.map +1 -0
  153. package/examples/gh/node_modules/typescript/dist/api/timing.js +149 -0
  154. package/examples/gh/node_modules/typescript/dist/api/timing.js.map +1 -0
  155. package/examples/gh/node_modules/typescript/dist/ast/ast.d.ts +100 -0
  156. package/examples/gh/node_modules/typescript/dist/ast/ast.d.ts.map +1 -0
  157. package/examples/gh/node_modules/typescript/dist/ast/ast.generated.d.ts +1161 -0
  158. package/examples/gh/node_modules/typescript/dist/ast/ast.generated.d.ts.map +1 -0
  159. package/examples/gh/node_modules/typescript/dist/ast/ast.generated.js +4 -0
  160. package/examples/gh/node_modules/typescript/dist/ast/ast.generated.js.map +1 -0
  161. package/examples/gh/node_modules/typescript/dist/ast/ast.js +7 -0
  162. package/examples/gh/node_modules/typescript/dist/ast/ast.js.map +1 -0
  163. package/examples/gh/node_modules/typescript/dist/ast/astnav.d.ts +19 -0
  164. package/examples/gh/node_modules/typescript/dist/ast/astnav.d.ts.map +1 -0
  165. package/examples/gh/node_modules/typescript/dist/ast/astnav.js +596 -0
  166. package/examples/gh/node_modules/typescript/dist/ast/astnav.js.map +1 -0
  167. package/examples/gh/node_modules/typescript/dist/ast/clone.d.ts +16 -0
  168. package/examples/gh/node_modules/typescript/dist/ast/clone.d.ts.map +1 -0
  169. package/examples/gh/node_modules/typescript/dist/ast/clone.js +104 -0
  170. package/examples/gh/node_modules/typescript/dist/ast/clone.js.map +1 -0
  171. package/examples/gh/node_modules/typescript/dist/ast/factory.generated.d.ts +520 -0
  172. package/examples/gh/node_modules/typescript/dist/ast/factory.generated.d.ts.map +1 -0
  173. package/examples/gh/node_modules/typescript/dist/ast/factory.generated.js +3057 -0
  174. package/examples/gh/node_modules/typescript/dist/ast/factory.generated.js.map +1 -0
  175. package/examples/gh/node_modules/typescript/dist/ast/index.d.ts +20 -0
  176. package/examples/gh/node_modules/typescript/dist/ast/index.d.ts.map +1 -0
  177. package/examples/gh/node_modules/typescript/dist/ast/index.js +20 -0
  178. package/examples/gh/node_modules/typescript/dist/ast/index.js.map +1 -0
  179. package/examples/gh/node_modules/typescript/dist/ast/is.d.ts +35 -0
  180. package/examples/gh/node_modules/typescript/dist/ast/is.d.ts.map +1 -0
  181. package/examples/gh/node_modules/typescript/dist/ast/is.generated.d.ts +329 -0
  182. package/examples/gh/node_modules/typescript/dist/ast/is.generated.d.ts.map +1 -0
  183. package/examples/gh/node_modules/typescript/dist/ast/is.generated.js +1103 -0
  184. package/examples/gh/node_modules/typescript/dist/ast/is.generated.js.map +1 -0
  185. package/examples/gh/node_modules/typescript/dist/ast/is.js +233 -0
  186. package/examples/gh/node_modules/typescript/dist/ast/is.js.map +1 -0
  187. package/examples/gh/node_modules/typescript/dist/ast/jsdoc.d.ts +11 -0
  188. package/examples/gh/node_modules/typescript/dist/ast/jsdoc.d.ts.map +1 -0
  189. package/examples/gh/node_modules/typescript/dist/ast/jsdoc.js +202 -0
  190. package/examples/gh/node_modules/typescript/dist/ast/jsdoc.js.map +1 -0
  191. package/examples/gh/node_modules/typescript/dist/ast/scanner.d.ts +97 -0
  192. package/examples/gh/node_modules/typescript/dist/ast/scanner.d.ts.map +1 -0
  193. package/examples/gh/node_modules/typescript/dist/ast/scanner.js +2230 -0
  194. package/examples/gh/node_modules/typescript/dist/ast/scanner.js.map +1 -0
  195. package/examples/gh/node_modules/typescript/dist/ast/utils.d.ts +17 -0
  196. package/examples/gh/node_modules/typescript/dist/ast/utils.d.ts.map +1 -0
  197. package/examples/gh/node_modules/typescript/dist/ast/utils.js +67 -0
  198. package/examples/gh/node_modules/typescript/dist/ast/utils.js.map +1 -0
  199. package/examples/gh/node_modules/typescript/dist/ast/visitor.d.ts +14 -0
  200. package/examples/gh/node_modules/typescript/dist/ast/visitor.d.ts.map +1 -0
  201. package/examples/gh/node_modules/typescript/dist/ast/visitor.generated.d.ts +50 -0
  202. package/examples/gh/node_modules/typescript/dist/ast/visitor.generated.d.ts.map +1 -0
  203. package/examples/gh/node_modules/typescript/dist/ast/visitor.generated.js +978 -0
  204. package/examples/gh/node_modules/typescript/dist/ast/visitor.generated.js.map +1 -0
  205. package/examples/gh/node_modules/typescript/dist/ast/visitor.js +47 -0
  206. package/examples/gh/node_modules/typescript/dist/ast/visitor.js.map +1 -0
  207. package/examples/gh/node_modules/typescript/dist/enums/characterCodes.d.ts +2 -0
  208. package/examples/gh/node_modules/typescript/dist/enums/characterCodes.d.ts.map +1 -0
  209. package/examples/gh/node_modules/typescript/dist/enums/characterCodes.enum.d.ts +129 -0
  210. package/examples/gh/node_modules/typescript/dist/enums/characterCodes.enum.d.ts.map +1 -0
  211. package/examples/gh/node_modules/typescript/dist/enums/characterCodes.enum.js +132 -0
  212. package/examples/gh/node_modules/typescript/dist/enums/characterCodes.enum.js.map +1 -0
  213. package/examples/gh/node_modules/typescript/dist/enums/characterCodes.js +130 -0
  214. package/examples/gh/node_modules/typescript/dist/enums/characterCodes.js.map +1 -0
  215. package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.d.ts +2 -0
  216. package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.d.ts.map +1 -0
  217. package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.enum.d.ts +5 -0
  218. package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.enum.d.ts.map +1 -0
  219. package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.enum.js +6 -0
  220. package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.enum.js.map +1 -0
  221. package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.js +6 -0
  222. package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.js.map +1 -0
  223. package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.d.ts +2 -0
  224. package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.d.ts.map +1 -0
  225. package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.enum.d.ts +28 -0
  226. package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.enum.d.ts.map +1 -0
  227. package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.enum.js +30 -0
  228. package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.enum.js.map +1 -0
  229. package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.js +30 -0
  230. package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.js.map +1 -0
  231. package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.d.ts +2 -0
  232. package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.d.ts.map +1 -0
  233. package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.enum.d.ts +7 -0
  234. package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.enum.d.ts.map +1 -0
  235. package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.enum.js +9 -0
  236. package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.enum.js.map +1 -0
  237. package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.js +9 -0
  238. package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.js.map +1 -0
  239. package/examples/gh/node_modules/typescript/dist/enums/elementFlags.d.ts +2 -0
  240. package/examples/gh/node_modules/typescript/dist/enums/elementFlags.d.ts.map +1 -0
  241. package/examples/gh/node_modules/typescript/dist/enums/elementFlags.enum.d.ts +12 -0
  242. package/examples/gh/node_modules/typescript/dist/enums/elementFlags.enum.d.ts.map +1 -0
  243. package/examples/gh/node_modules/typescript/dist/enums/elementFlags.enum.js +14 -0
  244. package/examples/gh/node_modules/typescript/dist/enums/elementFlags.enum.js.map +1 -0
  245. package/examples/gh/node_modules/typescript/dist/enums/elementFlags.js +14 -0
  246. package/examples/gh/node_modules/typescript/dist/enums/elementFlags.js.map +1 -0
  247. package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.d.ts +2 -0
  248. package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.d.ts.map +1 -0
  249. package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.enum.d.ts +23 -0
  250. package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.enum.d.ts.map +1 -0
  251. package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.enum.js +25 -0
  252. package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.enum.js.map +1 -0
  253. package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.js +25 -0
  254. package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.js.map +1 -0
  255. package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.d.ts +2 -0
  256. package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.d.ts.map +1 -0
  257. package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.enum.d.ts +9 -0
  258. package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.enum.d.ts.map +1 -0
  259. package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.enum.js +11 -0
  260. package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.enum.js.map +1 -0
  261. package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.js +11 -0
  262. package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.js.map +1 -0
  263. package/examples/gh/node_modules/typescript/dist/enums/languageVariant.d.ts +2 -0
  264. package/examples/gh/node_modules/typescript/dist/enums/languageVariant.d.ts.map +1 -0
  265. package/examples/gh/node_modules/typescript/dist/enums/languageVariant.enum.d.ts +5 -0
  266. package/examples/gh/node_modules/typescript/dist/enums/languageVariant.enum.d.ts.map +1 -0
  267. package/examples/gh/node_modules/typescript/dist/enums/languageVariant.enum.js +6 -0
  268. package/examples/gh/node_modules/typescript/dist/enums/languageVariant.enum.js.map +1 -0
  269. package/examples/gh/node_modules/typescript/dist/enums/languageVariant.js +6 -0
  270. package/examples/gh/node_modules/typescript/dist/enums/languageVariant.js.map +1 -0
  271. package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.d.ts +2 -0
  272. package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.d.ts.map +1 -0
  273. package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.enum.d.ts +42 -0
  274. package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.enum.d.ts.map +1 -0
  275. package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.enum.js +44 -0
  276. package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.enum.js.map +1 -0
  277. package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.js +44 -0
  278. package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.js.map +1 -0
  279. package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.d.ts +2 -0
  280. package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.d.ts.map +1 -0
  281. package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.enum.d.ts +7 -0
  282. package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.enum.d.ts.map +1 -0
  283. package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.enum.js +9 -0
  284. package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.enum.js.map +1 -0
  285. package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.js +9 -0
  286. package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.js.map +1 -0
  287. package/examples/gh/node_modules/typescript/dist/enums/moduleKind.d.ts +2 -0
  288. package/examples/gh/node_modules/typescript/dist/enums/moduleKind.d.ts.map +1 -0
  289. package/examples/gh/node_modules/typescript/dist/enums/moduleKind.enum.d.ts +17 -0
  290. package/examples/gh/node_modules/typescript/dist/enums/moduleKind.enum.d.ts.map +1 -0
  291. package/examples/gh/node_modules/typescript/dist/enums/moduleKind.enum.js +19 -0
  292. package/examples/gh/node_modules/typescript/dist/enums/moduleKind.enum.js.map +1 -0
  293. package/examples/gh/node_modules/typescript/dist/enums/moduleKind.js +19 -0
  294. package/examples/gh/node_modules/typescript/dist/enums/moduleKind.js.map +1 -0
  295. package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.d.ts +2 -0
  296. package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.d.ts.map +1 -0
  297. package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.enum.d.ts +9 -0
  298. package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.enum.d.ts.map +1 -0
  299. package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.enum.js +11 -0
  300. package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.enum.js.map +1 -0
  301. package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.js +11 -0
  302. package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.js.map +1 -0
  303. package/examples/gh/node_modules/typescript/dist/enums/newLineKind.d.ts +2 -0
  304. package/examples/gh/node_modules/typescript/dist/enums/newLineKind.d.ts.map +1 -0
  305. package/examples/gh/node_modules/typescript/dist/enums/newLineKind.enum.d.ts +6 -0
  306. package/examples/gh/node_modules/typescript/dist/enums/newLineKind.enum.d.ts.map +1 -0
  307. package/examples/gh/node_modules/typescript/dist/enums/newLineKind.enum.js +8 -0
  308. package/examples/gh/node_modules/typescript/dist/enums/newLineKind.enum.js.map +1 -0
  309. package/examples/gh/node_modules/typescript/dist/enums/newLineKind.js +8 -0
  310. package/examples/gh/node_modules/typescript/dist/enums/newLineKind.js.map +1 -0
  311. package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.d.ts +2 -0
  312. package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.d.ts.map +1 -0
  313. package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.d.ts +36 -0
  314. package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.d.ts.map +1 -0
  315. package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.js +38 -0
  316. package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.js.map +1 -0
  317. package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.js +38 -0
  318. package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.js.map +1 -0
  319. package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.d.ts +2 -0
  320. package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.d.ts.map +1 -0
  321. package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.enum.d.ts +44 -0
  322. package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.enum.d.ts.map +1 -0
  323. package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.enum.js +46 -0
  324. package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.enum.js.map +1 -0
  325. package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.js +46 -0
  326. package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.js.map +1 -0
  327. package/examples/gh/node_modules/typescript/dist/enums/objectFlags.d.ts +2 -0
  328. package/examples/gh/node_modules/typescript/dist/enums/objectFlags.d.ts.map +1 -0
  329. package/examples/gh/node_modules/typescript/dist/enums/objectFlags.enum.d.ts +50 -0
  330. package/examples/gh/node_modules/typescript/dist/enums/objectFlags.enum.d.ts.map +1 -0
  331. package/examples/gh/node_modules/typescript/dist/enums/objectFlags.enum.js +52 -0
  332. package/examples/gh/node_modules/typescript/dist/enums/objectFlags.enum.js.map +1 -0
  333. package/examples/gh/node_modules/typescript/dist/enums/objectFlags.js +52 -0
  334. package/examples/gh/node_modules/typescript/dist/enums/objectFlags.js.map +1 -0
  335. package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.d.ts +2 -0
  336. package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.d.ts.map +1 -0
  337. package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.enum.d.ts +16 -0
  338. package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.enum.d.ts.map +1 -0
  339. package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.enum.js +18 -0
  340. package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.enum.js.map +1 -0
  341. package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.js +18 -0
  342. package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.js.map +1 -0
  343. package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.d.ts +2 -0
  344. package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.d.ts.map +1 -0
  345. package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.enum.d.ts +13 -0
  346. package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.enum.d.ts.map +1 -0
  347. package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.enum.js +14 -0
  348. package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.enum.js.map +1 -0
  349. package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.js +14 -0
  350. package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.js.map +1 -0
  351. package/examples/gh/node_modules/typescript/dist/enums/scriptKind.d.ts +2 -0
  352. package/examples/gh/node_modules/typescript/dist/enums/scriptKind.d.ts.map +1 -0
  353. package/examples/gh/node_modules/typescript/dist/enums/scriptKind.enum.d.ts +11 -0
  354. package/examples/gh/node_modules/typescript/dist/enums/scriptKind.enum.d.ts.map +1 -0
  355. package/examples/gh/node_modules/typescript/dist/enums/scriptKind.enum.js +12 -0
  356. package/examples/gh/node_modules/typescript/dist/enums/scriptKind.enum.js.map +1 -0
  357. package/examples/gh/node_modules/typescript/dist/enums/scriptKind.js +12 -0
  358. package/examples/gh/node_modules/typescript/dist/enums/scriptKind.js.map +1 -0
  359. package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.d.ts +2 -0
  360. package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.d.ts.map +1 -0
  361. package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.enum.d.ts +17 -0
  362. package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.enum.d.ts.map +1 -0
  363. package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.enum.js +18 -0
  364. package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.enum.js.map +1 -0
  365. package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.js +18 -0
  366. package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.js.map +1 -0
  367. package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.d.ts +2 -0
  368. package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.d.ts.map +1 -0
  369. package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.enum.d.ts +15 -0
  370. package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.enum.d.ts.map +1 -0
  371. package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.enum.js +17 -0
  372. package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.enum.js.map +1 -0
  373. package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.js +17 -0
  374. package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.js.map +1 -0
  375. package/examples/gh/node_modules/typescript/dist/enums/signatureKind.d.ts +2 -0
  376. package/examples/gh/node_modules/typescript/dist/enums/signatureKind.d.ts.map +1 -0
  377. package/examples/gh/node_modules/typescript/dist/enums/signatureKind.enum.d.ts +5 -0
  378. package/examples/gh/node_modules/typescript/dist/enums/signatureKind.enum.d.ts.map +1 -0
  379. package/examples/gh/node_modules/typescript/dist/enums/signatureKind.enum.js +7 -0
  380. package/examples/gh/node_modules/typescript/dist/enums/signatureKind.enum.js.map +1 -0
  381. package/examples/gh/node_modules/typescript/dist/enums/signatureKind.js +7 -0
  382. package/examples/gh/node_modules/typescript/dist/enums/signatureKind.js.map +1 -0
  383. package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.d.ts +2 -0
  384. package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.d.ts.map +1 -0
  385. package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.enum.d.ts +71 -0
  386. package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.enum.d.ts.map +1 -0
  387. package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.enum.js +73 -0
  388. package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.enum.js.map +1 -0
  389. package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.js +73 -0
  390. package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.js.map +1 -0
  391. package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.d.ts +2 -0
  392. package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.d.ts.map +1 -0
  393. package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.enum.d.ts +389 -0
  394. package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.enum.d.ts.map +1 -0
  395. package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.enum.js +391 -0
  396. package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.enum.js.map +1 -0
  397. package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.js +391 -0
  398. package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.js.map +1 -0
  399. package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.d.ts +2 -0
  400. package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.d.ts.map +1 -0
  401. package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.enum.d.ts +30 -0
  402. package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.enum.d.ts.map +1 -0
  403. package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.enum.js +32 -0
  404. package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.enum.js.map +1 -0
  405. package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.js +32 -0
  406. package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.js.map +1 -0
  407. package/examples/gh/node_modules/typescript/dist/enums/typeFlags.d.ts +2 -0
  408. package/examples/gh/node_modules/typescript/dist/enums/typeFlags.d.ts.map +1 -0
  409. package/examples/gh/node_modules/typescript/dist/enums/typeFlags.enum.d.ts +76 -0
  410. package/examples/gh/node_modules/typescript/dist/enums/typeFlags.enum.d.ts.map +1 -0
  411. package/examples/gh/node_modules/typescript/dist/enums/typeFlags.enum.js +78 -0
  412. package/examples/gh/node_modules/typescript/dist/enums/typeFlags.enum.js.map +1 -0
  413. package/examples/gh/node_modules/typescript/dist/enums/typeFlags.js +78 -0
  414. package/examples/gh/node_modules/typescript/dist/enums/typeFlags.js.map +1 -0
  415. package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.d.ts +2 -0
  416. package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.d.ts.map +1 -0
  417. package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.enum.d.ts +7 -0
  418. package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.enum.d.ts.map +1 -0
  419. package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.enum.js +9 -0
  420. package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.enum.js.map +1 -0
  421. package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.js +9 -0
  422. package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.js.map +1 -0
  423. package/examples/gh/node_modules/typescript/dist/internal/utils.d.ts +23 -0
  424. package/examples/gh/node_modules/typescript/dist/internal/utils.d.ts.map +1 -0
  425. package/examples/gh/node_modules/typescript/dist/internal/utils.js +25 -0
  426. package/examples/gh/node_modules/typescript/dist/internal/utils.js.map +1 -0
  427. package/examples/gh/node_modules/typescript/lib/getExePath.d.ts +2 -0
  428. package/examples/gh/node_modules/typescript/lib/getExePath.js +70 -0
  429. package/examples/gh/node_modules/typescript/lib/tsc.js +28 -0
  430. package/examples/gh/node_modules/typescript/lib/version.cjs +3 -0
  431. package/examples/gh/node_modules/typescript/lib/version.d.cts +2 -0
  432. package/examples/gh/node_modules/typescript/package.json +87 -0
  433. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/License.txt +11 -0
  434. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/README.md +54 -0
  435. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/main.d.ts +17 -0
  436. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/main.js +83 -0
  437. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/ril.d.ts +22 -0
  438. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/ril.js +210 -0
  439. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/api.d.ts +14 -0
  440. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/api.js +87 -0
  441. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/cancellation.d.ts +32 -0
  442. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/cancellation.js +132 -0
  443. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/connection.d.ts +367 -0
  444. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/connection.js +1271 -0
  445. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/disposable.d.ts +9 -0
  446. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/disposable.js +16 -0
  447. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/encoding.d.ts +52 -0
  448. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/encoding.js +70 -0
  449. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/events.d.ts +39 -0
  450. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/events.js +135 -0
  451. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/is.d.ts +7 -0
  452. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/is.js +34 -0
  453. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/linkedMap.d.ts +55 -0
  454. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/linkedMap.js +412 -0
  455. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageBuffer.d.ts +18 -0
  456. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageBuffer.js +155 -0
  457. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageReader.d.ts +77 -0
  458. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageReader.js +246 -0
  459. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageWriter.d.ts +60 -0
  460. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageWriter.js +157 -0
  461. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messages.d.ts +369 -0
  462. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messages.js +436 -0
  463. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/ral.d.ts +74 -0
  464. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/ral.js +23 -0
  465. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/semaphore.d.ts +10 -0
  466. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/semaphore.js +74 -0
  467. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/sharedArrayCancellation.d.ts +15 -0
  468. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/sharedArrayCancellation.js +77 -0
  469. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/main.d.ts +58 -0
  470. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/main.js +289 -0
  471. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/ril.d.ts +12 -0
  472. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/ril.js +163 -0
  473. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/package.json +54 -0
  474. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/typings/thenable.d.ts +5 -0
  475. package/examples/gh/package.json +11 -5
  476. package/examples/gh/src/main.ts +10 -4
  477. package/examples/help-config.ts +43 -0
  478. package/examples/json-mode.ts +8 -4
  479. package/examples/middleware.ts +1 -1
  480. package/examples/output-extras.ts +46 -0
  481. package/examples/parser-control.ts +40 -0
  482. package/examples/pwsh-demo/package.json +1 -1
  483. package/examples/pwsh-demo/src/main.ts +1 -1
  484. package/examples/standard-schema.ts +45 -0
  485. package/examples/transport-launcher.ts +10 -10
  486. package/package.json +26 -31
  487. package/skills/cli-creation/SKILL.md +140 -0
  488. package/skills/cli-creation/agents/openai.yaml +4 -0
  489. package/skills/cli-creation/assets/templates/multi-command.bun-test.ts.tpl +20 -0
  490. package/skills/cli-creation/assets/templates/multi-command.test.ts.tpl +20 -0
  491. package/skills/cli-creation/assets/templates/multi-command.ts.tpl +89 -0
  492. package/skills/cli-creation/assets/templates/single-command.bun-test.ts.tpl +29 -0
  493. package/skills/cli-creation/assets/templates/single-command.test.ts.tpl +29 -0
  494. package/skills/cli-creation/assets/templates/single-command.ts.tpl +47 -0
  495. package/skills/cli-creation/references/consumer-workflow.md +65 -0
  496. package/skills/cli-creation/references/pattern-cookbook.md +293 -0
  497. package/skills/cli-creation/references/runtime-notes.md +29 -0
  498. package/skills/cli-creation/scripts/scaffold_cli.py +360 -0
  499. package/dist/core/schema-dsl/runtime.d.mts +0 -144
  500. package/dist/core/schema-dsl/runtime.mjs +0 -271
  501. package/dist/core/schema-dsl/to-json-schema.d.mts +0 -29
  502. package/dist/core/schema-dsl/to-json-schema.mjs +0 -74
@@ -19,13 +19,12 @@
19
19
  "typecheck": "tsc --noEmit"
20
20
  },
21
21
  "dependencies": {
22
- "@kjanat/dreamcli": "link:@kjanat/dreamcli"
22
+ "@kjanat/dreamcli": "file:../.."
23
23
  },
24
24
  "devDependencies": {
25
- "@types/bun": "catalog:",
26
- "typescript": "catalog:"
25
+ "@types/bun": "latest",
26
+ "typescript": "latest"
27
27
  },
28
- "packageManager": "bun@1.3.12",
29
28
  "engines": {
30
29
  "bun": "^1.3"
31
30
  },
@@ -34,6 +33,13 @@
34
33
  "name": "bun",
35
34
  "version": "^1.3",
36
35
  "onFail": "error"
37
- }
36
+ },
37
+ "packageManager": [
38
+ {
39
+ "name": "bun",
40
+ "onFail": "error",
41
+ "version": "^1.3"
42
+ }
43
+ ]
38
44
  }
39
45
  }
@@ -1,4 +1,6 @@
1
1
  #!/usr/bin/env bun
2
+ // oxlint-disable no-unused-vars | CLIBuilder is used for type inference of the JSDoc comments
3
+ // deno-lint-ignore-file no-unused-vars
2
4
  /**
3
5
  * Walkthrough example package entrypoint for a miniature `gh` clone.
4
6
  *
@@ -16,7 +18,6 @@
16
18
  * @module
17
19
  */
18
20
 
19
- // oxlint-disable-next-line no-unused-vars -- for CLIBuilder type in JSDoc
20
21
  import type { CLIBuilder } from '@kjanat/dreamcli';
21
22
  import { cli } from '@kjanat/dreamcli';
22
23
 
@@ -27,12 +28,17 @@ import { pr } from './commands/pr.ts';
27
28
  /**
28
29
  * Create the example CLI and register commands.
29
30
  *
30
- * {@linkcode CLIBuilder.packageJson | packageJson()} fills `version` and `description` from the nearest `package.json`.\
31
- * The CLI name still comes from `cli('gh')` unless `packageJson({ inferName: true })` is used.
31
+ * {@linkcode CLIBuilder.manifest | manifest()} fills `version` and `description` from this package's manifest.\
32
+ * The CLI name still comes from `cli('gh')` unless `manifest({ inferName: true })` is used.
32
33
  *
33
34
  * Command registration order determines the order shown in `--help`.
34
35
  */
35
- export const gh = cli('gh').packageJson().command(auth).command(pr).command(issue).completions();
36
+ export const gh = cli('gh')
37
+ .manifest({ from: import.meta, files: ['package.json'] })
38
+ .command(auth)
39
+ .command(pr)
40
+ .command(issue)
41
+ .completions();
36
42
 
37
43
  // Run the CLI if this file is executed directly (e.g. `bun src/main.ts ...`).
38
44
  if (import.meta.main) {
@@ -0,0 +1,43 @@
1
+ #!/usr/bin/env bun
2
+ /**
3
+ * Help rendering configuration.
4
+ *
5
+ * Demonstrates: `.help()` theming, `flagOrder: 'declaration'`, a routable
6
+ * default command (`.default(cmd, { route: true })`), and footer control.
7
+ *
8
+ * Usage:
9
+ * npx tsx examples/help-config.ts --help # themed, declaration-ordered
10
+ * npx tsx examples/help-config.ts build --help # default command by name
11
+ * npx tsx examples/help-config.ts --help --json # definition document instead of text
12
+ */
13
+
14
+ import { arg, cli, command, flag } from '@kjanat/dreamcli';
15
+
16
+ const build = command('build')
17
+ .description('Build the project')
18
+ .example(({ name }) => `${name} build src/ --minify`, 'Minified build')
19
+ .arg('entry', arg.string().default('src/').describe('Entry directory'))
20
+ // Declaration order is preserved in help via `flagOrder` below, so put
21
+ // the flags users reach for first at the top.
22
+ .flag('minify', flag.boolean().describe('Minify output'))
23
+ .flag('sourcemap', flag.boolean().describe('Emit sourcemaps'))
24
+ .flag('watch', flag.boolean().alias('w').describe('Rebuild on change'))
25
+ .action(({ args, flags, out }) => {
26
+ out.log(`building ${args.entry} minify=${flags.minify} watch=${flags.watch}`);
27
+ });
28
+
29
+ void cli('builder')
30
+ .version('1.0.0')
31
+ .description('A build tool with configured help')
32
+ .help({
33
+ // 'declaration' keeps .flag() call order; default is 'alphabetical'.
34
+ flagOrder: 'declaration',
35
+ // Theme factory receives the gated palette — never invoked when color
36
+ // is off, so custom themes cannot leak escapes into piped output.
37
+ theme: (c) => ({ sectionTitle: c.magenta }),
38
+ footer: false,
39
+ })
40
+ // route: true lists the default under Commands (tagged `(default)`) and
41
+ // makes `builder build …` route by name alongside the bare `builder …`.
42
+ .default(build, { route: true })
43
+ .run();
@@ -2,12 +2,14 @@
2
2
  /**
3
3
  * Mixed machine-readable JSON and human-readable side-channel output.
4
4
  *
5
- * Demonstrates: machine-readable `out.json()` stdout, human-readable stderr
6
- * side channels, and `--json` for CLI-managed structured errors.
5
+ * Demonstrates: machine-readable `out.json()` stdout, `out.status()` stderr
6
+ * side channels suppressible with `--quiet`, and `--json` for CLI-managed
7
+ * structured errors.
7
8
  *
8
9
  * Usage:
9
10
  * npx tsx examples/json-mode.ts list # JSON stdout + plain stderr side channel
10
11
  * npx tsx examples/json-mode.ts list --format table # JSON stdout + table stderr side channel
12
+ * npx tsx examples/json-mode.ts list --quiet # JSON stdout only, status lines suppressed
11
13
  * npx tsx examples/json-mode.ts list --json # same success output; CLI-managed errors stay JSON-safe
12
14
  * npx tsx examples/json-mode.ts show web-api
13
15
  * npx tsx examples/json-mode.ts show nonexistent # structured error
@@ -55,8 +57,10 @@ const list = command('list')
55
57
  { format: 'text', stream: 'stderr' },
56
58
  );
57
59
  } else {
60
+ // `out.status()` writes to stderr (stdout stays pipeable JSON) and
61
+ // is suppressed under `--quiet`, unlike `out.error()`.
58
62
  for (const s of services) {
59
- out.error(`${s.name}: ${s.status} (${s.uptime}%)`);
63
+ out.status(`${s.name}: ${s.status} (${s.uptime}%)`);
60
64
  }
61
65
  }
62
66
  });
@@ -78,7 +82,7 @@ const show = command('show')
78
82
  }
79
83
 
80
84
  out.json(service);
81
- out.error(`${service.name}: ${service.status} (uptime ${service.uptime}%)`);
85
+ out.status(`${service.name}: ${service.status} (uptime ${service.uptime}%)`);
82
86
  });
83
87
 
84
88
  // --- CLI with --json support ---
@@ -48,7 +48,7 @@ const timing = middleware<{ startTime: number }>(async ({ out, next }) => {
48
48
 
49
49
  // Code after `next()` runs after the action completes (onion model).
50
50
  const elapsed = (performance.now() - start).toFixed(0);
51
- out.info(`Completed in ${elapsed}ms`);
51
+ out.status(`Completed in ${elapsed}ms`);
52
52
  });
53
53
 
54
54
  // --- Command using both middlewares ---
@@ -0,0 +1,46 @@
1
+ #!/usr/bin/env bun
2
+ /**
3
+ * Output channel extras: colors, hyperlinks, and exit codes without throwing.
4
+ *
5
+ * Demonstrates: the gated `out.color` palette, OSC 8 hyperlinks behind
6
+ * `out.isHyperlinkSupported`, and `out.setExitCode()` for "report and
7
+ * continue" failures.
8
+ *
9
+ * Usage:
10
+ * npx tsx examples/output-extras.ts
11
+ * npx tsx examples/output-extras.ts | cat # colors and links gate off
12
+ * NO_COLOR=1 npx tsx examples/output-extras.ts
13
+ * npx tsx examples/output-extras.ts; echo "exit: $?"
14
+ */
15
+
16
+ import { cli, command, osc8 } from '@kjanat/dreamcli';
17
+
18
+ const targets = [
19
+ { name: 'web-api', ok: true, docs: 'https://example.com/web-api' },
20
+ { name: 'worker', ok: false, docs: 'https://example.com/worker' },
21
+ { name: 'cache', ok: true, docs: 'https://example.com/cache' },
22
+ ];
23
+
24
+ const check = command('check')
25
+ .description('Health-check all targets')
26
+ .action(({ out }) => {
27
+ for (const target of targets) {
28
+ // Every formatter is an identity function when color is off
29
+ // (piped, NO_COLOR, --json), so this is safe unconditionally.
30
+ const mark = target.ok ? out.color.green('✔') : out.color.red('✖');
31
+ // OSC 8 links garble piped output — gate on the resolved support
32
+ // flag (honors NO_HYPERLINKS/FORCE_HYPERLINKS and --no-hyperlinks).
33
+ const label = out.isHyperlinkSupported ? osc8(target.docs, target.name) : target.name;
34
+ out.log(`${mark} ${label}`);
35
+ }
36
+
37
+ const failed = targets.filter((t) => !t.ok);
38
+ if (failed.length > 0) {
39
+ // Report everything, exit non-zero — without throwing away the
40
+ // successful output the way a thrown CLIError would.
41
+ out.setExitCode(1);
42
+ out.status(`${failed.length} of ${targets.length} targets unhealthy`);
43
+ }
44
+ });
45
+
46
+ void cli('healthcheck').version('1.0.0').default(check).run();
@@ -0,0 +1,40 @@
1
+ #!/usr/bin/env bun
2
+ /**
3
+ * Parser-level controls: negation, duplicate policy, and spelling parity.
4
+ *
5
+ * Demonstrates: `flag.boolean().negatable()` for `--no-<name>`,
6
+ * `.duplicates('error' | 'first' | 'last')` on singleton flags, and the
7
+ * built-in kebab ↔ camel spelling parity.
8
+ *
9
+ * Usage:
10
+ * npx tsx examples/parser-control.ts --sandbox # true
11
+ * npx tsx examples/parser-control.ts --no-sandbox # false, same logical flag
12
+ * npx tsx examples/parser-control.ts --sandbox --no-sandbox # last occurrence wins
13
+ * npx tsx examples/parser-control.ts --mode fast --mode safe # error: duplicate
14
+ * npx tsx examples/parser-control.ts --dryRun # camel spelling of --dry-run
15
+ * npx tsx examples/parser-control.ts --help # shows --[no-]sandbox
16
+ */
17
+
18
+ import { cli, command, flag } from '@kjanat/dreamcli';
19
+
20
+ const run = command('run')
21
+ .description('Run a task with strict parser semantics')
22
+ // Negatable — `--sandbox` and `--no-sandbox` are two spellings of ONE
23
+ // logical flag; help renders `--[no-]sandbox`.
24
+ .flag('sandbox', flag.boolean().default(true).negatable().describe('Isolate the task'))
25
+ // Duplicates — config knobs should reject repeats instead of silently
26
+ // keeping the last value.
27
+ .flag(
28
+ 'mode',
29
+ flag.enum(['fast', 'safe']).default('safe').duplicates('error').describe('Execution mode'),
30
+ )
31
+ // Spelling parity is on by default: `--dryRun` matches this kebab name
32
+ // (and a camel-named flag would match its kebab spelling). Handler keys,
33
+ // help, and completions stay canonical.
34
+ .flag('dry-run', flag.boolean().describe('Print the plan without executing'))
35
+ .action(({ flags, out }) => {
36
+ out.log(`mode=${flags.mode} sandbox=${flags.sandbox} dryRun=${flags['dry-run']}`);
37
+ });
38
+
39
+ // Opt out of parity per CLI with: cli('tasks', { flags: { caseParity: false } })
40
+ void cli('tasks').version('1.0.0').default(run).run();
@@ -21,7 +21,7 @@
21
21
  "typecheck": "tsc --noEmit"
22
22
  },
23
23
  "dependencies": {
24
- "@kjanat/dreamcli": "link:@kjanat/dreamcli"
24
+ "@kjanat/dreamcli": "file:../.."
25
25
  },
26
26
  "devDependencies": {
27
27
  "@types/bun": "catalog:",
@@ -127,7 +127,7 @@ const debugDump = command('debug-dump')
127
127
  * PowerShell completion playground CLI used by docs, smoke checks, and manual shell testing.
128
128
  */
129
129
  export const pwshDemo = cli('pwsh-demo')
130
- .packageJson()
130
+ .manifest({ from: import.meta.url })
131
131
  .default(open)
132
132
  .command(deploy)
133
133
  .command(status)
@@ -0,0 +1,45 @@
1
+ #!/usr/bin/env bun
2
+ /**
3
+ * Standard Schema validation for custom flags and args.
4
+ *
5
+ * Demonstrates: `flag.custom(schema)` accepting any Standard Schema v1
6
+ * validator with inferred output types. Zod 4, Valibot, and ArkType all
7
+ * conform; the inline schema below shows the contract itself with zero
8
+ * dependencies.
9
+ *
10
+ * Usage:
11
+ * npx tsx examples/standard-schema.ts --port 8080
12
+ * npx tsx examples/standard-schema.ts --port 99999 # validation error
13
+ * npx tsx examples/standard-schema.ts --port abc # validation error
14
+ */
15
+
16
+ import type { StandardSchemaV1 } from '@kjanat/dreamcli';
17
+ import { cli, command, flag } from '@kjanat/dreamcli';
18
+
19
+ // Any object with `~standard` conforms — this is what zod.dev/valibot.dev
20
+ // schemas look like under the hood. With a library: flag.custom(z.coerce.number().int().max(65535)).
21
+ const port: StandardSchemaV1<unknown, number> = {
22
+ '~standard': {
23
+ version: 1,
24
+ vendor: 'example',
25
+ validate: (value) => {
26
+ const parsed = Number(value);
27
+ if (!Number.isInteger(parsed) || parsed < 1 || parsed > 65535) {
28
+ return { issues: [{ message: `expected a port (1-65535), got ${String(value)}` }] };
29
+ }
30
+ return { value: parsed };
31
+ },
32
+ },
33
+ };
34
+
35
+ const serve = command('serve')
36
+ .description('Serve on a schema-validated port')
37
+ // Validation runs after source resolution — argv, env, config, prompt,
38
+ // and default values all pass through the same schema.
39
+ .flag('port', flag.custom(port).default(3000).env('PORT').describe('Port to bind'))
40
+ .action(({ flags, out }) => {
41
+ // flags.port: number — inferred from the schema's output type.
42
+ out.log(`listening on :${flags.port}`);
43
+ });
44
+
45
+ void cli('serve').version('1.0.0').default(serve).run();
@@ -8,9 +8,10 @@
8
8
  * resolve and before the action. The derived, fully typed `Transport` is then
9
9
  * handed to `.action()` through `ctx`.
10
10
  *
11
- * Demonstrates: an "exactly one of" rule via `.derive()` throwing `CLIError`, a
12
- * kebab-case flag name accessed with bracket notation (`flags['node-ipc']`), and
13
- * passing a typed result to the action through derived context.
11
+ * Demonstrates: an "exactly one of" rule via `.derive()` throwing `CLIError`,
12
+ * declarative numeric constraints (`flag.number({ int: true, min: 1, max: 65535 })`),
13
+ * a kebab-case flag name accessed with bracket notation (`flags['node-ipc']`),
14
+ * and passing a typed result to the action through derived context.
14
15
  *
15
16
  * Usage:
16
17
  * npx tsx examples/transport-launcher.ts --stdio
@@ -33,7 +34,10 @@ const launcher = command('lsp-server')
33
34
  .description('Launch the language server over exactly one transport')
34
35
  .flag('stdio', flag.boolean().describe('Use the stdio transport'))
35
36
  .flag('node-ipc', flag.boolean().describe('Use the Node IPC transport'))
36
- .flag('socket', flag.number().describe('Use a TCP socket on <port>'))
37
+ .flag(
38
+ 'socket',
39
+ flag.number({ int: true, min: 1, max: 65535 }).describe('Use a TCP socket on <port>'),
40
+ )
37
41
  // `.derive()` runs after resolution and before the action — the idiomatic
38
42
  // place for a constraint dreamcli does not express declaratively.
39
43
  .derive(({ flags }): { transport: Transport } => {
@@ -41,13 +45,9 @@ const launcher = command('lsp-server')
41
45
  if (flags.stdio) selected.push({ kind: 'stdio' });
42
46
  // Kebab-case flag names stay kebab in the handler: bracket access, no camelCasing.
43
47
  if (flags['node-ipc']) selected.push({ kind: 'node-ipc' });
48
+ // Port shape (integer, 1-65535) is already enforced declaratively by
49
+ // the flag's numeric constraints before `.derive()` runs.
44
50
  if (flags.socket !== undefined) {
45
- if (!Number.isInteger(flags.socket)) {
46
- throw new CLIError(`--socket expects an integer port (got ${flags.socket}).`, {
47
- code: 'INVALID_SOCKET_PORT',
48
- suggest: 'Pass a whole number, e.g. --socket 6009',
49
- });
50
- }
51
51
  selected.push({ kind: 'socket', port: flags.socket });
52
52
  }
53
53
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kjanat/dreamcli",
3
- "version": "3.0.0-rc.9",
3
+ "version": "3.0.1",
4
4
  "description": "Schema-first, fully typed TypeScript CLI framework",
5
5
  "keywords": [
6
6
  "dreamcli",
@@ -59,10 +59,11 @@
59
59
  "dist",
60
60
  "dreamcli.schema.json",
61
61
  "examples",
62
+ "skills",
62
63
  "!**/.cache",
63
64
  "!**/AGENTS.md"
64
65
  ],
65
- "workspaces": ["./examples/*"],
66
+ "workspaces": ["./examples/*", "./docs"],
66
67
  "scripts": {
67
68
  "bd": "run build",
68
69
  "build": "bun --bun tsdown",
@@ -70,13 +71,14 @@
70
71
  "ci": "run -pk typecheck lint format:check meta-descriptions:check test docs:build bd",
71
72
  "coverage": "vitest run --coverage",
72
73
  "dev": "run -p build:watch docs:dev",
73
- "docs:build": "bun --bun vitepress build docs",
74
- "docs:deploy": "wrangler deploy",
75
- "docs:dev": "bun --bun vitepress dev docs --host --port ${PORT:-5173}",
76
- "docs:preview": "bun --bun vitepress preview docs",
77
- "docs:upload": "wrangler versions upload",
78
- "fmt": "dprint fmt",
74
+ "docs:build": "run --dir docs build",
75
+ "docs:deploy": "run --dir docs deploy",
76
+ "docs:dev": "run --dir docs dev",
77
+ "docs:preview": "run --dir docs preview",
78
+ "docs:upload": "run --dir docs upload",
79
+ "fmt": "run -s lint:fix fmt:dprint",
79
80
  "fmt:autofix": "dprint fmt --allow-no-files --excludes .github",
81
+ "fmt:dprint": "dprint fmt",
80
82
  "fmt:update": "dprint config update --yes --recursive",
81
83
  "format": "dprint fmt",
82
84
  "format:check": "dprint check",
@@ -87,12 +89,13 @@
87
89
  "gh-project:start": "bun gh-project start",
88
90
  "gh-project:sync": "bun gh-project sync",
89
91
  "knip": "knip",
90
- "lint": "biome lint",
92
+ "lint": "biome check",
91
93
  "lint:autofix": "biome check --skip-parse-errors --no-errors-on-unmatched --changed --write",
92
- "lint:fix": "biome lint --fix",
94
+ "lint:fix": "biome check --fix",
93
95
  "meta-descriptions": "bun --bun scripts/build-meta-descriptions.ts",
94
96
  "meta-descriptions:check": "bun --bun scripts/build-meta-descriptions.ts --check",
95
97
  "prepack": "bun --bun tsdown --logLevel silent",
98
+ "prepare": "importmapify",
96
99
  "publish:preview": "bunx pkg-pr-new publish --bun --comment=update --packageManager=bun,npm",
97
100
  "schema:emit": "bun scripts/emit-definition-schema.ts",
98
101
  "test": "vitest run",
@@ -100,41 +103,31 @@
100
103
  "test:gh": "run --dir examples/gh test",
101
104
  "test:node": "npx -y vitest run",
102
105
  "test:watch": "vitest",
103
- "typecheck": "bun node_modules/@typescript/native/bin/tsc --noEmit",
106
+ "typecheck": "bunx @typescript/native --noEmit",
104
107
  "typecheck:gh": "run --dir examples/gh typecheck",
105
- "upgrade": "bun update --latest && bun add -D vitepress@next",
108
+ "upgrade": "bun update --latest && bun --cwd docs add -D vitepress@next",
106
109
  "version:check": "bun scripts/check-version-sync.ts"
107
110
  },
108
- "overrides": {
109
- "vitepress": "next"
110
- },
111
111
  "dependencies": {
112
- "ansispeck": "^0.1.2"
112
+ "ansispeck": "^0.4.1"
113
113
  },
114
114
  "devDependencies": {
115
115
  "@arethetypeswrong/core": "^0.18.5",
116
- "@biomejs/biome": "^2.5.2",
117
116
  "@iarna/toml": "^2.2.5",
118
- "@shikijs/transformers": "^4.3.1",
119
- "@shikijs/vitepress-twoslash": "^4.3.1",
120
117
  "@types/bun": "^1.3.14",
121
118
  "@types/deno": "^2.7.0",
122
119
  "@types/node": ">=26.1.1",
123
- "@typescript/native": "npm:typescript@^7.0.2",
120
+ "@typescript/native": "npm:typescript@^7",
124
121
  "@vitest/coverage-v8": "^4.1.10",
122
+ "biome": "npm:@biomejs/biome@^2.5.4",
125
123
  "dprint": "^0.55.1",
126
- "floating-vue": "^5.2.2",
124
+ "importmapify": "1.6.0",
127
125
  "knip": "^6.25.0",
128
- "mermaid": "^11.16.0",
129
126
  "publint": "^0.3.21",
130
- "runner-run": "0.19.1",
131
- "tsdown": "^0.22.4",
132
- "typedoc": "^0.28.20",
133
- "typescript": "^6.0.2",
134
- "vite": "^8.1.4",
135
- "vitepress": "^2.0.0-alpha.18",
127
+ "runner-run": "0.20.0",
128
+ "tsdown": "^0.22.12",
129
+ "typescript": ">=6,<7",
136
130
  "vitest": "^4.1.10",
137
- "wrangler": "^4.110.0",
138
131
  "yaml": "^2.9.0"
139
132
  },
140
133
  "packageManager": "bun@1.3.14",
@@ -154,7 +147,7 @@
154
147
  }
155
148
  },
156
149
  "volta": {
157
- "node": "26.4.0",
150
+ "node": "26.5.0",
158
151
  "npm": "11.18.0"
159
152
  },
160
153
  "publishConfig": {
@@ -163,6 +156,8 @@
163
156
  "catalog": {
164
157
  "@types/bun": "^1.3.14",
165
158
  "@types/node": ">=26.1.1",
166
- "typescript": "^6.0.2"
159
+ "@typescript/native": "npm:typescript@^7",
160
+ "typescript": ">=6,<7",
161
+ "vitest": "^4.1.10"
167
162
  }
168
163
  }
@@ -0,0 +1,140 @@
1
+ ---
2
+ name: cli-creation
3
+ description: Build consumer-facing DreamCLI CLIs from scratch with Bun-first workflows and typed patterns. Use when asked to scaffold or implement a new @kjanat/dreamcli command-line app, add commands/flags/args/prompts/output/testing, or create starter files/tests for DreamCLI users.
4
+ ---
5
+
6
+ # CLI Creation
7
+
8
+ ## Overview
9
+
10
+ Create runnable DreamCLI starter CLIs and extend them with typed command
11
+ patterns. This skill covers user-facing app code built **on** DreamCLI, not
12
+ DreamCLI framework internals.
13
+
14
+ Targets DreamCLI 3.x. Version 3 removed the DSL, made the default command the
15
+ root surface, and added a large typed-flag surface; snippets below assume it.
16
+
17
+ ## Quick Start
18
+
19
+ 1. Choose a starter mode:
20
+ - `single`: one root command (`cli(name).default(command)`).
21
+ - `multi`: grouped command surface (`group('...').command(...)`).
22
+ 2. Generate starter files:
23
+ - `python scripts/scaffold_cli.py --name mycli --mode single --out .`
24
+ - Tests are generated by default; add `--no-test` only when explicitly requested.
25
+ - Test template is auto-detected: Bun without Vitest uses `bun:test`; otherwise Vitest.
26
+ 3. Run and validate generated files:
27
+ - Use the printed path from the scaffolder output, for example `bun ./mycli.ts --help`.
28
+ - Run the generated test unless `--no-test` was used.
29
+ 4. Extend behavior with references:
30
+ - `references/pattern-cookbook.md` — copy-ready, type-checked snippets.
31
+ - `references/consumer-workflow.md` — request to validated CLI.
32
+ - `references/runtime-notes.md` — Bun/Node/Deno execution.
33
+
34
+ ## Looking Things Up
35
+
36
+ Prefer these over recalling API shapes from memory; they reflect the installed
37
+ or published version rather than training data.
38
+
39
+ **The API, offline-ish, no repo needed.** If `deno` is on the system this works
40
+ regardless of whether the project installed from npm or JSR:
41
+
42
+ ```bash
43
+ deno doc jsr:@kjanat/dreamcli 2>/dev/null # full public API (~4k lines)
44
+ deno doc jsr:@kjanat/dreamcli/testkit 2>/dev/null # subpath: testkit, runtime, schema, version
45
+ deno doc --json jsr:@kjanat/dreamcli 2>/dev/null # machine-readable, for scripted lookups
46
+ deno doc --filter=CLIBuilder jsr:@kjanat/dreamcli 2>/dev/null # one symbol
47
+ ```
48
+
49
+ `2>/dev/null` matters: deno writes download and type-check progress to stderr,
50
+ which otherwise swamps the documentation output.
51
+
52
+ Pin a version with `jsr:@kjanat/dreamcli@3.0.0` when the project is not on
53
+ latest. `--filter` takes a declaration name; it prints nothing for a name that
54
+ does not exist, which is itself a useful signal.
55
+
56
+ **The docs site, as markdown.** Every page is authored markdown served under
57
+ `/raw/`, and any page URL returns markdown under content negotiation:
58
+
59
+ ```bash
60
+ curl -s https://dreamcli.kjanat.dev/llms.txt # index of every page, one line each
61
+ curl -s https://dreamcli.kjanat.dev/llms-full.txt # every page concatenated (~250 kB)
62
+ curl -s https://dreamcli.kjanat.dev/raw/guide/flags # one page, authored markdown
63
+ curl -sH 'Accept: text/markdown' https://dreamcli.kjanat.dev/guide/flags
64
+ ```
65
+
66
+ Start from `llms.txt` to find the right page, then fetch that page rather than
67
+ pulling `llms-full.txt` into context.
68
+
69
+ ## Grounding Sources
70
+
71
+ Paths are relative to the dreamcli repository root.
72
+
73
+ - `examples/basic.ts` — single-command defaults.
74
+ - `examples/multi-command.ts` — grouped-command defaults.
75
+ - `examples/testing.ts` — `runCommand()` patterns.
76
+ - `examples/flag-types.ts` — the v3 typed-flag family.
77
+ - `examples/parser-control.ts` — negation, duplicates, spelling parity.
78
+ - `examples/output-extras.ts` — colors, hyperlinks, `setExitCode`.
79
+ - `examples/standard-schema.ts` — Standard Schema validation.
80
+ - `examples/help-config.ts` — help themes, flag order, routable default.
81
+ - `examples/gh/` — a full multi-command app used as a walkthrough.
82
+ - `docs/guide/getting-started.md` — baseline consumer narrative.
83
+ - `docs/guide/walkthrough.md` — end-to-end CLI composition.
84
+ - `docs/guide/upgrading-v3.md` — what changed from 2.x, for migrations.
85
+
86
+ ## Workflow Decision Tree
87
+
88
+ - Simple one-command utility → `--mode single`.
89
+ - Nested command groups (git/gh style) → `--mode multi`.
90
+ - Tests wanted from the start → do nothing, they are scaffolded by default.
91
+ - Tests explicitly unwanted → add `--no-test`.
92
+ - npm/tsx or Deno instructions → keep generated code unchanged and give the
93
+ runtime alternatives from `references/runtime-notes.md`.
94
+ - Migrating an existing 2.x CLI → read `docs/guide/upgrading-v3.md` first; the
95
+ default-command and `finite` changes silently alter behavior.
96
+
97
+ ## Extend the Starter
98
+
99
+ **Values.** Add typed args with `arg.string()`, `arg.number()`, `arg.enum(...)`,
100
+ `arg.custom(...)`; `.variadic()` for repeated positionals. Prefer a purpose-built
101
+ flag kind over `flag.string()` plus parsing: `flag.url()`, `flag.path()`,
102
+ `flag.date()`, `flag.duration()`, `flag.bytes()`, `flag.count()`,
103
+ `flag.keyValue()`. Express validation declaratively with constraints
104
+ (`{ int, min, max }`, `{ nonEmpty, pattern }`) or a Standard Schema passed to
105
+ `flag.custom()`, not with hand-written checks in the action.
106
+
107
+ **Sources.** Declare `.env()`, `.config()`, `.prompt()`, `.default()` on the flag
108
+ and let resolution order (argv, env, config, prompt, default) do the work.
109
+
110
+ **Cross-flag rules.** Put them in `.derive()`, which runs after resolution and
111
+ before the action, and return derived state to widen `ctx`.
112
+
113
+ **Output.** `out.log()` for results, `out.status()` for progress notes (stderr,
114
+ suppressed by `--quiet`), `out.table()` for lists, `out.json()` behind
115
+ `out.jsonMode`, `out.color`/`osc8()` for styling, `out.setExitCode()` when a
116
+ command must report normally but exit non-zero.
117
+
118
+ **Testing.** `runCommand()` from `@kjanat/dreamcli/testkit`, with `answers` for
119
+ prompts and `stat`/`mkdir` when `flag.path()` checks must run. Assert output
120
+ including trailing newlines.
121
+
122
+ ## Resource Map
123
+
124
+ - `scripts/scaffold_cli.py` — generate Bun-first starter files and tests.
125
+ - `assets/templates/*.tpl` — source templates used by the scaffolder.
126
+ - `references/pattern-cookbook.md` — snippets by topic; all type-checked.
127
+ - `references/consumer-workflow.md` — end-to-end flow from request to validation.
128
+ - `references/runtime-notes.md` — runtime and package-manager execution guidance.
129
+
130
+ ## Guardrails
131
+
132
+ - Do not modify DreamCLI core internals for consumer-app requests.
133
+ - Keep generated imports on `@kjanat/dreamcli` and `@kjanat/dreamcli/testkit`;
134
+ never reach into `#internals/*` or `dist/`.
135
+ - Preserve the typed resolution flow: argv, env, config, prompt, default.
136
+ - Keep stdout machine-clean: progress and status go to stderr via `out.status()`,
137
+ never interleaved with `out.json()`.
138
+ - `.default(cmd)` is the root surface and is not routable by name; add
139
+ `{ route: true }` when a user expects `mycli <name>` to work too.
140
+ - Prefer Bun commands first; include npm/tsx and Deno alternatives when asked.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "CLI Creation"
3
+ short_description: "Build typed DreamCLI consumer CLIs quickly"
4
+ default_prompt: "Use $cli-creation to scaffold a Bun-first DreamCLI CLI with tests."
@@ -0,0 +1,20 @@
1
+ import { partyStart } from '__ENTRY_FILE__';
2
+ import { runCommand } from '@kjanat/dreamcli/testkit';
3
+ import { describe, expect, it } from 'bun:test';
4
+
5
+ describe('party start command', () => {
6
+ it('applies sparkle middleware when --sparkle is set', async () => {
7
+ const result = await runCommand(partyStart, ['--theme', 'midnight', '--sparkle']);
8
+
9
+ expect(result.exitCode).toBe(0);
10
+ expect(result.stdout).toEqual(['✨ Party started with midnight theme! ✨\n']);
11
+ expect(result.stderr).toEqual([]);
12
+ });
13
+
14
+ it('renders help text', async () => {
15
+ const result = await runCommand(partyStart, ['--help']);
16
+
17
+ expect(result.exitCode).toBe(0);
18
+ expect(result.stdout.join('')).toContain('Start the pony party');
19
+ });
20
+ });