@tdk-landscape/tdk-cli-core 1.3.49 → 1.3.50

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 (309) hide show
  1. package/.claude/skills/layer-autoresearch/SKILL.md +48 -0
  2. package/.claude/skills/tdk-troubleshoot/SKILL.md +222 -0
  3. package/.github/ISSUE_TEMPLATE/bug_report.yml +40 -0
  4. package/.github/ISSUE_TEMPLATE/config.yml +8 -0
  5. package/.github/ISSUE_TEMPLATE/feature_request.yml +18 -0
  6. package/.github/dependabot.yml +33 -0
  7. package/.github/pull_request_template.md +5 -0
  8. package/.github/workflows/ci.yml +187 -0
  9. package/.github/workflows/release-binaries.yml +19 -9
  10. package/.github/zizmor.yml +9 -0
  11. package/CODE_OF_CONDUCT.md +9 -0
  12. package/CONTRIBUTING.md +42 -0
  13. package/LICENSE +21 -0
  14. package/README.md +149 -0
  15. package/SECURITY.md +17 -0
  16. package/benchmarks/results/container-scale-2026-09-25T20-54-49-736Z.json +45 -0
  17. package/benchmarks/results/container-scale-2026-09-25T21-01-20-540Z.json +150 -0
  18. package/benchmarks/results/container-scale-2026-09-25T21-15-01-441Z.json +73 -0
  19. package/benchmarks/results/container-scale-2026-09-25T22-09-01-630Z.json +77 -0
  20. package/benchmarks/results/container-scale-2026-09-25T22-18-28-371Z.json +202 -0
  21. package/cli/README.md +25 -0
  22. package/cli/biome.json +1 -1
  23. package/cli/dist/cli.d.ts +3 -0
  24. package/cli/dist/cli.d.ts.map +1 -0
  25. package/cli/dist/cli.js +64 -0
  26. package/cli/dist/cli.js.map +1 -0
  27. package/cli/dist/commands/completion.d.ts +3 -0
  28. package/cli/dist/commands/completion.d.ts.map +1 -0
  29. package/cli/dist/commands/completion.js +294 -0
  30. package/cli/dist/commands/completion.js.map +1 -0
  31. package/cli/dist/commands/config.d.ts +3 -0
  32. package/cli/dist/commands/config.d.ts.map +1 -0
  33. package/cli/dist/commands/config.js +231 -0
  34. package/cli/dist/commands/config.js.map +1 -0
  35. package/cli/dist/commands/doctor.d.ts +19 -0
  36. package/cli/dist/commands/doctor.d.ts.map +1 -0
  37. package/cli/dist/commands/doctor.js +745 -0
  38. package/cli/dist/commands/doctor.js.map +1 -0
  39. package/cli/dist/commands/down.d.ts +3 -0
  40. package/cli/dist/commands/down.d.ts.map +1 -0
  41. package/cli/dist/commands/down.js +32 -0
  42. package/cli/dist/commands/down.js.map +1 -0
  43. package/cli/dist/commands/help.d.ts +2 -0
  44. package/cli/dist/commands/help.d.ts.map +1 -0
  45. package/cli/dist/commands/help.js +138 -0
  46. package/cli/dist/commands/help.js.map +1 -0
  47. package/cli/dist/commands/networks.d.ts +3 -0
  48. package/cli/dist/commands/networks.d.ts.map +1 -0
  49. package/cli/dist/commands/networks.js +260 -0
  50. package/cli/dist/commands/networks.js.map +1 -0
  51. package/cli/dist/commands/project.d.ts +3 -0
  52. package/cli/dist/commands/project.d.ts.map +1 -0
  53. package/cli/dist/commands/project.js +370 -0
  54. package/cli/dist/commands/project.js.map +1 -0
  55. package/cli/dist/commands/projects.d.ts +3 -0
  56. package/cli/dist/commands/projects.d.ts.map +1 -0
  57. package/cli/dist/commands/projects.js +71 -0
  58. package/cli/dist/commands/projects.js.map +1 -0
  59. package/cli/dist/commands/resource.d.ts +69 -0
  60. package/cli/dist/commands/resource.d.ts.map +1 -0
  61. package/cli/dist/commands/resource.js +579 -0
  62. package/cli/dist/commands/resource.js.map +1 -0
  63. package/cli/dist/commands/resources.d.ts +3 -0
  64. package/cli/dist/commands/resources.d.ts.map +1 -0
  65. package/cli/dist/commands/resources.js +73 -0
  66. package/cli/dist/commands/resources.js.map +1 -0
  67. package/cli/dist/commands/stack.d.ts +3 -0
  68. package/cli/dist/commands/stack.d.ts.map +1 -0
  69. package/cli/dist/commands/stack.js +97 -0
  70. package/cli/dist/commands/stack.js.map +1 -0
  71. package/cli/dist/commands/stacks.d.ts +3 -0
  72. package/cli/dist/commands/stacks.d.ts.map +1 -0
  73. package/cli/dist/commands/stacks.js +43 -0
  74. package/cli/dist/commands/stacks.js.map +1 -0
  75. package/cli/dist/commands/status.d.ts +3 -0
  76. package/cli/dist/commands/status.d.ts.map +1 -0
  77. package/cli/dist/commands/status.js +71 -0
  78. package/cli/dist/commands/status.js.map +1 -0
  79. package/cli/dist/commands/ui.d.ts +3 -0
  80. package/cli/dist/commands/ui.d.ts.map +1 -0
  81. package/cli/dist/commands/ui.js +445 -0
  82. package/cli/dist/commands/ui.js.map +1 -0
  83. package/cli/dist/commands/up.d.ts +3 -0
  84. package/cli/dist/commands/up.d.ts.map +1 -0
  85. package/cli/dist/commands/up.js +124 -0
  86. package/cli/dist/commands/up.js.map +1 -0
  87. package/cli/dist/commands/upgrade.d.ts +11 -0
  88. package/cli/dist/commands/upgrade.d.ts.map +1 -0
  89. package/cli/dist/commands/upgrade.js +496 -0
  90. package/cli/dist/commands/upgrade.js.map +1 -0
  91. package/cli/dist/commands/version.d.ts +3 -0
  92. package/cli/dist/commands/version.d.ts.map +1 -0
  93. package/cli/dist/commands/version.js +9 -0
  94. package/cli/dist/commands/version.js.map +1 -0
  95. package/cli/dist/components/Accessible.d.ts +8 -0
  96. package/cli/dist/components/Accessible.d.ts.map +1 -0
  97. package/cli/dist/components/Accessible.js +10 -0
  98. package/cli/dist/components/Accessible.js.map +1 -0
  99. package/cli/dist/components/BaseTooltip.d.ts +4 -0
  100. package/cli/dist/components/BaseTooltip.d.ts.map +1 -0
  101. package/cli/dist/components/BaseTooltip.js +28 -0
  102. package/cli/dist/components/BaseTooltip.js.map +1 -0
  103. package/cli/dist/components/DetailPanel.d.ts +4 -0
  104. package/cli/dist/components/DetailPanel.d.ts.map +1 -0
  105. package/cli/dist/components/DetailPanel.js +18 -0
  106. package/cli/dist/components/DetailPanel.js.map +1 -0
  107. package/cli/dist/components/FileTree.d.ts +4 -0
  108. package/cli/dist/components/FileTree.d.ts.map +1 -0
  109. package/cli/dist/components/FileTree.js +47 -0
  110. package/cli/dist/components/FileTree.js.map +1 -0
  111. package/cli/dist/components/ResourceSelectInput.d.ts +4 -0
  112. package/cli/dist/components/ResourceSelectInput.d.ts.map +1 -0
  113. package/cli/dist/components/ResourceSelectInput.js +7 -0
  114. package/cli/dist/components/ResourceSelectInput.js.map +1 -0
  115. package/cli/dist/components/ResourceTable.d.ts +4 -0
  116. package/cli/dist/components/ResourceTable.d.ts.map +1 -0
  117. package/cli/dist/components/ResourceTable.js +18 -0
  118. package/cli/dist/components/ResourceTable.js.map +1 -0
  119. package/cli/dist/components/TabBar.d.ts +4 -0
  120. package/cli/dist/components/TabBar.d.ts.map +1 -0
  121. package/cli/dist/components/TabBar.js +17 -0
  122. package/cli/dist/components/TabBar.js.map +1 -0
  123. package/cli/dist/components/Tooltip.d.ts +12 -0
  124. package/cli/dist/components/Tooltip.d.ts.map +1 -0
  125. package/cli/dist/components/Tooltip.js +12 -0
  126. package/cli/dist/components/Tooltip.js.map +1 -0
  127. package/cli/dist/components/index.d.ts +8 -0
  128. package/cli/dist/components/index.d.ts.map +1 -0
  129. package/cli/dist/components/index.js +8 -0
  130. package/cli/dist/components/index.js.map +1 -0
  131. package/cli/dist/config/platform-standards.d.ts +159 -0
  132. package/cli/dist/config/platform-standards.d.ts.map +1 -0
  133. package/cli/dist/config/platform-standards.js +181 -0
  134. package/cli/dist/config/platform-standards.js.map +1 -0
  135. package/cli/dist/generator/extension-fetch.d.ts +25 -0
  136. package/cli/dist/generator/extension-fetch.d.ts.map +1 -0
  137. package/cli/dist/generator/extension-fetch.js +259 -0
  138. package/cli/dist/generator/extension-fetch.js.map +1 -0
  139. package/cli/dist/generator/template-engine.d.ts +62 -0
  140. package/cli/dist/generator/template-engine.d.ts.map +1 -0
  141. package/cli/dist/generator/template-engine.js +623 -0
  142. package/cli/dist/generator/template-engine.js.map +1 -0
  143. package/cli/dist/index.d.ts +11 -0
  144. package/cli/dist/index.d.ts.map +1 -0
  145. package/cli/dist/index.js +11 -0
  146. package/cli/dist/index.js.map +1 -0
  147. package/cli/dist/types/index.d.ts +257 -0
  148. package/cli/dist/types/index.d.ts.map +1 -0
  149. package/cli/dist/types/index.js +17 -0
  150. package/cli/dist/types/index.js.map +1 -0
  151. package/cli/dist/utils/cache.d.ts +19 -0
  152. package/cli/dist/utils/cache.d.ts.map +1 -0
  153. package/cli/dist/utils/cache.js +64 -0
  154. package/cli/dist/utils/cache.js.map +1 -0
  155. package/cli/dist/utils/command-helpers.d.ts +17 -0
  156. package/cli/dist/utils/command-helpers.d.ts.map +1 -0
  157. package/cli/dist/utils/command-helpers.js +41 -0
  158. package/cli/dist/utils/command-helpers.js.map +1 -0
  159. package/cli/dist/utils/constants.d.ts +53 -0
  160. package/cli/dist/utils/constants.d.ts.map +1 -0
  161. package/cli/dist/utils/constants.js +115 -0
  162. package/cli/dist/utils/constants.js.map +1 -0
  163. package/cli/dist/utils/discovery-context.d.ts +4 -0
  164. package/cli/dist/utils/discovery-context.d.ts.map +1 -0
  165. package/cli/dist/utils/discovery-context.js +39 -0
  166. package/cli/dist/utils/discovery-context.js.map +1 -0
  167. package/cli/dist/utils/docker.d.ts +4 -0
  168. package/cli/dist/utils/docker.d.ts.map +1 -0
  169. package/cli/dist/utils/docker.js +19 -0
  170. package/cli/dist/utils/docker.js.map +1 -0
  171. package/cli/dist/utils/doctor-runtime.d.ts +81 -0
  172. package/cli/dist/utils/doctor-runtime.d.ts.map +1 -0
  173. package/cli/dist/utils/doctor-runtime.js +498 -0
  174. package/cli/dist/utils/doctor-runtime.js.map +1 -0
  175. package/cli/dist/utils/env-validator.d.ts +15 -0
  176. package/cli/dist/utils/env-validator.d.ts.map +1 -0
  177. package/cli/dist/utils/env-validator.js +109 -0
  178. package/cli/dist/utils/env-validator.js.map +1 -0
  179. package/cli/dist/utils/errors.d.ts +31 -0
  180. package/cli/dist/utils/errors.d.ts.map +1 -0
  181. package/cli/dist/utils/errors.js +140 -0
  182. package/cli/dist/utils/errors.js.map +1 -0
  183. package/cli/dist/utils/file-helpers.d.ts +14 -0
  184. package/cli/dist/utils/file-helpers.d.ts.map +1 -0
  185. package/cli/dist/utils/file-helpers.js +45 -0
  186. package/cli/dist/utils/file-helpers.js.map +1 -0
  187. package/cli/dist/utils/formatting.d.ts +30 -0
  188. package/cli/dist/utils/formatting.d.ts.map +1 -0
  189. package/cli/dist/utils/formatting.js +164 -0
  190. package/cli/dist/utils/formatting.js.map +1 -0
  191. package/cli/dist/utils/paths.d.ts +3 -0
  192. package/cli/dist/utils/paths.d.ts.map +1 -0
  193. package/cli/dist/utils/paths.js +41 -0
  194. package/cli/dist/utils/paths.js.map +1 -0
  195. package/cli/dist/utils/port-assignment.d.ts +6 -0
  196. package/cli/dist/utils/port-assignment.d.ts.map +1 -0
  197. package/cli/dist/utils/port-assignment.js +81 -0
  198. package/cli/dist/utils/port-assignment.js.map +1 -0
  199. package/cli/dist/utils/project-features.d.ts +23 -0
  200. package/cli/dist/utils/project-features.d.ts.map +1 -0
  201. package/cli/dist/utils/project-features.js +98 -0
  202. package/cli/dist/utils/project-features.js.map +1 -0
  203. package/cli/dist/utils/project-templates.d.ts +7 -0
  204. package/cli/dist/utils/project-templates.d.ts.map +1 -0
  205. package/cli/dist/utils/project-templates.js +24 -0
  206. package/cli/dist/utils/project-templates.js.map +1 -0
  207. package/cli/dist/utils/prompt.d.ts +28 -0
  208. package/cli/dist/utils/prompt.d.ts.map +1 -0
  209. package/cli/dist/utils/prompt.js +79 -0
  210. package/cli/dist/utils/prompt.js.map +1 -0
  211. package/cli/dist/utils/resource-features.d.ts +29 -0
  212. package/cli/dist/utils/resource-features.d.ts.map +1 -0
  213. package/cli/dist/utils/resource-features.js +175 -0
  214. package/cli/dist/utils/resource-features.js.map +1 -0
  215. package/cli/dist/utils/service-urls.d.ts +30 -0
  216. package/cli/dist/utils/service-urls.d.ts.map +1 -0
  217. package/cli/dist/utils/service-urls.js +93 -0
  218. package/cli/dist/utils/service-urls.js.map +1 -0
  219. package/cli/dist/utils/services.d.ts +18 -0
  220. package/cli/dist/utils/services.d.ts.map +1 -0
  221. package/cli/dist/utils/services.js +292 -0
  222. package/cli/dist/utils/services.js.map +1 -0
  223. package/cli/dist/utils/stack-features.d.ts +22 -0
  224. package/cli/dist/utils/stack-features.d.ts.map +1 -0
  225. package/cli/dist/utils/stack-features.js +13 -0
  226. package/cli/dist/utils/stack-features.js.map +1 -0
  227. package/cli/dist/utils/tar.d.ts +7 -0
  228. package/cli/dist/utils/tar.d.ts.map +1 -0
  229. package/cli/dist/utils/tar.js +21 -0
  230. package/cli/dist/utils/tar.js.map +1 -0
  231. package/cli/dist/utils/tilt.d.ts +20 -0
  232. package/cli/dist/utils/tilt.d.ts.map +1 -0
  233. package/cli/dist/utils/tilt.js +95 -0
  234. package/cli/dist/utils/tilt.js.map +1 -0
  235. package/cli/dist/utils/validation.d.ts +16 -0
  236. package/cli/dist/utils/validation.d.ts.map +1 -0
  237. package/cli/dist/utils/validation.js +58 -0
  238. package/cli/dist/utils/validation.js.map +1 -0
  239. package/cli/package.json +11 -12
  240. package/cli/src/commands/__tests__/always-enabled-infra.test.ts +2 -8
  241. package/cli/src/commands/__tests__/doctor.test.ts +181 -8
  242. package/cli/src/commands/__tests__/phases-model.test.ts +2 -4
  243. package/cli/src/commands/__tests__/project-resource-features-e2e.test.ts +4 -24
  244. package/cli/src/commands/__tests__/saas-starter-integration.test.ts +8 -10
  245. package/cli/src/commands/__tests__/stack-features-e2e.test.ts +10 -4
  246. package/cli/src/commands/__tests__/upgrade.test.ts +23 -13
  247. package/cli/src/commands/doctor.ts +136 -0
  248. package/cli/src/commands/help.ts +13 -3
  249. package/cli/src/commands/project.ts +11 -14
  250. package/cli/src/commands/projects.ts +2 -2
  251. package/cli/src/commands/up.ts +13 -4
  252. package/cli/src/commands/upgrade.ts +11 -4
  253. package/cli/src/config/platform-standards.test.ts +6 -6
  254. package/cli/src/generator/__tests__/extension-fetch.test.ts +36 -14
  255. package/cli/src/generator/extension-fetch.ts +12 -5
  256. package/cli/src/generator/template-engine.ts +19 -21
  257. package/cli/src/types/index.ts +2 -0
  258. package/cli/src/utils/__tests__/tilt.test.ts +29 -0
  259. package/cli/src/utils/constants.ts +4 -0
  260. package/cli/src/utils/doctor-runtime.ts +67 -27
  261. package/cli/src/utils/env-validator.ts +2 -2
  262. package/cli/src/utils/project-templates.ts +2 -1
  263. package/cli/src/utils/prompt.ts +2 -4
  264. package/cli/src/utils/resource-features.ts +10 -4
  265. package/cli/src/utils/services.ts +2 -1
  266. package/cli/src/utils/tilt.ts +20 -0
  267. package/engine/assets/docker/wake-gateway/Dockerfile +26 -0
  268. package/engine/assets/docker/wake-gateway/decide.test.ts +87 -0
  269. package/engine/assets/docker/wake-gateway/decide.ts +75 -0
  270. package/engine/assets/docker/wake-gateway/server.ts +220 -0
  271. package/engine/topologies/platform/docker/build/golden_image_dockerfile.star +13 -23
  272. package/engine/topologies/platform/docker/compose/compose.star +7 -14
  273. package/engine/topologies/platform/docker/compose/compose_helpers.star +1 -1
  274. package/engine/topologies/platform/docker/compose/traefik_standalone.star +44 -6
  275. package/engine/topologies/platform/docker/config/healthcheck.star +56 -0
  276. package/engine/topologies/platform/docker/constants.star +10 -0
  277. package/engine/topologies/platform/docker/layers/l1_base_layers.star +1 -1
  278. package/engine/topologies/platform/docker/layers/l4_runtime_layers.star +55 -20
  279. package/engine/topologies/platform/docker/networking/traefik_static_routes.star +107 -0
  280. package/engine/topologies/tilt/generators/typescript/backend_tsconfig.star +2 -2
  281. package/engine/topologies/tilt/generators/typescript/frontend_tsconfig.star +1 -1
  282. package/engine/topologies/tilt/manifest/schema.star +6 -0
  283. package/engine/topologies/tilt/manifest/validator.star +16 -0
  284. package/engine/topologies/tilt/resources/orchestrator/apply_compose_resource_registration.star +107 -8
  285. package/engine/topologies/tilt/resources/orchestrator/builders/typescript.star +12 -6
  286. package/engine/topologies/tilt/resources/orchestrator/generators/manifest_resource.star +2 -1
  287. package/knip.json +1 -1
  288. package/openspec/changes/optimize-runtime-docker-layers/.openspec.yaml +3 -0
  289. package/openspec/changes/optimize-runtime-docker-layers/design.md +81 -0
  290. package/openspec/changes/optimize-runtime-docker-layers/proposal.md +44 -0
  291. package/openspec/changes/optimize-runtime-docker-layers/specs/runtime-container-footprint/spec.md +79 -0
  292. package/openspec/changes/optimize-runtime-docker-layers/tasks.md +36 -0
  293. package/openspec/changes/prioritized-cold-start/.openspec.yaml +4 -0
  294. package/openspec/changes/prioritized-cold-start/design.md +113 -0
  295. package/openspec/changes/prioritized-cold-start/proposal.md +40 -0
  296. package/openspec/changes/prioritized-cold-start/specs/on-demand-resource-startup/spec.md +92 -0
  297. package/openspec/changes/prioritized-cold-start/tasks.md +46 -0
  298. package/openspec/config.yaml +1 -0
  299. package/package.json +35 -5
  300. package/scripts/autoresearch/layer-eval.sh +65 -0
  301. package/scripts/benchmark/README.md +25 -0
  302. package/scripts/benchmark/container-scale.ts +503 -0
  303. package/scripts/benchmark/pre-release-gate.sh +9 -0
  304. package/scripts/measure-idle-footprint.sh +58 -0
  305. package/tests/tilt-engine/test_runtime_container_footprint.py +162 -0
  306. package/tests/tilt-engine/test_sablier_defer_start.py +196 -0
  307. package/tests/tilt-engine/test_standalone_traefik.py +38 -0
  308. package/tests/tilt-engine/test_traefik_static_wake_route.py +119 -0
  309. package/bun.lock +0 -538
