@kindgi/cli 0.0.0-bootstrap.0 → 0.1.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 (496) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +690 -1
  3. package/dist/build/apt.d.ts +16 -0
  4. package/dist/build/apt.d.ts.map +1 -0
  5. package/dist/build/apt.js +50 -0
  6. package/dist/build/apt.js.map +1 -0
  7. package/dist/build/bundle.d.ts +45 -0
  8. package/dist/build/bundle.d.ts.map +1 -0
  9. package/dist/build/bundle.js +121 -0
  10. package/dist/build/bundle.js.map +1 -0
  11. package/dist/build/containerfile.d.ts +27 -0
  12. package/dist/build/containerfile.d.ts.map +1 -0
  13. package/dist/build/containerfile.js +196 -0
  14. package/dist/build/containerfile.js.map +1 -0
  15. package/dist/build/context-files.d.ts +24 -0
  16. package/dist/build/context-files.d.ts.map +1 -0
  17. package/dist/build/context-files.js +99 -0
  18. package/dist/build/context-files.js.map +1 -0
  19. package/dist/build/defaults.d.ts +66 -0
  20. package/dist/build/defaults.d.ts.map +1 -0
  21. package/dist/build/defaults.js +586 -0
  22. package/dist/build/defaults.js.map +1 -0
  23. package/dist/build/envelope.d.ts +72 -0
  24. package/dist/build/envelope.d.ts.map +1 -0
  25. package/dist/build/envelope.js +76 -0
  26. package/dist/build/envelope.js.map +1 -0
  27. package/dist/build/host-install.d.ts +48 -0
  28. package/dist/build/host-install.d.ts.map +1 -0
  29. package/dist/build/host-install.js +375 -0
  30. package/dist/build/host-install.js.map +1 -0
  31. package/dist/build/image-config.d.ts +32 -0
  32. package/dist/build/image-config.d.ts.map +1 -0
  33. package/dist/build/image-config.js +129 -0
  34. package/dist/build/image-config.js.map +1 -0
  35. package/dist/build/integrity.d.ts +51 -0
  36. package/dist/build/integrity.d.ts.map +1 -0
  37. package/dist/build/integrity.js +75 -0
  38. package/dist/build/integrity.js.map +1 -0
  39. package/dist/build/node-image.d.ts +18 -0
  40. package/dist/build/node-image.d.ts.map +1 -0
  41. package/dist/build/node-image.js +46 -0
  42. package/dist/build/node-image.js.map +1 -0
  43. package/dist/build/pack-root.d.ts +69 -0
  44. package/dist/build/pack-root.d.ts.map +1 -0
  45. package/dist/build/pack-root.js +102 -0
  46. package/dist/build/pack-root.js.map +1 -0
  47. package/dist/build/poetry-requirements.d.ts +5 -0
  48. package/dist/build/poetry-requirements.d.ts.map +1 -0
  49. package/dist/build/poetry-requirements.js +8 -0
  50. package/dist/build/poetry-requirements.js.map +1 -0
  51. package/dist/build/python-image.d.ts +40 -0
  52. package/dist/build/python-image.d.ts.map +1 -0
  53. package/dist/build/python-image.js +197 -0
  54. package/dist/build/python-image.js.map +1 -0
  55. package/dist/build/runners.d.ts +259 -0
  56. package/dist/build/runners.d.ts.map +1 -0
  57. package/dist/build/runners.js +4 -0
  58. package/dist/build/runners.js.map +1 -0
  59. package/dist/build/version-specifier.d.ts +2 -0
  60. package/dist/build/version-specifier.d.ts.map +1 -0
  61. package/dist/build/version-specifier.js +70 -0
  62. package/dist/build/version-specifier.js.map +1 -0
  63. package/dist/cli-package.d.ts +15 -0
  64. package/dist/cli-package.d.ts.map +1 -0
  65. package/dist/cli-package.js +37 -0
  66. package/dist/cli-package.js.map +1 -0
  67. package/dist/cli.d.ts +3 -0
  68. package/dist/cli.d.ts.map +1 -0
  69. package/dist/cli.js +26 -0
  70. package/dist/cli.js.map +1 -0
  71. package/dist/commands/adapters.d.ts +3 -0
  72. package/dist/commands/adapters.d.ts.map +1 -0
  73. package/dist/commands/adapters.js +148 -0
  74. package/dist/commands/adapters.js.map +1 -0
  75. package/dist/commands/agents.d.ts +3 -0
  76. package/dist/commands/agents.d.ts.map +1 -0
  77. package/dist/commands/agents.js +82 -0
  78. package/dist/commands/agents.js.map +1 -0
  79. package/dist/commands/approvals.d.ts +3 -0
  80. package/dist/commands/approvals.d.ts.map +1 -0
  81. package/dist/commands/approvals.js +92 -0
  82. package/dist/commands/approvals.js.map +1 -0
  83. package/dist/commands/artifacts.d.ts +3 -0
  84. package/dist/commands/artifacts.d.ts.map +1 -0
  85. package/dist/commands/artifacts.js +87 -0
  86. package/dist/commands/artifacts.js.map +1 -0
  87. package/dist/commands/auth.d.ts +3 -0
  88. package/dist/commands/auth.d.ts.map +1 -0
  89. package/dist/commands/auth.js +88 -0
  90. package/dist/commands/auth.js.map +1 -0
  91. package/dist/commands/build.d.ts +39 -0
  92. package/dist/commands/build.d.ts.map +1 -0
  93. package/dist/commands/build.js +872 -0
  94. package/dist/commands/build.js.map +1 -0
  95. package/dist/commands/capabilities.d.ts +3 -0
  96. package/dist/commands/capabilities.d.ts.map +1 -0
  97. package/dist/commands/capabilities.js +38 -0
  98. package/dist/commands/capabilities.js.map +1 -0
  99. package/dist/commands/conversations.d.ts +3 -0
  100. package/dist/commands/conversations.d.ts.map +1 -0
  101. package/dist/commands/conversations.js +75 -0
  102. package/dist/commands/conversations.js.map +1 -0
  103. package/dist/commands/deploy.d.ts +7 -0
  104. package/dist/commands/deploy.d.ts.map +1 -0
  105. package/dist/commands/deploy.js +697 -0
  106. package/dist/commands/deploy.js.map +1 -0
  107. package/dist/commands/dev.d.ts +44 -0
  108. package/dist/commands/dev.d.ts.map +1 -0
  109. package/dist/commands/dev.js +1032 -0
  110. package/dist/commands/dev.js.map +1 -0
  111. package/dist/commands/env.d.ts +27 -0
  112. package/dist/commands/env.d.ts.map +1 -0
  113. package/dist/commands/env.js +816 -0
  114. package/dist/commands/env.js.map +1 -0
  115. package/dist/commands/feedback.d.ts +33 -0
  116. package/dist/commands/feedback.d.ts.map +1 -0
  117. package/dist/commands/feedback.js +374 -0
  118. package/dist/commands/feedback.js.map +1 -0
  119. package/dist/commands/flows.d.ts +3 -0
  120. package/dist/commands/flows.d.ts.map +1 -0
  121. package/dist/commands/flows.js +60 -0
  122. package/dist/commands/flows.js.map +1 -0
  123. package/dist/commands/guardrails.d.ts +3 -0
  124. package/dist/commands/guardrails.d.ts.map +1 -0
  125. package/dist/commands/guardrails.js +89 -0
  126. package/dist/commands/guardrails.js.map +1 -0
  127. package/dist/commands/health.d.ts +8 -0
  128. package/dist/commands/health.d.ts.map +1 -0
  129. package/dist/commands/health.js +40 -0
  130. package/dist/commands/health.js.map +1 -0
  131. package/dist/commands/helpers.d.ts +37 -0
  132. package/dist/commands/helpers.d.ts.map +1 -0
  133. package/dist/commands/helpers.js +93 -0
  134. package/dist/commands/helpers.js.map +1 -0
  135. package/dist/commands/index.d.ts +7 -0
  136. package/dist/commands/index.d.ts.map +1 -0
  137. package/dist/commands/index.js +90 -0
  138. package/dist/commands/index.js.map +1 -0
  139. package/dist/commands/init.d.ts +46 -0
  140. package/dist/commands/init.d.ts.map +1 -0
  141. package/dist/commands/init.js +455 -0
  142. package/dist/commands/init.js.map +1 -0
  143. package/dist/commands/key.d.ts +3 -0
  144. package/dist/commands/key.d.ts.map +1 -0
  145. package/dist/commands/key.js +322 -0
  146. package/dist/commands/key.js.map +1 -0
  147. package/dist/commands/mcp.d.ts +43 -0
  148. package/dist/commands/mcp.d.ts.map +1 -0
  149. package/dist/commands/mcp.js +433 -0
  150. package/dist/commands/mcp.js.map +1 -0
  151. package/dist/commands/memory.d.ts +3 -0
  152. package/dist/commands/memory.d.ts.map +1 -0
  153. package/dist/commands/memory.js +82 -0
  154. package/dist/commands/memory.js.map +1 -0
  155. package/dist/commands/observations.d.ts +3 -0
  156. package/dist/commands/observations.d.ts.map +1 -0
  157. package/dist/commands/observations.js +27 -0
  158. package/dist/commands/observations.js.map +1 -0
  159. package/dist/commands/proposals.d.ts +3 -0
  160. package/dist/commands/proposals.d.ts.map +1 -0
  161. package/dist/commands/proposals.js +116 -0
  162. package/dist/commands/proposals.js.map +1 -0
  163. package/dist/commands/provenance.d.ts +3 -0
  164. package/dist/commands/provenance.d.ts.map +1 -0
  165. package/dist/commands/provenance.js +53 -0
  166. package/dist/commands/provenance.js.map +1 -0
  167. package/dist/commands/providers.d.ts +3 -0
  168. package/dist/commands/providers.d.ts.map +1 -0
  169. package/dist/commands/providers.js +202 -0
  170. package/dist/commands/providers.js.map +1 -0
  171. package/dist/commands/reviewers.d.ts +3 -0
  172. package/dist/commands/reviewers.d.ts.map +1 -0
  173. package/dist/commands/reviewers.js +78 -0
  174. package/dist/commands/reviewers.js.map +1 -0
  175. package/dist/commands/runs.d.ts +3 -0
  176. package/dist/commands/runs.d.ts.map +1 -0
  177. package/dist/commands/runs.js +221 -0
  178. package/dist/commands/runs.js.map +1 -0
  179. package/dist/commands/secrets.d.ts +21 -0
  180. package/dist/commands/secrets.d.ts.map +1 -0
  181. package/dist/commands/secrets.js +750 -0
  182. package/dist/commands/secrets.js.map +1 -0
  183. package/dist/commands/skills.d.ts +64 -0
  184. package/dist/commands/skills.d.ts.map +1 -0
  185. package/dist/commands/skills.js +430 -0
  186. package/dist/commands/skills.js.map +1 -0
  187. package/dist/commands/test.d.ts +5 -0
  188. package/dist/commands/test.d.ts.map +1 -0
  189. package/dist/commands/test.js +181 -0
  190. package/dist/commands/test.js.map +1 -0
  191. package/dist/commands/tokens.d.ts +3 -0
  192. package/dist/commands/tokens.d.ts.map +1 -0
  193. package/dist/commands/tokens.js +33 -0
  194. package/dist/commands/tokens.js.map +1 -0
  195. package/dist/commands/tools.d.ts +3 -0
  196. package/dist/commands/tools.d.ts.map +1 -0
  197. package/dist/commands/tools.js +153 -0
  198. package/dist/commands/tools.js.map +1 -0
  199. package/dist/commands/types.d.ts +54 -0
  200. package/dist/commands/types.d.ts.map +1 -0
  201. package/dist/commands/types.js +4 -0
  202. package/dist/commands/types.js.map +1 -0
  203. package/dist/commands/unwired.d.ts +17 -0
  204. package/dist/commands/unwired.d.ts.map +1 -0
  205. package/dist/commands/unwired.js +41 -0
  206. package/dist/commands/unwired.js.map +1 -0
  207. package/dist/commands/version.d.ts +8 -0
  208. package/dist/commands/version.d.ts.map +1 -0
  209. package/dist/commands/version.js +41 -0
  210. package/dist/commands/version.js.map +1 -0
  211. package/dist/config.d.ts +42 -0
  212. package/dist/config.d.ts.map +1 -0
  213. package/dist/config.js +83 -0
  214. package/dist/config.js.map +1 -0
  215. package/dist/context.d.ts +153 -0
  216. package/dist/context.d.ts.map +1 -0
  217. package/dist/context.js +44 -0
  218. package/dist/context.js.map +1 -0
  219. package/dist/deploy/defaults.d.ts +14 -0
  220. package/dist/deploy/defaults.d.ts.map +1 -0
  221. package/dist/deploy/defaults.js +37 -0
  222. package/dist/deploy/defaults.js.map +1 -0
  223. package/dist/deploy/envelope-loader.d.ts +24 -0
  224. package/dist/deploy/envelope-loader.d.ts.map +1 -0
  225. package/dist/deploy/envelope-loader.js +141 -0
  226. package/dist/deploy/envelope-loader.js.map +1 -0
  227. package/dist/deploy/post.d.ts +48 -0
  228. package/dist/deploy/post.d.ts.map +1 -0
  229. package/dist/deploy/post.js +210 -0
  230. package/dist/deploy/post.js.map +1 -0
  231. package/dist/deploy/response.d.ts +42 -0
  232. package/dist/deploy/response.d.ts.map +1 -0
  233. package/dist/deploy/response.js +128 -0
  234. package/dist/deploy/response.js.map +1 -0
  235. package/dist/deploy/runners.d.ts +218 -0
  236. package/dist/deploy/runners.d.ts.map +1 -0
  237. package/dist/deploy/runners.js +4 -0
  238. package/dist/deploy/runners.js.map +1 -0
  239. package/dist/dev/bundler.d.ts +8 -0
  240. package/dist/dev/bundler.d.ts.map +1 -0
  241. package/dist/dev/bundler.js +154 -0
  242. package/dist/dev/bundler.js.map +1 -0
  243. package/dist/dev/defaults.d.ts +138 -0
  244. package/dist/dev/defaults.d.ts.map +1 -0
  245. package/dist/dev/defaults.js +691 -0
  246. package/dist/dev/defaults.js.map +1 -0
  247. package/dist/dev/docker-compose.dev.yml +56 -0
  248. package/dist/dev/index-child.d.ts +2 -0
  249. package/dist/dev/index-child.d.ts.map +1 -0
  250. package/dist/dev/index-child.js +53 -0
  251. package/dist/dev/index-child.js.map +1 -0
  252. package/dist/dev/pack-code.d.ts +36 -0
  253. package/dist/dev/pack-code.d.ts.map +1 -0
  254. package/dist/dev/pack-code.js +129 -0
  255. package/dist/dev/pack-code.js.map +1 -0
  256. package/dist/dev/pack-env.d.ts +13 -0
  257. package/dist/dev/pack-env.d.ts.map +1 -0
  258. package/dist/dev/pack-env.js +36 -0
  259. package/dist/dev/pack-env.js.map +1 -0
  260. package/dist/dev/pack-service.d.ts +32 -0
  261. package/dist/dev/pack-service.d.ts.map +1 -0
  262. package/dist/dev/pack-service.js +188 -0
  263. package/dist/dev/pack-service.js.map +1 -0
  264. package/dist/dev/paths.d.ts +22 -0
  265. package/dist/dev/paths.d.ts.map +1 -0
  266. package/dist/dev/paths.js +35 -0
  267. package/dist/dev/paths.js.map +1 -0
  268. package/dist/dev/python-builder.d.ts +16 -0
  269. package/dist/dev/python-builder.d.ts.map +1 -0
  270. package/dist/dev/python-builder.js +122 -0
  271. package/dist/dev/python-builder.js.map +1 -0
  272. package/dist/dev/register.d.ts +71 -0
  273. package/dist/dev/register.d.ts.map +1 -0
  274. package/dist/dev/register.js +54 -0
  275. package/dist/dev/register.js.map +1 -0
  276. package/dist/dev/runners.d.ts +287 -0
  277. package/dist/dev/runners.d.ts.map +1 -0
  278. package/dist/dev/runners.js +4 -0
  279. package/dist/dev/runners.js.map +1 -0
  280. package/dist/dev/runtime-container.d.ts +62 -0
  281. package/dist/dev/runtime-container.d.ts.map +1 -0
  282. package/dist/dev/runtime-container.js +164 -0
  283. package/dist/dev/runtime-container.js.map +1 -0
  284. package/dist/dev/runtime-env.d.ts +62 -0
  285. package/dist/dev/runtime-env.d.ts.map +1 -0
  286. package/dist/dev/runtime-env.js +100 -0
  287. package/dist/dev/runtime-env.js.map +1 -0
  288. package/dist/dev/runtime-image.d.ts +13 -0
  289. package/dist/dev/runtime-image.d.ts.map +1 -0
  290. package/dist/dev/runtime-image.js +15 -0
  291. package/dist/dev/runtime-image.js.map +1 -0
  292. package/dist/env/defaults.d.ts +3 -0
  293. package/dist/env/defaults.d.ts.map +1 -0
  294. package/dist/env/defaults.js +22 -0
  295. package/dist/env/defaults.js.map +1 -0
  296. package/dist/env/pack-env-plan.d.ts +70 -0
  297. package/dist/env/pack-env-plan.d.ts.map +1 -0
  298. package/dist/env/pack-env-plan.js +236 -0
  299. package/dist/env/pack-env-plan.js.map +1 -0
  300. package/dist/env/parser.d.ts +9 -0
  301. package/dist/env/parser.d.ts.map +1 -0
  302. package/dist/env/parser.js +11 -0
  303. package/dist/env/parser.js.map +1 -0
  304. package/dist/env/project-env.d.ts +34 -0
  305. package/dist/env/project-env.d.ts.map +1 -0
  306. package/dist/env/project-env.js +45 -0
  307. package/dist/env/project-env.js.map +1 -0
  308. package/dist/env/runners.d.ts +22 -0
  309. package/dist/env/runners.d.ts.map +1 -0
  310. package/dist/env/runners.js +4 -0
  311. package/dist/env/runners.js.map +1 -0
  312. package/dist/env/writer.d.ts +7 -0
  313. package/dist/env/writer.d.ts.map +1 -0
  314. package/dist/env/writer.js +9 -0
  315. package/dist/env/writer.js.map +1 -0
  316. package/dist/errors.d.ts +31 -0
  317. package/dist/errors.d.ts.map +1 -0
  318. package/dist/errors.js +107 -0
  319. package/dist/errors.js.map +1 -0
  320. package/dist/help.d.ts +5 -0
  321. package/dist/help.d.ts.map +1 -0
  322. package/dist/help.js +61 -0
  323. package/dist/help.js.map +1 -0
  324. package/dist/index.d.ts +13 -0
  325. package/dist/index.d.ts.map +1 -0
  326. package/dist/index.js +13 -0
  327. package/dist/index.js.map +1 -0
  328. package/dist/init/augment-scaffolder.d.ts +74 -0
  329. package/dist/init/augment-scaffolder.d.ts.map +1 -0
  330. package/dist/init/augment-scaffolder.js +459 -0
  331. package/dist/init/augment-scaffolder.js.map +1 -0
  332. package/dist/init/dependency-specs.d.ts +58 -0
  333. package/dist/init/dependency-specs.d.ts.map +1 -0
  334. package/dist/init/dependency-specs.js +153 -0
  335. package/dist/init/dependency-specs.js.map +1 -0
  336. package/dist/init/gitignore-patcher.d.ts +23 -0
  337. package/dist/init/gitignore-patcher.d.ts.map +1 -0
  338. package/dist/init/gitignore-patcher.js +103 -0
  339. package/dist/init/gitignore-patcher.js.map +1 -0
  340. package/dist/init/mode-detect.d.ts +34 -0
  341. package/dist/init/mode-detect.d.ts.map +1 -0
  342. package/dist/init/mode-detect.js +115 -0
  343. package/dist/init/mode-detect.js.map +1 -0
  344. package/dist/init/package-json-patcher.d.ts +36 -0
  345. package/dist/init/package-json-patcher.d.ts.map +1 -0
  346. package/dist/init/package-json-patcher.js +128 -0
  347. package/dist/init/package-json-patcher.js.map +1 -0
  348. package/dist/init/pyproject-patcher.d.ts +56 -0
  349. package/dist/init/pyproject-patcher.d.ts.map +1 -0
  350. package/dist/init/pyproject-patcher.js +324 -0
  351. package/dist/init/pyproject-patcher.js.map +1 -0
  352. package/dist/init/python-augment.d.ts +22 -0
  353. package/dist/init/python-augment.d.ts.map +1 -0
  354. package/dist/init/python-augment.js +300 -0
  355. package/dist/init/python-augment.js.map +1 -0
  356. package/dist/init/template-files.d.ts +16 -0
  357. package/dist/init/template-files.d.ts.map +1 -0
  358. package/dist/init/template-files.js +38 -0
  359. package/dist/init/template-files.js.map +1 -0
  360. package/dist/key/defaults.d.ts +3 -0
  361. package/dist/key/defaults.d.ts.map +1 -0
  362. package/dist/key/defaults.js +60 -0
  363. package/dist/key/defaults.js.map +1 -0
  364. package/dist/key/fingerprint.d.ts +6 -0
  365. package/dist/key/fingerprint.d.ts.map +1 -0
  366. package/dist/key/fingerprint.js +25 -0
  367. package/dist/key/fingerprint.js.map +1 -0
  368. package/dist/key/paths.d.ts +30 -0
  369. package/dist/key/paths.d.ts.map +1 -0
  370. package/dist/key/paths.js +51 -0
  371. package/dist/key/paths.js.map +1 -0
  372. package/dist/key/runners.d.ts +60 -0
  373. package/dist/key/runners.d.ts.map +1 -0
  374. package/dist/key/runners.js +4 -0
  375. package/dist/key/runners.js.map +1 -0
  376. package/dist/main.d.ts +106 -0
  377. package/dist/main.d.ts.map +1 -0
  378. package/dist/main.js +198 -0
  379. package/dist/main.js.map +1 -0
  380. package/dist/mcp/launcher.d.ts +143 -0
  381. package/dist/mcp/launcher.d.ts.map +1 -0
  382. package/dist/mcp/launcher.js +393 -0
  383. package/dist/mcp/launcher.js.map +1 -0
  384. package/dist/mcp/preset-loader.d.ts +29 -0
  385. package/dist/mcp/preset-loader.d.ts.map +1 -0
  386. package/dist/mcp/preset-loader.js +217 -0
  387. package/dist/mcp/preset-loader.js.map +1 -0
  388. package/dist/mcp/preset-types.d.ts +71 -0
  389. package/dist/mcp/preset-types.d.ts.map +1 -0
  390. package/dist/mcp/preset-types.js +4 -0
  391. package/dist/mcp/preset-types.js.map +1 -0
  392. package/dist/mcp/presets/README.md +68 -0
  393. package/dist/mcp/presets/postgres.json +15 -0
  394. package/dist/output.d.ts +26 -0
  395. package/dist/output.d.ts.map +1 -0
  396. package/dist/output.js +46 -0
  397. package/dist/output.js.map +1 -0
  398. package/dist/pack-config.d.ts +37 -0
  399. package/dist/pack-config.d.ts.map +1 -0
  400. package/dist/pack-config.js +65 -0
  401. package/dist/pack-config.js.map +1 -0
  402. package/dist/package-manager.d.ts +33 -0
  403. package/dist/package-manager.d.ts.map +1 -0
  404. package/dist/package-manager.js +129 -0
  405. package/dist/package-manager.js.map +1 -0
  406. package/dist/parse.d.ts +82 -0
  407. package/dist/parse.d.ts.map +1 -0
  408. package/dist/parse.js +99 -0
  409. package/dist/parse.js.map +1 -0
  410. package/dist/providers/preset-loader.d.ts +47 -0
  411. package/dist/providers/preset-loader.d.ts.map +1 -0
  412. package/dist/providers/preset-loader.js +107 -0
  413. package/dist/providers/preset-loader.js.map +1 -0
  414. package/dist/providers/presets/anthropic.json +47 -0
  415. package/dist/providers/presets/gemini.json +40 -0
  416. package/dist/reference.d.ts +28 -0
  417. package/dist/reference.d.ts.map +1 -0
  418. package/dist/reference.js +52 -0
  419. package/dist/reference.js.map +1 -0
  420. package/dist/sdk-package.d.ts +9 -0
  421. package/dist/sdk-package.d.ts.map +1 -0
  422. package/dist/sdk-package.js +20 -0
  423. package/dist/sdk-package.js.map +1 -0
  424. package/dist/sdk-skills/kindgi-authoring-agents/SKILL.md +253 -0
  425. package/dist/sdk-skills/kindgi-authoring-flows/SKILL.md +299 -0
  426. package/dist/sdk-skills/kindgi-authoring-guardrails/SKILL.md +291 -0
  427. package/dist/sdk-skills/kindgi-authoring-mcp-servers/SKILL.md +289 -0
  428. package/dist/sdk-skills/kindgi-authoring-providers/SKILL.md +704 -0
  429. package/dist/sdk-skills/kindgi-authoring-tools/SKILL.md +288 -0
  430. package/dist/sdk-skills/kindgi-framework-feedback/SKILL.md +211 -0
  431. package/dist/sdk-skills/kindgi-getting-started/SKILL.md +181 -0
  432. package/dist/sdk-skills/kindgi-python-authoring-agents/SKILL.md +205 -0
  433. package/dist/sdk-skills/kindgi-python-authoring-flows/SKILL.md +322 -0
  434. package/dist/sdk-skills/kindgi-python-authoring-guardrails/SKILL.md +173 -0
  435. package/dist/sdk-skills/kindgi-python-authoring-tools/SKILL.md +299 -0
  436. package/dist/sdk-skills/kindgi-python-getting-started/SKILL.md +240 -0
  437. package/dist/stop-signal.d.ts +15 -0
  438. package/dist/stop-signal.d.ts.map +1 -0
  439. package/dist/stop-signal.js +16 -0
  440. package/dist/stop-signal.js.map +1 -0
  441. package/dist/templates/minimal/.gitignore +8 -0
  442. package/dist/templates/minimal/.nvmrc +1 -0
  443. package/dist/templates/minimal/AGENTS.md +23 -0
  444. package/dist/templates/minimal/README.md.tmpl +69 -0
  445. package/dist/templates/minimal/agents/.gitkeep +0 -0
  446. package/dist/templates/minimal/flows/.gitkeep +0 -0
  447. package/dist/templates/minimal/guardrails/.gitkeep +0 -0
  448. package/dist/templates/minimal/kindgi.config.ts.tmpl +44 -0
  449. package/dist/templates/minimal/package.json.tmpl +25 -0
  450. package/dist/templates/minimal/pnpm-workspace.yaml +6 -0
  451. package/dist/templates/minimal/tools/.gitkeep +0 -0
  452. package/dist/templates/minimal/tsconfig.json.tmpl +27 -0
  453. package/dist/templates/minimal/vitest.config.ts.tmpl +14 -0
  454. package/dist/templates/python/.gitignore +9 -0
  455. package/dist/templates/python/AGENTS.md +30 -0
  456. package/dist/templates/python/README.md.tmpl +56 -0
  457. package/dist/templates/python/agents/echo_agent.py.tmpl +23 -0
  458. package/dist/templates/python/flows/echo_flow.py.tmpl +17 -0
  459. package/dist/templates/python/guardrails/response_not_empty.py.tmpl +27 -0
  460. package/dist/templates/python/pyproject.toml.tmpl +42 -0
  461. package/dist/templates/python/tests/test_tools.py.tmpl +22 -0
  462. package/dist/templates/python/tools/echo.py.tmpl +27 -0
  463. package/dist/templates/python/tools/greet.py.tmpl +20 -0
  464. package/dist/templates/sample/.gitignore +8 -0
  465. package/dist/templates/sample/.nvmrc +1 -0
  466. package/dist/templates/sample/AGENTS.md +23 -0
  467. package/dist/templates/sample/README.md.tmpl +85 -0
  468. package/dist/templates/sample/agents/echo-agent/index.ts.tmpl +34 -0
  469. package/dist/templates/sample/flows/echo-flow/index.ts.tmpl +59 -0
  470. package/dist/templates/sample/guardrails/response-not-empty/index.ts.tmpl +50 -0
  471. package/dist/templates/sample/kindgi.config.ts.tmpl +41 -0
  472. package/dist/templates/sample/package.json.tmpl +25 -0
  473. package/dist/templates/sample/pnpm-workspace.yaml +6 -0
  474. package/dist/templates/sample/tools/echo/index.test.ts.tmpl +31 -0
  475. package/dist/templates/sample/tools/echo/index.ts.tmpl +37 -0
  476. package/dist/templates/sample/tools/fetch-httpbin/index.ts.tmpl +60 -0
  477. package/dist/templates/sample/tools/greet/index.ts.tmpl +35 -0
  478. package/dist/templates/sample/tsconfig.json.tmpl +27 -0
  479. package/dist/templates/sample/vitest.config.ts.tmpl +14 -0
  480. package/dist/test/defaults.d.ts +3 -0
  481. package/dist/test/defaults.d.ts.map +1 -0
  482. package/dist/test/defaults.js +104 -0
  483. package/dist/test/defaults.js.map +1 -0
  484. package/dist/test/runners.d.ts +60 -0
  485. package/dist/test/runners.d.ts.map +1 -0
  486. package/dist/test/runners.js +4 -0
  487. package/dist/test/runners.js.map +1 -0
  488. package/dist/version-info.d.ts +9 -0
  489. package/dist/version-info.d.ts.map +1 -0
  490. package/dist/version-info.js +27 -0
  491. package/dist/version-info.js.map +1 -0
  492. package/dist/write-fully.d.ts +13 -0
  493. package/dist/write-fully.d.ts.map +1 -0
  494. package/dist/write-fully.js +17 -0
  495. package/dist/write-fully.js.map +1 -0
  496. package/package.json +63 -4