@@ -0,0 +1,42 @@
1
+ # Contributing to TDK
2
+
3
+ Thanks for helping. Bug reports, docs fixes, and code changes are all welcome.
4
+
5
+ ## Ways to help
6
+
7
+ - **Report a bug or ask a question:** [open an issue](https://github.com/tdk-landscape/tdk-cli-core/issues/new/choose). Include the output of `tdk doctor`.
8
+ - **Pick up an issue:** look for [`good first issue`](https://github.com/tdk-landscape/tdk-cli-core/labels/good%20first%20issue) or [`help wanted`](https://github.com/tdk-landscape/tdk-cli-core/labels/help%20wanted). Comment on it so nobody duplicates your work.
9
+ - **Share what you built:** an example project or a blog post helps other people find TDK.
10
+
11
+ ## Development setup
12
+
13
+ You need [Bun](https://bun.sh), Node.js 22.12+, Docker, and [Tilt](https://docs.tilt.dev/install.html).
14
+
15
+ ```bash
16
+ git clone https://github.com/tdk-landscape/tdk-cli-core.git
17
+ cd tdk-cli-core/cli
18
+ bun install
19
+ npm run typecheck
20
+ npm run lint
21
+ npm test
22
+ ```
23
+
24
+ From the repo root, `make help` lists more targets (`make test-fast`, `make pre-commit-run`).
25
+
26
+ ## Where things live
27
+
28
+ - `cli/` is the `tdk` CLI (TypeScript). Conventions are in [cli/AGENTS.md](cli/AGENTS.md).
29
+ - `engine/` is the Starlark Tilt framework. Conventions are in [engine/AGENTS.md](engine/AGENTS.md).
30
+ - `discovery/` builds the resource and dependency graph from `service.json` files.
31
+
32
+ ## Pull requests
33
+
34
+ 1. Fork the repo and create a branch from `main`.
35
+ 2. Keep the change focused. One fix or feature per PR.
36
+ 3. Add or update tests for behavior changes.
37
+ 4. Make sure `npm run typecheck`, `npm run lint`, and `npm test` pass in `cli/`. CI runs the same checks.
38
+ 5. Describe what changed and why in the PR description.
39
+
40
+ ## Code of conduct
41
+
42
+ This project follows the [Code of Conduct](CODE_OF_CONDUCT.md). By taking part you agree to follow it.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 TDK Landscape
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,149 @@
1
+ <div align="center">
2
+
3
+ # TDK — Tilt Development Kit
4
+
5
+ **Run 100 microservices on a 16 GB laptop. No Kubernetes.**
6
+
7
+ One CLI that scaffolds your services and runs the whole landscape locally with hot reload, health checks, a proxy, and Postgres, all built on [Tilt](https://tilt.dev).
8
+
9
+ [![npm version](https://img.shields.io/npm/v/@tdk-landscape/tdk-cli-core.svg?style=flat&color=blue)](https://www.npmjs.com/package/@tdk-landscape/tdk-cli-core)
10
+ [![npm downloads](https://img.shields.io/npm/dm/@tdk-landscape/tdk-cli-core.svg?style=flat)](https://www.npmjs.com/package/@tdk-landscape/tdk-cli-core)
11
+ [![CI](https://github.com/tdk-landscape/tdk-cli-core/actions/workflows/ci.yml/badge.svg)](https://github.com/tdk-landscape/tdk-cli-core/actions/workflows/ci.yml)
12
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
13
+ [![GitHub stars](https://img.shields.io/github/stars/tdk-landscape/tdk-cli-core?style=flat&logo=github)](https://github.com/tdk-landscape/tdk-cli-core/stargazers)
14
+
15
+ [Website](https://tdk-landscape.github.io/tdk-website) · [Quickstart](https://tdk-landscape.github.io/tdk-website/docs/quickstart/) · [Examples](https://tdk-landscape.github.io/tdk-website/docs/examples/) · [Demo](https://tdk-landscape.github.io/tdk-demo-animation/) · [Report a bug](https://github.com/tdk-landscape/tdk-cli-core/issues/new/choose)
16
+
17
+ </div>
18
+
19
+ ```bash
20
+ npm install -g @tdk-landscape/tdk-cli-core
21
+ tdk project --yes # set up the project
22
+ tdk resource orders-api --type backend --stack shop # scaffold a service
23
+ tdk up shop # run it with hot reload
24
+ ```
25
+
26
+ > ⭐ **If TDK saves you from writing another `docker-compose.yml`, please [star the repo](https://github.com/tdk-landscape/tdk-cli-core/stargazers).** Stars help other developers find it.
27
+
28
+ This is the core monorepo for TDK: the `tdk` CLI, the Starlark-based Tilt orchestration engine that powers it, and the discovery system that turns a directory of services into a running local landscape.
29
+
30
+ ## Why TDK?
31
+
32
+ | | docker-compose | Local Kubernetes (kind, minikube) | Plain Tilt | **TDK** |
33
+ |---|---|---|---|---|
34
+ | Scaffold a new service in one command | ❌ | ❌ | ❌ | ✅ `tdk resource` |
35
+ | Hot reload on file change | ⚠️ `compose watch` config | ⚠️ extra tooling | ✅ | ✅ |
36
+ | Health-checked startup order | ⚠️ `depends_on` only | ✅ | ⚠️ write it yourself | ✅ |
37
+ | Proxy, Postgres, monitoring included | ❌ | ❌ | ❌ | ✅ |
38
+ | Needs a cluster | No | Yes | Optional | **No** |
39
+ | Start only one stack of a large system | ⚠️ profiles | ⚠️ | ⚠️ | ✅ `tdk up <stack>` |
40
+
41
+ ## Benchmark: 100 services on one laptop
42
+
43
+ Measured with [`scripts/benchmark/container-scale.ts`](scripts/benchmark/README.md) against the 100-service [ERP example](https://github.com/tdk-landscape/tdk-erp-system) on a 16 GB machine (Docker VM: 7.75 GiB). Raw results are in [`benchmarks/results/`](benchmarks/results).
44
+
45
+ | Services | All healthy after | Total memory | Avg memory / service | Crashes / OOM kills |
46
+ |---:|---:|---:|---:|---:|
47
+ | 10 | 8 s | 161 MiB | 16 MiB | 0 / 0 |
48
+ | 50 | 24 s | 829 MiB | 17 MiB | 0 / 0 |
49
+ | 100 | 112 s | 1.6 GiB | 17 MiB | 0 / 0 |
50
+
51
+ ## What is TDK?
52
+
53
+ TDK organizes microservices using a **Project → Stack → Resource** hierarchy, then uses Tilt to build, run, and hot-reload them locally:
54
+
55
+ ```
56
+ 📁 Project (1 per repo)
57
+ ├── TILT_RESOURCE_DEFAULTS.star # Ports, health checks, memory
58
+ ├── TILT_TECH_STACK.star # Bun, Vite, Prisma, NATS
59
+ │
60
+ └── 📦 Stacks (deployment groups)
61
+ ├── api-stack
62
+ │ ├── api-backend # Resource
63
+ │ └── web-frontend # Resource
64
+ │
65
+ └── worker-stack
66
+ ├── worker-backend
67
+ └── web-frontend
68
+ ```
69
+
70
+ Running `tdk resource` scaffolds a service (Dockerfile, TypeScript config, starter code, tests); `tdk up` hands the whole landscape to Tilt for orchestration, live-reload, and health checking — sized to fit dozens of services on a single laptop.
71
+
72
+ ## Install
73
+
74
+ ```bash
75
+ npm install -g @tdk-landscape/tdk-cli-core
76
+ # or
77
+ bun install -g @tdk-landscape/tdk-cli-core
78
+ ```
79
+
80
+ Or via the installer script:
81
+
82
+ ```bash
83
+ curl -fsSL https://raw.githubusercontent.com/tdk-landscape/tdk-cli-core/main/install.sh | bash
84
+ ```
85
+
86
+ ## Quick start
87
+
88
+ ```bash
89
+ cd my-project
90
+ tdk project # initialize master configs
91
+ tdk resource api-api --type backend --stack api # scaffold a backend
92
+ tdk resource api-app --type frontend --stack api # scaffold a frontend
93
+ tdk up api # start the stack via Tilt
94
+ tdk status # check what's running
95
+ ```
96
+
97
+ See the [CLI reference](cli/README.md) for the full command set (`stack`, `resources`, `doctor`, `ui`, and more).
98
+
99
+ ## Repository layout
100
+
101
+ This is a monorepo — most day-to-day CLI work happens under `cli/`, while `engine/` and `discovery/` implement the Tilt-side orchestration that the CLI drives.
102
+
103
+ | Path | What it is |
104
+ |------|------------|
105
+ | [`cli/`](cli) | The `tdk` CLI source (TypeScript/Bun) — commands, UI, templates. See [cli/README.md](cli/README.md). |
106
+ | [`engine/`](engine) | The Starlark Tilt framework: topology modules for Docker, networking, database virtualization, secrets, observability. See [engine/README.md](engine/README.md). |
107
+ | [`discovery/`](discovery) | Manifest-driven service discovery — scans `service.json` files and builds the resource/dependency graph consumed by the engine. |
108
+ | [`ext/`](ext) | Tilt extension (`ext://tdk-cli`) plus IDE/UI enhancement components. |
109
+ | [`scripts/`](scripts) | Release, benchmarking, and dev-environment scripts (git hooks, pre-commit, idle-footprint measurement). |
110
+ | [`benchmarks/`](benchmarks) | Container/landscape scale benchmarks. |
111
+ | [`docs/`](docs) | Reference docs, including [FEATURES.md](docs/FEATURES.md) for project- and resource-level feature flags. |
112
+ | [`Tiltfile`](Tiltfile) | Entry point that wires the engine into `tilt up`. |
113
+ | [`install.sh`](install.sh) | Standalone installer used by the `curl \| bash` flow above. |
114
+
115
+ ## Features
116
+
117
+ TDK ships a set of always-on infrastructure services (Traefik proxy, PostgreSQL) plus opt-in features — monitoring, ELK, Debezium CDC, a local npm registry, and more. Enable/disable them per-project via `.tdk/project.json`, or per-resource via each service's `service.json`. Full reference: [docs/FEATURES.md](docs/FEATURES.md).
118
+
119
+ ## Development
120
+
121
+ ```bash
122
+ make help # list all make targets
123
+ make test # run the full test suite
124
+ make test-fast # fast unit tests, no external deps
125
+ make pre-commit-run # run pre-commit hooks on all files
126
+ ```
127
+
128
+ `npm run typecheck` / `npm run lint` / `npm run test` delegate to the `cli/` workspace. See [cli/AGENTS.md](cli/AGENTS.md) for coding conventions if you're contributing to the CLI, and [engine/AGENTS.md](engine/AGENTS.md) for the Starlark topology framework.
129
+
130
+ ## Environment check
131
+
132
+ ```bash
133
+ tdk doctor
134
+ ```
135
+
136
+ Verifies Docker, Bun, Tilt, required ports, and master config files are all in place before you run `tdk up`.
137
+
138
+ ## Community
139
+
140
+ - **Questions and ideas:** [open an issue](https://github.com/tdk-landscape/tdk-cli-core/issues/new/choose).
141
+ - **Contributing:** see [CONTRIBUTING.md](CONTRIBUTING.md). Issues labeled [`good first issue`](https://github.com/tdk-landscape/tdk-cli-core/labels/good%20first%20issue) are a good place to start.
142
+ - **Security:** see [SECURITY.md](SECURITY.md). Please don't report vulnerabilities in public issues.
143
+ - **Examples:** [ERP system (100 services)](https://github.com/tdk-landscape/tdk-erp-system), [SaaS starter](https://github.com/tdk-landscape/tdk-saas-starter), [restaurant](https://github.com/tdk-landscape/tdk-restaurant-example).
144
+
145
+ If TDK is useful to you, a ⭐ helps more than you'd think.
146
+
147
+ ## License
148
+
149
+ [MIT](LICENSE) © [TDK Landscape](https://github.com/tdk-landscape)
package/SECURITY.md ADDED
@@ -0,0 +1,17 @@
1
+ # Security Policy
2
+
3
+ ## Supported versions
4
+
5
+ Security fixes go into the latest release published on [npm](https://www.npmjs.com/package/@tdk-landscape/tdk-cli-core). Please upgrade before reporting.
6
+
7
+ ## Reporting a vulnerability
8
+
9
+ Please **do not** open a public issue for security problems.
10
+
11
+ Report them privately through [GitHub security advisories](https://github.com/tdk-landscape/tdk-cli-core/security/advisories/new). Include:
12
+
13
+ - the TDK version (`tdk --version`) and your OS
14
+ - steps to reproduce
15
+ - what an attacker could do with it
16
+
17
+ We aim to reply within a few days and will credit you in the fix unless you prefer otherwise.
@@ -0,0 +1,45 @@
1
+ {
2
+ "date": "2026-09-25T20:54:49.736Z",
3
+ "hostMemGiB": 16,
4
+ "dockerMemMiB": 7934,
5
+ "perServiceBudgetMiB": 74,
6
+ "options": {
7
+ "project": "../tdk-erp-system",
8
+ "tiers": [
9
+ 5
10
+ ],
11
+ "gate": 5,
12
+ "timeoutSeconds": 240,
13
+ "interval": 30,
14
+ "startInterval": 2,
15
+ "settleSeconds": 5
16
+ },
17
+ "images": 107,
18
+ "singleProcessImageShare": 0.24299065420560748,
19
+ "results": [
20
+ {
21
+ "tier": 5,
22
+ "launchSeconds": 2.1,
23
+ "firstHealthySeconds": 3.3,
24
+ "allHealthySeconds": 4.4,
25
+ "healthy": 5,
26
+ "unhealthy": 0,
27
+ "starting": 0,
28
+ "crashed": 0,
29
+ "oomKilled": 0,
30
+ "crashes": [],
31
+ "totalMemMiB": 87,
32
+ "avgMemMiB": 17.4,
33
+ "totalCpuPct": 2.1,
34
+ "dockerPsMs": 101,
35
+ "requestMsP50": 2.2,
36
+ "loadAvg1m": 13.4,
37
+ "hostFreeMiB": 76,
38
+ "singleProcessShare": 0.2
39
+ }
40
+ ],
41
+ "gate": {
42
+ "tier": 5,
43
+ "passed": true
44
+ }
45
+ }
@@ -0,0 +1,150 @@
1
+ {
2
+ "date": "2026-09-25T21:01:20.540Z",
3
+ "hostMemGiB": 16,
4
+ "dockerMemMiB": 7934,
5
+ "perServiceBudgetMiB": 74,
6
+ "options": {
7
+ "project": "../tdk-erp-system",
8
+ "tiers": [
9
+ 5,
10
+ 10,
11
+ 20,
12
+ 50,
13
+ 80,
14
+ 100
15
+ ],
16
+ "gate": 100,
17
+ "timeoutSeconds": 240,
18
+ "interval": 30,
19
+ "startInterval": 2,
20
+ "settleSeconds": 15
21
+ },
22
+ "images": 107,
23
+ "singleProcessImageShare": 0.24299065420560748,
24
+ "results": [
25
+ {
26
+ "tier": 5,
27
+ "launchSeconds": 2.2,
28
+ "firstHealthySeconds": 3.4,
29
+ "allHealthySeconds": 4.5,
30
+ "healthy": 5,
31
+ "unhealthy": 0,
32
+ "starting": 0,
33
+ "crashed": 0,
34
+ "oomKilled": 0,
35
+ "crashes": [],
36
+ "totalMemMiB": 77,
37
+ "avgMemMiB": 15.5,
38
+ "totalCpuPct": 1.6,
39
+ "dockerPsMs": 142,
40
+ "requestMsP50": 4.1,
41
+ "loadAvg1m": 9.25,
42
+ "hostFreeMiB": 106,
43
+ "singleProcessShare": 0.2
44
+ },
45
+ {
46
+ "tier": 10,
47
+ "launchSeconds": 5.8,
48
+ "firstHealthySeconds": 5.9,
49
+ "allHealthySeconds": 8.1,
50
+ "healthy": 10,
51
+ "unhealthy": 0,
52
+ "starting": 0,
53
+ "crashed": 0,
54
+ "oomKilled": 0,
55
+ "crashes": [],
56
+ "totalMemMiB": 161,
57
+ "avgMemMiB": 16.1,
58
+ "totalCpuPct": 4.3,
59
+ "dockerPsMs": 100,
60
+ "requestMsP50": 4.8,
61
+ "loadAvg1m": 8.14,
62
+ "hostFreeMiB": 75,
63
+ "singleProcessShare": 0.3
64
+ },
65
+ {
66
+ "tier": 20,
67
+ "launchSeconds": 10.1,
68
+ "firstHealthySeconds": 10.3,
69
+ "allHealthySeconds": 12.5,
70
+ "healthy": 20,
71
+ "unhealthy": 0,
72
+ "starting": 0,
73
+ "crashed": 0,
74
+ "oomKilled": 0,
75
+ "crashes": [],
76
+ "totalMemMiB": 315,
77
+ "avgMemMiB": 15.8,
78
+ "totalCpuPct": 7.4,
79
+ "dockerPsMs": 110,
80
+ "requestMsP50": 3.8,
81
+ "loadAvg1m": 6.8,
82
+ "hostFreeMiB": 112,
83
+ "singleProcessShare": 0.7
84
+ },
85
+ {
86
+ "tier": 50,
87
+ "launchSeconds": 21.2,
88
+ "firstHealthySeconds": 21.5,
89
+ "allHealthySeconds": 23.9,
90
+ "healthy": 50,
91
+ "unhealthy": 0,
92
+ "starting": 0,
93
+ "crashed": 0,
94
+ "oomKilled": 0,
95
+ "crashes": [],
96
+ "totalMemMiB": 829,
97
+ "avgMemMiB": 16.6,
98
+ "totalCpuPct": 28.1,
99
+ "dockerPsMs": 140,
100
+ "requestMsP50": 2.3,
101
+ "loadAvg1m": 8.2,
102
+ "hostFreeMiB": 72,
103
+ "singleProcessShare": 0.4
104
+ },
105
+ {
106
+ "tier": 80,
107
+ "launchSeconds": 50,
108
+ "firstHealthySeconds": 50.6,
109
+ "allHealthySeconds": 53.3,
110
+ "healthy": 80,
111
+ "unhealthy": 0,
112
+ "starting": 0,
113
+ "crashed": 0,
114
+ "oomKilled": 0,
115
+ "crashes": [],
116
+ "totalMemMiB": 1334,
117
+ "avgMemMiB": 16.7,
118
+ "totalCpuPct": 37.3,
119
+ "dockerPsMs": 451,
120
+ "requestMsP50": 15.2,
121
+ "loadAvg1m": 10.43,
122
+ "hostFreeMiB": 114,
123
+ "singleProcessShare": 0.3
124
+ },
125
+ {
126
+ "tier": 100,
127
+ "launchSeconds": 109.6,
128
+ "firstHealthySeconds": 110.7,
129
+ "allHealthySeconds": 112.2,
130
+ "healthy": 100,
131
+ "unhealthy": 0,
132
+ "starting": 0,
133
+ "crashed": 0,
134
+ "oomKilled": 0,
135
+ "crashes": [],
136
+ "totalMemMiB": 1678,
137
+ "avgMemMiB": 16.8,
138
+ "totalCpuPct": 117.5,
139
+ "dockerPsMs": 1538,
140
+ "requestMsP50": 8.5,
141
+ "loadAvg1m": 14.9,
142
+ "hostFreeMiB": 61,
143
+ "singleProcessShare": 0.2
144
+ }
145
+ ],
146
+ "gate": {
147
+ "tier": 100,
148
+ "passed": true
149
+ }
150
+ }
@@ -0,0 +1,73 @@
1
+ {
2
+ "date": "2026-09-25T21:15:01.442Z",
3
+ "hostMemGiB": 16,
4
+ "dockerMemMiB": 7934,
5
+ "perServiceBudgetMiB": 74,
6
+ "options": {
7
+ "mode": "synthetic",
8
+ "project": "../tdk-erp-system",
9
+ "tiers": [
10
+ 20
11
+ ],
12
+ "gate": 20,
13
+ "timeoutSeconds": 240,
14
+ "interval": 30,
15
+ "startInterval": 2,
16
+ "settleSeconds": 15
17
+ },
18
+ "images": 107,
19
+ "imageStats": {
20
+ "backend": {
21
+ "count": 100,
22
+ "min": 191,
23
+ "avg": 245,
24
+ "max": 263
25
+ },
26
+ "frontend": {
27
+ "count": 7,
28
+ "min": 89,
29
+ "avg": 89,
30
+ "max": 89
31
+ },
32
+ "backendSingleProcess": {
33
+ "count": 26,
34
+ "min": 191,
35
+ "avg": 194,
36
+ "max": 263
37
+ },
38
+ "backendWrapper": {
39
+ "count": 74,
40
+ "min": 263,
41
+ "avg": 263,
42
+ "max": 263
43
+ }
44
+ },
45
+ "diskUsage": "Images 6.653GB",
46
+ "singleProcessImageShare": 0.308411214953271,
47
+ "results": [
48
+ {
49
+ "tier": 20,
50
+ "launchSeconds": 11.3,
51
+ "firstHealthySeconds": 11.8,
52
+ "allHealthySeconds": 14.4,
53
+ "healthy": 20,
54
+ "unhealthy": 0,
55
+ "starting": 0,
56
+ "crashed": 0,
57
+ "oomKilled": 0,
58
+ "crashes": [],
59
+ "totalMemMiB": 312,
60
+ "avgMemMiB": 15.6,
61
+ "totalCpuPct": 6,
62
+ "dockerPsMs": 156,
63
+ "requestMsP50": 1.7,
64
+ "loadAvg1m": 11.09,
65
+ "hostFreeMiB": 110,
66
+ "singleProcessShare": 1
67
+ }
68
+ ],
69
+ "gate": {
70
+ "tier": 20,
71
+ "passed": true
72
+ }
73
+ }
@@ -0,0 +1,77 @@
1
+ {
2
+ "date": "2026-09-25T22:09:01.631Z",
3
+ "hostMemGiB": 16,
4
+ "dockerMemMiB": 7934,
5
+ "perServiceBudgetMiB": 74,
6
+ "options": {
7
+ "mode": "compose",
8
+ "project": "../tdk-erp-system",
9
+ "tiers": [
10
+ 5
11
+ ],
12
+ "gate": 5,
13
+ "timeoutSeconds": 240,
14
+ "interval": 30,
15
+ "startInterval": 2,
16
+ "settleSeconds": 5
17
+ },
18
+ "images": 107,
19
+ "imageStats": {
20
+ "backend": {
21
+ "count": 100,
22
+ "min": 176,
23
+ "avg": 242,
24
+ "max": 263
25
+ },
26
+ "frontend": {
27
+ "count": 7,
28
+ "min": 89,
29
+ "avg": 89,
30
+ "max": 89
31
+ },
32
+ "backendSingleProcess": {
33
+ "count": 26,
34
+ "min": 176,
35
+ "avg": 183,
36
+ "max": 263
37
+ },
38
+ "backendWrapper": {
39
+ "count": 74,
40
+ "min": 263,
41
+ "avg": 263,
42
+ "max": 263
43
+ }
44
+ },
45
+ "diskUsage": "Images 6.56GB",
46
+ "singleProcessImageShare": 0.308411214953271,
47
+ "results": [
48
+ {
49
+ "tier": 5,
50
+ "launchSeconds": 2.2,
51
+ "firstHealthySeconds": 3.8,
52
+ "allHealthySeconds": 4.9,
53
+ "healthy": 5,
54
+ "unhealthy": 0,
55
+ "starting": 0,
56
+ "crashed": 0,
57
+ "oomKilled": 0,
58
+ "crashes": [],
59
+ "totalMemMiB": 75,
60
+ "avgMemMiB": 14.9,
61
+ "totalCpuPct": 2.4,
62
+ "dockerPsMs": 101,
63
+ "requestMsP50": 3.1,
64
+ "loadAvg1m": 5.12,
65
+ "hostFreeMiB": 148,
66
+ "singleProcessShare": 1,
67
+ "routed": {
68
+ "200": 5
69
+ },
70
+ "restarts": 0
71
+ }
72
+ ],
73
+ "gate": {
74
+ "tier": 5,
75
+ "passed": true
76
+ }
77
+ }