package/README.md CHANGED
@@ -1,3 +1,692 @@
1
1
  # @kindgi/cli
2
2
 
3
- A placeholder. Releases come from https://github.com/kindgi/kindgi-sdk.
3
+ The `kindgi` command: create a Kindgi pack, run it on your machine while you
4
+ write it, build and deploy it, and work with a running Kindgi API (runs,
5
+ agents, tools, providers, approvals, …) from the terminal.
6
+
7
+ ## Install
8
+
9
+ The CLI is **project-local**: a project depends on `@kindgi/cli` as a
10
+ devDependency and runs the `kindgi` it pins, never a global install.
11
+ `kindgi init` adds it for you.
12
+
13
+ ```sh
14
+ npx @kindgi/cli init # in an existing app, or: init <pack-name>
15
+ pnpm install
16
+ pnpm exec kindgi dev # npm: npx --no kindgi dev
17
+ ```
18
+
19
+ Use the scoped name, `@kindgi/cli`: there is no unscoped `kindgi` package.
20
+
21
+ **Requirements:** Node 22 or later, and Docker for `kindgi dev` (Docker
22
+ Desktop, or a Docker engine on Linux). A Python pack also needs Python and
23
+ the [`kindgi` Python SDK](../../sdks/python).
24
+
25
+ ## The pack lifecycle
26
+
27
+ | Command | What it does |
28
+ |---|---|
29
+ | [`kindgi init`](#kindgi-init) | Scaffold a pack, or add Kindgi to an existing app. |
30
+ | [`kindgi dev`](#kindgi-dev) | Run the Kindgi runtime as a container, with your pack's code on your machine, re-indexed on every save. |
31
+ | [`kindgi test`](#kindgi-test) | Run the pack's tests with its own vitest. |
32
+ | [`kindgi build`](#kindgi-build) | Bundle, build and sign a pack image; writes `deploy-envelope.json`. |
33
+ | [`kindgi deploy`](#kindgi-deploy) | Send the signed envelope to `POST /v1/deployments`. |
34
+ | [`kindgi env`](#kindgi-env) | Per-environment values, kept in env files next to the pack. |
35
+ | [`kindgi secrets`](#kindgi-secrets) | Per-environment secrets, through the API. |
36
+ | [`kindgi key`](#kindgi-key) | Local Ed25519 signing keys under `~/.kindgi/keys/`. |
37
+ | [`kindgi skills`](#kindgi-skills) | Refresh the Claude Code skills in `.claude/skills/`. |
38
+ | [`kindgi mcp`](#kindgi-mcp) | MCP servers for your coding agent, in `.mcp.json`. |
39
+ | [`kindgi feedback`](#kindgi-feedback) | Note framework friction in the pack's `FEEDBACK.md`. |
40
+
41
+ The rest of the commands talk to a running Kindgi API: see
42
+ [API commands](#api-commands).
43
+
44
+ ## Quick start
45
+
46
+ ```sh
47
+ pnpm exec kindgi init my-pack --template=sample
48
+ cd my-pack && pnpm install
49
+ pnpm exec kindgi dev
50
+ ```
51
+
52
+ Then, from another terminal in the pack directory (`kindgi dev` writes the
53
+ API URL and token to `.kindgirc.json` there, so every command run in the
54
+ pack talks to it):
55
+
56
+ ```sh
57
+ pnpm exec kindgi runs start --agent=my-pack.echo-agent --input='{"userMessage":"hi"}'
58
+ pnpm exec kindgi runs start --flow=my-pack.echo-flow --input='{"name":"Ada"}'
59
+ pnpm exec kindgi runs start --flow=my-pack.echo-flow --input='{"name":"Ada"}' --dry-run
60
+ ```
61
+
62
+ ## `kindgi init`
63
+
64
+ ```sh
65
+ kindgi init [<pack-name>] [--template=minimal|sample|python] [--path=<dir>]
66
+ [--force] [--link-local] [--new-repo] [--pack-id=<id>]
67
+ ```
68
+
69
+ Three modes:
70
+
71
+ - **`kindgi init <pack-name>`** scaffolds a new pack: the standard folders,
72
+ a `kindgi.config.ts`, starter primitives, tests and a README.
73
+ - **`kindgi init`** in a directory with a `package.json` adds Kindgi to that
74
+ app: a `kindgi.config.ts`, a `kindgi/` folder for the pack's primitives,
75
+ the skills under `.claude/skills/`, and `.gitignore` entries. It creates
76
+ no env files: `kindgi dev` reads the app's own `.env` / `.env.local`.
77
+ `--new-repo` scaffolds a separate pack inside the app instead.
78
+ - **`kindgi init`** in a directory with a `pyproject.toml` and no
79
+ `package.json` (or `--template=python` where both are) adds a Python
80
+ pack to that app, editing its `pyproject.toml` in place and checking each
81
+ edit by parsing the file again:
82
+ - the `[tool.kindgi]` tables: the pack id from `[project].name`
83
+ (normalized; `--pack-id` overrides), discovery under `kindgi/`, and for
84
+ a Poetry app `dev.python = ["poetry", "run", "python"]`;
85
+ - `kindgi` in `[project].dependencies`. Where the dependencies can't be
86
+ edited that way (Poetry 1, `dynamic`), it prints the command to run
87
+ instead;
88
+ - `[tool.uv] required-version`, unless the app sets its own.
89
+
90
+ Plus `kindgi/{tools,guardrails,agents,flows}/`, the Python-pack skills and
91
+ `.gitignore` entries. The next steps it prints follow the app's
92
+ installer: uv, Poetry or pip.
93
+
94
+ A Node project gets `@kindgi/sdk` (a dependency) and `@kindgi/cli` (a
95
+ devDependency) at the running CLI's own version, or linked from a checkout
96
+ (`--link-local`); never `latest`.
97
+
98
+ | Flag | Purpose |
99
+ |---|---|
100
+ | `<pack-name>` | The pack id: lowercase kebab-case, optionally dot-namespaced (`my-pack`, `acme.legal-basics`). |
101
+ | `--template=<name>` | `minimal` (the default: the folders, no examples), `sample` (three tools, a guardrail, an agent and a flow), or `python` (the sample as a Python pack). |
102
+ | `--path=<dir>` | Where to scaffold. Default: `<pack-name>` under the current directory (for a dot-namespaced id, its last segment). |
103
+ | `--force` | Write into a non-empty directory. Default: refuse. |
104
+ | `--link-local` | Link `@kindgi/*` from the checkout the CLI runs from. |
105
+ | `--new-repo` | In an existing app: scaffold a separate pack rather than adding Kindgi to the app. |
106
+ | `--pack-id=<id>` | Adding to an app: the pack id, when the app's name doesn't make a valid one. |
107
+
108
+ ### Skills
109
+
110
+ `init` copies the `@kindgi/sdk` skills into `.claude/skills/`, so a coding
111
+ agent working in the pack knows how to write tools, agents, guardrails,
112
+ flows and providers. A pack gets the skills written for its language: a
113
+ TypeScript pack the TypeScript ones, a Python pack the `kindgi-python-*`
114
+ ones, both the shared ones. `kindgi skills sync` refreshes them, and
115
+ `.claude/skills/.kindgi-manifest.json` records what was installed.
116
+
117
+ ## `kindgi dev`
118
+
119
+ ```sh
120
+ kindgi dev [--port <n>] [--database-url <url>] [--tenant <id>] [--dev-token <token>]
121
+ [--no-watch] [--path <dir>] [--reset] [--recreate-services]
122
+ [--runtime-image <ref> | --runtime-url <url>]
123
+ ```
124
+
125
+ One command runs the whole loop on your machine:
126
+
127
+ - **The Kindgi runtime runs as a container** (`docker run`), one per pack
128
+ directory, with the pack directory mounted at `/pack`. Its API is
129
+ published on `127.0.0.1` only.
130
+ - **Your pack's code runs on your machine**, in a local pack service: the
131
+ same process a deployment runs, with your Node or Python, your
132
+ `node_modules` or virtualenv, and your app's modules. The runtime calls it
133
+ for every tool and guardrail check.
134
+ - **Postgres:** a bundled Postgres, started with `docker compose` (the
135
+ `kindgi-dev` project, shared by every `kindgi dev` on the machine and left
136
+ running), or the one you name with `--database-url` /
137
+ `KINDGI_DATABASE_URL`.
138
+ - **The pack is indexed and watched.** `kindgi dev` finds every tool,
139
+ guardrail, agent and flow, and on each save re-indexes, rebuilds the code
140
+ and restarts the pack service. The next request sees the new definitions;
141
+ a run already in flight keeps the version it started with.
142
+
143
+ | Flag | Purpose |
144
+ |---|---|
145
+ | `--port=<n>` | The port the API is reached on, on `127.0.0.1`. Default `4000`. |
146
+ | `--database-url=<url>` | The Postgres to use. Falls back to `KINDGI_DATABASE_URL` (the shell's, then the env files'). Without either, the bundled Postgres. |
147
+ | `--tenant=<id>` | Pin the tenant. Default: the previous run's (from `.kindgirc.json`), else a new one. The pack's primitives and registered providers stay with it. |
148
+ | `--dev-token=<token>` | Pin the API token. Default: the previous run's, else a new one. Each flag overrides only its own value: `--dev-token` alone keeps the tenant. |
149
+ | `--path=<dir>` | The pack root. Default: the current directory. It must have a `kindgi.config.ts`, or a `pyproject.toml` with a `[tool.kindgi]` table. |
150
+ | `--no-watch` | Start, index once, and exit. For smoke tests and CI. |
151
+ | `--reset` | Start this pack fresh: removes `.kindgirc.json`, so the boot makes a new tenant and token and the pack sees none of its earlier data. The bundled Postgres, which every pack on the machine shares, is left alone. (To wipe all dev data: `docker compose -p kindgi-dev down -v`.) |
152
+ | `--recreate-services` | Let `docker compose` recreate the bundled Postgres if its definition changed. By default an existing container is reused as it is, so no other `kindgi dev` loses its database. |
153
+ | `--runtime-image=<ref>` | The runtime image to run. Default: the one this CLI release was tested with. |
154
+ | `--runtime-url=<url>` | Use a runtime you run yourself instead of starting the container. Start it with the pack's `.kindgi/dev/runtime.env`. |
155
+
156
+ ### The runtime container
157
+
158
+ - **Configuration:** everything the runtime is told is written to
159
+ `.kindgi/dev/runtime.env` (mode `0600`) and passed with
160
+ `docker run --env-file`. The runtime reads nothing else from your
161
+ machine.
162
+ - **Your machine's `localhost`:** calls the runtime makes to `localhost` (your
163
+ app's `run.finished` webhook, an MCP server, a model server you run
164
+ locally) reach your machine. On Docker Desktop they go through
165
+ `host.docker.internal`. On Linux the container shares the host's network
166
+ and runs as your user, so files it writes into the pack stay yours.
167
+ - **Google Cloud credentials:** for Vertex AI models, your Application
168
+ Default Credentials file (`GOOGLE_APPLICATION_CREDENTIALS`, else the one
169
+ `gcloud auth application-default login` writes) is mounted read-only.
170
+ Kindgi keeps no key files of its own.
171
+ - **The image:** the runtime image is pulled on first use. It is in
172
+ private preview: request access at contact@kindgi.com, then
173
+ `docker login quay.io` with the pull credentials you receive. `kindgi dev`
174
+ says so when a pull is refused.
175
+
176
+ ### Env files
177
+
178
+ `kindgi dev` runs as the `local` environment and reads the project's own env
179
+ files at the pack root: `.env`, then `.env.local` on top, parsed the way the
180
+ application beside the pack parses them (dotenv grammar, `${VAR}`
181
+ expansion). Nothing is copied: a key already in the app's `.env` is available
182
+ to the pack.
183
+
184
+ - **`KINDGI_*` names configure Kindgi itself** (e.g. `KINDGI_DATABASE_URL`).
185
+ Precedence: flag > shell > env files.
186
+ - **Every other name belongs to the pack**: providers, tools and MCP servers
187
+ resolve them as secrets. `KINDGI_*` names never resolve as secrets, so the
188
+ app's own `DATABASE_URL` stays the app's.
189
+ - **Writes** (`kindgi secrets set`, `kindgi env set --env=local`) go to the
190
+ highest-precedence file (`.env.local`), and every other line is kept.
191
+ Kindgi never edits a lower file such as the app's `.env`.
192
+ - **Different files?** List them, lowest precedence first, and restart
193
+ `kindgi dev`:
194
+
195
+ ```ts
196
+ export default {
197
+ pack: { id: 'acme.app', version: '1.0.0' },
198
+ dev: { envFiles: ['.env', '.env.development', '.env.local'] },
199
+ };
200
+ ```
201
+
202
+ The startup output names the files it found and how many names they give the
203
+ pack. A malformed line is reported as `file:line`, never its text.
204
+
205
+ **The names the pack's code reads.** Declare them in `kindgi.config.ts`:
206
+
207
+ ```ts
208
+ export default {
209
+ pack: { id: 'acme.app', version: '1.0.0' },
210
+ env: { required: ['DATABASE_URL'], optional: ['LOG_LEVEL'] },
211
+ };
212
+ ```
213
+
214
+ A required name the env files don't give gets a warning in `kindgi dev`, which
215
+ keeps serving. A deployed pack service isn't ready without it, and says which
216
+ names it lacks. A deployment injects exactly the declared names.
217
+
218
+ ### Model providers
219
+
220
+ A tenant with no providers gets `dev-echo`, a fallback provider (scripted
221
+ replies, no key, no network) that answers only while no other provider fits.
222
+ Agent turns run before you register a model, and registering one takes over
223
+ with nothing to switch off:
224
+
225
+ ```sh
226
+ kindgi providers register --preset=anthropic # the key must be in the env files
227
+ kindgi providers register --preset=gemini --project=<gcp-project>
228
+ ```
229
+
230
+ A turn the fallback answers carries a `fallback-provider` warning, which
231
+ `kindgi runs start` prints. `kindgi providers unregister dev-echo` removes it
232
+ for good.
233
+
234
+ **Any OpenAI-compatible endpoint** — an open-source model you serve yourself
235
+ (vLLM, llama.cpp's `llama-server`, Ollama, LM Studio), OpenRouter, a LiteLLM
236
+ proxy — registers with `--spec`, naming its base URL in `adapter_config`:
237
+
238
+ ```json
239
+ {
240
+ "adapter_id": "@kindgi/adapter-model-openai-compat",
241
+ "adapter_config": { "baseURL": "http://127.0.0.1:8000/v1" },
242
+ "metadata": {
243
+ "id": "qwen-local",
244
+ "region": "unspecified",
245
+ "models": [{ "name": "qwen3.5-4b", "contextWindow": 32768, "features": ["tool-use"],
246
+ "cost": { "promptUsdPer1kTokens": 0, "completionUsdPer1kTokens": 0 } }]
247
+ }
248
+ }
249
+ ```
250
+
251
+ `kindgi providers register --spec=@qwen.json`, then point an agent at it
252
+ (`preferred_provider="qwen-local"`). An endpoint that needs a key takes a
253
+ `secret_ref` (`{ "envName": "local", "name": "MY_KEY" }`), resolved on every
254
+ call. The model must call tools in the OpenAI format: serve it with tool
255
+ calling on (vLLM `--enable-auto-tool-choice --tool-call-parser <model's>`,
256
+ `llama-server --jinja`) and, for a thinking model such as Qwen, thinking off: on the server
257
+ (vLLM `--default-chat-template-kwargs '{"enable_thinking": false}'`, `llama-server --reasoning off`),
258
+ or, for a shared server you can't reconfigure, per request from the provider row:
259
+ `"extraBody.chat_template_kwargs.enable_thinking": false` in `adapter_config` (one flat key per
260
+ request field; dots nest).
261
+
262
+ ### What you see
263
+
264
+ ```
265
+ ✓ Kindgi is up
266
+ API http://127.0.0.1:4000
267
+ Console http://127.0.0.1:4000/console/
268
+ Tenant c9a4…
269
+ Token kgi_bt_…
270
+ Providers dev-echo (fallback) — …
271
+ Origins …
272
+
273
+ Try it (from another terminal, cd to the pack dir first):
274
+ pnpm exec kindgi runs start --agent=my-pack.echo-agent --input='{"userMessage":"hi"}'
275
+ pnpm exec kindgi runs stream <run-id>
276
+
277
+ Watching /path/to/my-pack
278
+ Ctrl+C to stop.
279
+ ```
280
+
281
+ Progress and the runtime's own log lines (`[runtime] …`, `[pack] …`) go to
282
+ stderr; a JSON summary goes to stdout, so `kindgi dev --no-watch --raw | jq`
283
+ works.
284
+
285
+ ### Watching
286
+
287
+ `kindgi dev` watches the pack's `discovery` patterns from `kindgi.config.ts`
288
+ (default `tools/`, `agents/`, `guardrails/`, `flows/`; an app with Kindgi
289
+ added watches `kindgi/`), and the env files. Only each pattern's fixed
290
+ directory is watched, never the whole app. The dev index lives at
291
+ `.kindgi/dev/index.json`.
292
+
293
+ - An empty pack is not an error: the output says where to add the first
294
+ primitive.
295
+ - A file that fails to index or build (a bad schema, a missing default
296
+ export, a syntax error) is reported with its path and the error, and the
297
+ previous code keeps serving until you fix it and save.
298
+ - Deleting a primitive's folder removes it from the catalog.
299
+
300
+ ### A Python pack
301
+
302
+ A pack whose config is the `[tool.kindgi]` table of its `pyproject.toml` is a
303
+ Python pack: its tools and guardrail checks are Python, its agents and flows
304
+ data. `kindgi dev` runs it the same way, with the pack's own interpreter:
305
+
306
+ - **The interpreter:** `dev.python` in `[tool.kindgi]` (a path, or a command
307
+ such as `["uv", "run", "python"]`), else the pack's `.venv/bin/python`,
308
+ else `python3`. It must import `kindgi` with the pack's environment, or
309
+ `kindgi dev` stops and says how to install it.
310
+ - **Build:** every `.py` file under the pack root is compiled; a syntax
311
+ error is reported as `file:line:col` and the previous code keeps serving.
312
+ - **Index and serve:** `python -m kindgi.pack index`, then
313
+ `python -m kindgi.pack serve` in the pack service. The runtime can't tell
314
+ it from a Node pack.
315
+ - **Watch:** any `.py` file under the pack root (shared modules included)
316
+ and `pyproject.toml`.
317
+ - **The CLI:** a Python pack has no npm project, so it runs the published
318
+ CLI through npx (Node 22 needed): `npx --yes @kindgi/cli@0.1 <command>`, within
319
+ the CLI's minor, in the startup hints and in the `.mcp.json` entries
320
+ `kindgi mcp add` writes.
321
+
322
+ ### Stopping
323
+
324
+ Ctrl+C (or SIGTERM) stops the watchers, the pack service and the runtime
325
+ container. The bundled Postgres keeps running for the next `kindgi dev`.
326
+ The exit code is `0` after a clean stop and `1` if startup failed.
327
+
328
+ ## `kindgi test`
329
+
330
+ ```sh
331
+ kindgi test [--watch] [--reporter <name>] [--path <dir>] [-- <vitest-args>...]
332
+ ```
333
+
334
+ Runs the pack's tests with the pack's own vitest (the CLI bundles none, so the
335
+ pack chooses its vitest version). The templates include a `vitest.config.ts`
336
+ and a first test. `--watch` runs vitest in watch mode; everything after `--`
337
+ goes to vitest as is. The CLI refuses to run without a `vitest.config.*` at
338
+ the pack root, and uses `pnpm exec vitest` in a pnpm project, else
339
+ `npx --no-install vitest`.
340
+
341
+ ## `kindgi build`
342
+
343
+ ```sh
344
+ kindgi build [--local [--push [<repository>]] [--platform <os/arch>]] [--env <name>] [--endpoint <url>] [--target <t>] [--out <dir>]
345
+ [--artifact-version <v>] [--published-at <iso>] [--tenant <id>]
346
+ [--signing-key <path>] [--registry-push-creds <ref>]
347
+ [--skip-integrity-gate] [--skip-image-pull] [--skip-sign] [--path <dir>]
348
+ ```
349
+
350
+ Builds a signed pack image with a Kindgi build server, and writes
351
+ `deploy-envelope.json` for `kindgi deploy`:
352
+
353
+ 1. **Config:** reads `kindgi.config.ts` and the `--env` block (default
354
+ `staging`): the build server, the tenant and the signing key.
355
+ 2. **Bundle:** bundles every primitive and the config with esbuild, each
356
+ `.mjs` with a sourcemap. The pack's own code, and the app code it imports,
357
+ is bundled; the app's installed dependencies stay external, imported by
358
+ name from the image's `node_modules`. The pack service and the indexer are
359
+ self-contained bundles. A Python pack ships its source and lockfile
360
+ instead.
361
+ 3. **Index:** runs the bundled indexer over the bundles locally, into
362
+ `expected-index.json`, exactly as the image's indexer stage will.
363
+ 4. **Containerfile and context:** writes a multi-stage `Containerfile`
364
+ and the build context:
365
+ - what the install reads: `package.json`, the lockfile, every workspace
366
+ member's `package.json`, the workspace file, patches, and tarballs
367
+ vendored in the project;
368
+ - the bundles;
369
+ - what `bundle.include` lists.
370
+
371
+ The pack's source never ships. Env files, `.kindgirc.json`, private keys
372
+ and anything under `.git/`, `.kindgi/` or `node_modules/` are refused: a
373
+ build that would ship one fails and names it. `.npmrc` and `.yarnrc*` are
374
+ read by the install as build secrets, never copied into the image.
375
+ 5. **Build:** uploads the context (`pack.tgz`) to the build server and
376
+ streams its log.
377
+ 6. **Integrity gate:** the image's index must match the local one, byte for
378
+ byte (`--skip-image-pull` compares hashes only, without pulling the image).
379
+ 7. **Sign and write:** signs the image digest and index hash with your
380
+ Ed25519 key and writes `.kindgi/build/deploy-envelope.json`.
381
+
382
+ **The image (a TypeScript pack):**
383
+ - **Base:** `node:22` or `node:24-bookworm-slim`, pinned by digest: the
384
+ first whose Node satisfies the app's `engines.node`.
385
+ - **Install:** the app's dependencies, installed the way the app installs
386
+ them, from its own lockfile, frozen. pnpm and yarn come through corepack
387
+ and the `packageManager` field. Build scripts are off during the install;
388
+ then `rebuild` runs the ones the app allows, and the install is pruned to
389
+ production dependencies.
390
+ - **A workspace:** with pnpm, only the pack's project and what it depends on
391
+ are installed, not the rest of the workspace. npm and yarn install the
392
+ whole workspace.
393
+ - **Layout:** the lockfile's folder is `/app`, and a pack inside a workspace
394
+ member sits at its own path.
395
+ - **Runs:** the pack service, under tini, as `node`, on `$PORT` (8080).
396
+
397
+ A dependency linked from outside the project (`link:../…`, `file:/…`) can't be
398
+ installed in an image: vendor it as a tarball inside the project
399
+ (`file:vendor/<name>.tgz`) or install it from a registry.
400
+
401
+ **What the image needs beyond the install** goes in `image`, with
402
+ `@kindgi/sdk/build`:
403
+
404
+ ```ts
405
+ import { prisma } from '@kindgi/sdk/build';
406
+
407
+ export default {
408
+ pack: { id: 'acme.app', version: '1.0.0' },
409
+ image: {
410
+ systemPackages: ['tesseract-ocr'], // Debian packages
411
+ extensions: [prisma({ schema: 'prisma/schema.prisma', config: 'prisma.config.ts' })],
412
+ buildEnv: { DATABASE_URL: 'postgresql://build-placeholder' },
413
+ },
414
+ };
415
+ ```
416
+
417
+ - `systemPackages` are installed in the base image.
418
+ - `prisma()` copies the schema (and config) into the image and runs
419
+ `prisma generate` after the install, before the prune. The app's own
420
+ `postinstall` doesn't run in the image, because the install runs with
421
+ scripts off.
422
+ - `buildEnv` holds non-secret placeholders for the build steps, and for the
423
+ indexer, which imports the pack's modules. It's never in the final image.
424
+ - `defineBuildExtension()` makes an app's own extension from the same parts:
425
+ `contextFiles`, `systemPackages`, `postInstall` steps (a package's bin, run
426
+ through the app's package manager) and `buildEnv`.
427
+
428
+ **`--local`:** builds the image with this machine's Docker
429
+ (`docker buildx build --load`) into its image store, as
430
+ `kindgi-pack/<packId>:<artifactVersion>`, with the same integrity gate. There
431
+ is no build server, signature or envelope, and no tenant or signing key
432
+ needed. It prints a `docker run` line.
433
+
434
+ **`--local --push`:** publishes from this machine, for `kindgi deploy`:
435
+ 1. builds the image for the deployment's platform: `linux/amd64` by default,
436
+ which Cloud Run runs (on Apple silicon, under emulation); `--platform`
437
+ overrides it;
438
+ 2. pushes it to `<repository>:<artifactVersion>`. The repository is `--push`'s
439
+ value, else `environments.<env>.registry` + `/<packId>`;
440
+ 3. pulls it back by digest for the integrity gate;
441
+ 4. signs it as the build service path does, and writes
442
+ `.kindgi/build/deploy-envelope.json`.
443
+
444
+ It uses your own Docker credentials for the registry, for example
445
+ `gcloud auth configure-docker <region>-docker.pkg.dev` for Artifact Registry.
446
+ Kindgi holds none. It needs the env block's `tenantId` and `signingKey`, or
447
+ `--tenant` and `--signing-key`.
448
+
449
+ Files a tool reads at runtime, rather than imports, go in `bundle.include`:
450
+
451
+ ```ts
452
+ export default {
453
+ pack: { id: 'acme.app', version: '1.0.0' },
454
+ bundle: { include: ['kindgi/data/**/*.json'] },
455
+ };
456
+ ```
457
+
458
+ **A Python pack:** the image is `python:3.13-slim-bookworm` with `uv`, both pinned by
459
+ digest, and the pack's dependencies come from its lockfile (`uv.lock`, or a
460
+ Poetry app's `poetry.lock`; one is required). Debian packages the code needs
461
+ go in `[tool.kindgi.image] system-packages = ["tesseract-ocr"]`. The image's
462
+ uv version must be in the pack's `[tool.uv] required-version`; `kindgi
463
+ build` stops before uploading when it isn't.
464
+
465
+ **Reproducible:** the build pins `SOURCE_DATE_EPOCH=0`, the publish time
466
+ (`--published-at`, default the epoch) and the artifact version
467
+ (`--artifact-version`, default `YYYYMMDD.1`), and the base images by digest,
468
+ so the same inputs give the same image.
469
+
470
+ | Flag | Purpose |
471
+ |---|---|
472
+ | `--local` | Build with this machine's Docker instead of a build server: no signing, no envelope. TypeScript packs. |
473
+ | `--push[=<repository>]` | With `--local`: push the image, sign it, and write the envelope. Default repository: the env block's `registry` + `/<packId>`. |
474
+ | `--platform=<os/arch>` | The image's platform. Default: `linux/amd64` when pushing, else this machine's. |
475
+ | `--endpoint=<url>` | The build server. Default: the env block's `build`. |
476
+ | `--tenant=<id>` | The tenant the signature names. Default: the env block's `tenantId`, else `KINDGI_TENANT_ID`. |
477
+ | `--signing-key=<path>` | The Ed25519 private key (PEM). Default: the env block's `signingKey`. |
478
+ | `--skip-integrity-gate` | Sign without re-checking the image's index. Prints a warning. |
479
+ | `--skip-sign` | Write an unsigned envelope (for CI that signs elsewhere); `kindgi deploy` refuses it. |
480
+
481
+ ## `kindgi deploy`
482
+
483
+ ```sh
484
+ kindgi deploy [--env <name>] [--from-envelope <path>] [--endpoint <url>] [--token <bearer>]
485
+ [--tenant <id>] [--idempotency-key <str>] [--dry-run] [--sync-secrets]
486
+ [--allow-missing-env] [--path <dir>] # plus kindgi build's flags, used when there is no envelope yet
487
+ ```
488
+
489
+ Sends the signed envelope to `POST /v1/deployments` and prints the
490
+ deployment. The envelope is `--from-envelope`, else
491
+ `.kindgi/build/deploy-envelope.json`, else `kindgi deploy` runs
492
+ `kindgi build` first (`--build-endpoint` is the build server there, since
493
+ `--endpoint` is the API).
494
+
495
+ - **The API:** `--endpoint`, else the env block's `endpoint`, else
496
+ `--url` / `KINDGI_API_URL`.
497
+ - **Idempotent:** the `Idempotency-Key` header is a hash of the request
498
+ body (`--idempotency-key` overrides it). Deploying the same image again
499
+ returns the same deployment.
500
+ - **`--tenant`** must match the envelope's tenant, checked before anything
501
+ is sent.
502
+ - **`--dry-run`** prints the equivalent `curl` command and sends nothing.
503
+ - **The pack service's env, checked first.** When the pack declares `env`,
504
+ the deploy prints the plan for `--env` (see `kindgi env plan`). It refuses
505
+ when a required name has no value or reference in `environments.<env>.env`
506
+ (`--allow-missing-env` deploys anyway, with a warning), or when a secret is
507
+ given in the clear. That case has no override.
508
+ - **`--sync-secrets`** also sends the values in `.env.<envName>` to the
509
+ deployment's secrets after it lands. Off by default; without it, a deploy
510
+ with such a file says what it didn't send. With it, secret-shaped names
511
+ (`*_KEY`, `*_TOKEN`, `*_SECRET`, …) get a warning: those belong in
512
+ `kindgi secrets set`.
513
+ - **Errors** carry a hint for the common ones: `signature-invalid`,
514
+ `signer-not-trusted`, `image-unverifiable`,
515
+ `deployment-validation-failed`.
516
+
517
+ ## `kindgi env`
518
+
519
+ ```sh
520
+ kindgi env list [--env <name>] [--reveal] [--force-reveal] [--path <dir>]
521
+ kindgi env set <KEY> <VALUE> [--env <name>] [--force] [--path <dir>]
522
+ kindgi env unset <KEY> [--env <name>] [--path <dir>]
523
+ kindgi env pull [--env <name>] --scope=<kind>[:id] [--overwrite-existing] [--path <dir>]
524
+ kindgi env init [--secrets-backend=<none|postgres|secret-manager>] [--kms=<gcp|aws|libsodium|vault>] [--out=<path>]
525
+ kindgi env plan [--env <name>] [--format=terraform|gcloud] [--path <dir>]
526
+ ```
527
+
528
+ Per-environment values for the pack, in env files next to
529
+ `kindgi.config.ts`. `--env` defaults to `staging`.
530
+
531
+ - **`--env=local`** is the project's own env files, the ones `kindgi dev`
532
+ reads (`.env` < `.env.local`, or `dev.envFiles`). `list` shows the merged
533
+ view and which file each key came from; `set` and `unset` edit only the
534
+ highest-precedence file, and say so when a lower file (the app's `.env`)
535
+ still defines the key.
536
+ - **Any other env** is `.env.<envName>`, the file
537
+ `kindgi deploy --sync-secrets` sends.
538
+ - **`list`** redacts values; `--reveal` prints them, but not to a pipe
539
+ without `--force-reveal`.
540
+ - **`pull`** fetches the env's values from the API into `.env.<envName>`.
541
+ - **`init`** writes a `.env.example` for a deployment target.
542
+ - **Format:** dotenv, read the way `dotenv` (and Next.js) read it, with
543
+ `${VAR}` expansion. `set` and `unset` touch one key and keep every other
544
+ byte.
545
+ - **`KINDGI_*` names are refused:** they configure the runtime and belong in
546
+ its environment, not the pack's.
547
+ - **`plan`** shows the process env a deployed pack service gets in `--env`:
548
+ each name the pack declares (`env.required` / `env.optional`) and its source
549
+ in `environments.<env>.env` in `kindgi.config.ts`. A source is a plain value,
550
+ or a Secret Manager reference that the platform resolves with the pack
551
+ service's own identity (Kindgi never sees the value):
552
+
553
+ ```ts
554
+ environments: {
555
+ production: {
556
+ env: {
557
+ LOG_LEVEL: 'info',
558
+ DATABASE_URL: { secret: 'acme-db-url', version: '3' },
559
+ // a secret in another project, named by project number:
560
+ SHARED_TOKEN: { secret: 'shared-token', version: '2', project: '123456789012' },
561
+ },
562
+ },
563
+ },
564
+ ```
565
+
566
+ It prints the Terraform input (`env` and `secret_env`), or with
567
+ `--format=gcloud` the `--set-env-vars` / `--set-secrets` flags. It exits 1
568
+ when a required name has no source, or when a secret is given as a plain
569
+ value: by its name (`*_KEY`, `*_TOKEN`, …) or by a credential in it (a URL
570
+ with a password). That value is never printed. A reference to version
571
+ `latest` is read when an instance starts, so a new version needs a new
572
+ revision.
573
+
574
+ ## `kindgi secrets`
575
+
576
+ ```sh
577
+ kindgi secrets list|get|set|rotate|revoke|pull --env=<name> --scope=<kind>[:id] …
578
+ ```
579
+
580
+ Secrets through the API's `/v1/secrets` routes. Values are never printed and
581
+ never returned: `list` and `get` show metadata only, and `pull` writes a
582
+ manifest (`.secrets/<envName>/manifest.json`), not the values. `set` and
583
+ `rotate` read the value from a no-echo prompt, `--from-stdin` or
584
+ `--from-file` (a file others can read is refused). `revoke` keeps an audit
585
+ tombstone; `--hard` erases the value. Under `kindgi dev`, `--env=local`
586
+ writes to the pack's `.env.local`.
587
+
588
+ ## `kindgi key`
589
+
590
+ ```sh
591
+ kindgi key create <keyId> [--env <name>] [--home <dir>]
592
+ kindgi key export <keyId> [--format=pem|base64|raw-hex] [--home <dir>]
593
+ kindgi key list [--home <dir>]
594
+ ```
595
+
596
+ Ed25519 signing keys for `kindgi build`, as files under `~/.kindgi/keys/`
597
+ (the directory `0700`, `<keyId>.pem` `0600`, `<keyId>.pub.pem` `0644`).
598
+
599
+ - **`create`** generates a key pair and refuses to overwrite an existing
600
+ one. With `--env`, it prints what to add to that env block in
601
+ `kindgi.config.ts`.
602
+ - **`export`** prints the public key only, never the private one.
603
+ - **`list`** shows each key pair's id, fingerprint and paths.
604
+
605
+ ## `kindgi skills`
606
+
607
+ `kindgi skills sync [--force] [--dry-run]` refreshes `.claude/skills/` from the
608
+ skills bundled with this CLI. Skills you edited are kept unless `--force`.
609
+ `kindgi dev` mentions it when the installed skills are behind.
610
+
611
+ ## `kindgi mcp`
612
+
613
+ MCP servers for your coding agent (Claude Code, Cursor, VS Code, …), not for
614
+ the runtime:
615
+
616
+ ```sh
617
+ kindgi mcp presets
618
+ kindgi mcp add postgres --secret=MY_DB_URL
619
+ kindgi mcp list
620
+ kindgi mcp remove <server-name>
621
+ ```
622
+
623
+ `add` writes an entry to `.mcp.json` at the pack root. The entry runs
624
+ `kindgi mcp-launch`, which starts the MCP server with the secret from the
625
+ pack's env files in its environment, so the secret is never written into
626
+ `.mcp.json`. The `kindgi-authoring-mcp-servers` skill covers the details.
627
+
628
+ ## `kindgi feedback`
629
+
630
+ `kindgi feedback write --kind=bug --title="…"` appends a note about framework
631
+ friction to `FEEDBACK.md` at the pack root, where a coding agent can leave
632
+ what it diagnosed for the maintainers.
633
+
634
+ ## API commands
635
+
636
+ These call a running Kindgi API through [`@kindgi/client`](../../sdks/typescript).
637
+ Inside a pack that `kindgi dev` runs, they find it on their own (see
638
+ [Auth and config](#auth-and-config)).
639
+
640
+ | Command | Subcommands |
641
+ |---|---|
642
+ | `runs` | `list`, `get`, `cancel`, `journal`, `stream` (one JSON event per line), `start`, `resume` |
643
+ | `agents` | `publish` |
644
+ | `tools` | `list`, `get`, `unregister`, `versions`, `get-version`, `reinstate` |
645
+ | `guardrails` | `list`, `get`, `register`, `unregister` |
646
+ | `providers` | `list`, `get`, `register`, `presets`, `unregister` |
647
+ | `adapters` | `prepare` |
648
+ | `approvals` | `list`, `get`, `complete` |
649
+ | `reviewers` | `list`, `get`, `register`, `unregister` |
650
+ | `health` | `GET /health`, no auth |
651
+ | `version` | The CLI's and SDK's versions, and the API's when it's reachable |
652
+
653
+ `kindgi runs start` starts a run for an agent (`--agent=<id>`) or a flow
654
+ (`--flow=<id>`) and waits for it to finish. `--no-wait` prints a flow run as
655
+ soon as it exists and lets it finish in the background (follow it with
656
+ `runs get` or `runs stream`); an agent run always answers when its turn ends.
657
+ `--dry-run` runs only the tools declared read-only (`mutating: false`).
658
+
659
+ `kindgi <command> --help` prints a command's subcommands and flags.
660
+
661
+ More of the API (memory, artifacts, provenance, conversations, proposals,
662
+ observations, tokens, capabilities, and listing agents and flows) has
663
+ commands in progress. They're left out of `--help` until they work; until
664
+ then, use [`@kindgi/client`](../../sdks/typescript) for those resources.
665
+
666
+ ## Auth and config
667
+
668
+ The API URL and token come from, in order:
669
+
670
+ | Source | API URL | Token |
671
+ |---|---|---|
672
+ | Flag | `--url` | `--token` |
673
+ | Environment | `KINDGI_API_URL` | `KINDGI_API_TOKEN` |
674
+ | `.kindgirc.json` in the current directory | `apiUrl` | `token` |
675
+ | `~/.kindgi/config.json` | `apiUrl` | `token` |
676
+
677
+ `kindgi dev` writes `.kindgirc.json` in the pack. For another API, save the
678
+ pair once with `kindgi auth login --url=<url> --token=<token>`, and check it
679
+ with `kindgi auth whoami`.
680
+
681
+ ## Output and global flags
682
+
683
+ | Flag | Effect |
684
+ |---|---|
685
+ | `--json` | Pretty JSON on stdout (the default), for `jq`. |
686
+ | `--raw` | One-line JSON. |
687
+ | `--table` | A table for list responses (JSON where a list has no columns). |
688
+ | `--quiet` | Nothing on stdout; the exit code only. |
689
+ | `--url=<url>`, `--token=<token>` | The API and its token (see above). |
690
+ | `--verbose`, `-v` | Full errors: stack traces and the API's error bodies. |
691
+ | `--version` | The CLI's version. |
692
+ | `--help`, `-h` | Help for the CLI or a command. |