vibecarbon 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 (495) hide show
  1. package/LICENSE +663 -0
  2. package/README.md +188 -0
  3. package/carbon/.claude/hooks/task-completed-gate.sh +19 -0
  4. package/carbon/.claude/hooks/teammate-idle-gate.sh +29 -0
  5. package/carbon/.claude/settings.json +29 -0
  6. package/carbon/.cursor/rules/vibecarbon.mdc +6 -0
  7. package/carbon/.dockerignore +57 -0
  8. package/carbon/.env.example +219 -0
  9. package/carbon/.github/copilot-instructions.md +3 -0
  10. package/carbon/.github/workflows/deploy.yml +346 -0
  11. package/carbon/.github/workflows/vibecarbon-build.yml +81 -0
  12. package/carbon/.windsurfrules +74 -0
  13. package/carbon/AGENTS.md +422 -0
  14. package/carbon/CLAUDE.md +3 -0
  15. package/carbon/DEVELOPMENT.md +187 -0
  16. package/carbon/Dockerfile +98 -0
  17. package/carbon/LICENSE +21 -0
  18. package/carbon/PRODUCTION.md +364 -0
  19. package/carbon/README.md +193 -0
  20. package/carbon/TESTING.md +138 -0
  21. package/carbon/backup/Dockerfile +75 -0
  22. package/carbon/backup/backup.sh +95 -0
  23. package/carbon/backup/compose-backup.sh +140 -0
  24. package/carbon/biome.json +83 -0
  25. package/carbon/cloud-init/docker-ce-setup.yaml +55 -0
  26. package/carbon/cloud-init/k3s/master-init.sh +215 -0
  27. package/carbon/cloud-init/k3s/supabase-init.sh +167 -0
  28. package/carbon/cloud-init/k3s/worker-init.sh +147 -0
  29. package/carbon/components.json +24 -0
  30. package/carbon/content/blog/authentication-guide.mdx +34 -0
  31. package/carbon/content/blog/getting-started.mdx +41 -0
  32. package/carbon/content/changelog/v0-1-0.mdx +40 -0
  33. package/carbon/content/docs/analytics.mdx +90 -0
  34. package/carbon/content/docs/authentication.mdx +231 -0
  35. package/carbon/content/docs/background-jobs.mdx +116 -0
  36. package/carbon/content/docs/cli.mdx +630 -0
  37. package/carbon/content/docs/database.mdx +236 -0
  38. package/carbon/content/docs/deployment.mdx +227 -0
  39. package/carbon/content/docs/development.mdx +238 -0
  40. package/carbon/content/docs/environments.mdx +84 -0
  41. package/carbon/content/docs/getting-started.mdx +112 -0
  42. package/carbon/content/docs/legal/privacy-policy.mdx +89 -0
  43. package/carbon/content/docs/legal/terms-of-service.mdx +99 -0
  44. package/carbon/content/docs/optional-services.mdx +160 -0
  45. package/carbon/db/Dockerfile +23 -0
  46. package/carbon/docker-compose.dev-init.yml +5 -0
  47. package/carbon/docker-compose.metabase.override.yml +14 -0
  48. package/carbon/docker-compose.metabase.prod.yml +28 -0
  49. package/carbon/docker-compose.metabase.yml +84 -0
  50. package/carbon/docker-compose.n8n.override.yml +14 -0
  51. package/carbon/docker-compose.n8n.prod.yml +31 -0
  52. package/carbon/docker-compose.n8n.yml +97 -0
  53. package/carbon/docker-compose.observability.override.yml +18 -0
  54. package/carbon/docker-compose.observability.prod.yml +28 -0
  55. package/carbon/docker-compose.observability.yml +125 -0
  56. package/carbon/docker-compose.override.yml +28 -0
  57. package/carbon/docker-compose.prod.yml +294 -0
  58. package/carbon/docker-compose.yml +508 -0
  59. package/carbon/docker-entrypoint.sh +12 -0
  60. package/carbon/ha/activate-standby.sh +52 -0
  61. package/carbon/ha/primary-init.sql +36 -0
  62. package/carbon/ha/standby-init.sh +74 -0
  63. package/carbon/k8s/LICENSE +99 -0
  64. package/carbon/k8s/README.md +272 -0
  65. package/carbon/k8s/base/app/deployment.yaml +130 -0
  66. package/carbon/k8s/base/app/hpa.yaml +44 -0
  67. package/carbon/k8s/base/app/kustomization.yaml +10 -0
  68. package/carbon/k8s/base/app/network-policy.yaml +124 -0
  69. package/carbon/k8s/base/app/pdb.yaml +14 -0
  70. package/carbon/k8s/base/app/rbac.yaml +36 -0
  71. package/carbon/k8s/base/app/service.yaml +16 -0
  72. package/carbon/k8s/base/backup/cronjob.yaml +120 -0
  73. package/carbon/k8s/base/backup/kustomization.yaml +7 -0
  74. package/carbon/k8s/base/backup/network-policy.yaml +31 -0
  75. package/carbon/k8s/base/backup/rbac.yaml +7 -0
  76. package/carbon/k8s/base/cluster-autoscaler/deployment.yaml +103 -0
  77. package/carbon/k8s/base/cluster-autoscaler/kustomization.yaml +17 -0
  78. package/carbon/k8s/base/cluster-autoscaler/rbac.yaml +109 -0
  79. package/carbon/k8s/base/config/configmap.yaml +48 -0
  80. package/carbon/k8s/base/config/kustomization.yaml +8 -0
  81. package/carbon/k8s/base/hetzner-ccm/kustomization.yaml +9 -0
  82. package/carbon/k8s/base/hetzner-csi/kustomization.yaml +9 -0
  83. package/carbon/k8s/base/kustomization.yaml +43 -0
  84. package/carbon/k8s/base/namespace.yaml +7 -0
  85. package/carbon/k8s/base/network-policies.yaml +95 -0
  86. package/carbon/k8s/base/registry/kustomization.yaml +5 -0
  87. package/carbon/k8s/base/registry/local-registry.yaml +193 -0
  88. package/carbon/k8s/base/traefik/certificate.yaml +21 -0
  89. package/carbon/k8s/base/traefik/configmap.yaml +13 -0
  90. package/carbon/k8s/base/traefik/deployment.yaml +165 -0
  91. package/carbon/k8s/base/traefik/ingressroute.yaml +141 -0
  92. package/carbon/k8s/base/traefik/kustomization.yaml +11 -0
  93. package/carbon/k8s/base/traefik/middleware.yaml +109 -0
  94. package/carbon/k8s/base/traefik/network-policy.yaml +92 -0
  95. package/carbon/k8s/base/traefik/service.yaml +38 -0
  96. package/carbon/k8s/flux/README.md +49 -0
  97. package/carbon/k8s/flux/clusters/primary/vibecarbon.yaml +128 -0
  98. package/carbon/k8s/flux/clusters/standby/vibecarbon.yaml +83 -0
  99. package/carbon/k8s/gitops/cert-manager-webhook-hetzner/helm-release.yaml +38 -0
  100. package/carbon/k8s/gitops/cert-manager-webhook-hetzner/helm-repository.yaml +16 -0
  101. package/carbon/k8s/gitops/cert-manager-webhook-hetzner/kustomization.yaml +10 -0
  102. package/carbon/k8s/gitops/supabase/helm-release.yaml +66 -0
  103. package/carbon/k8s/gitops/supabase/helm-repository.yaml +18 -0
  104. package/carbon/k8s/gitops/supabase/kustomization.yaml +33 -0
  105. package/carbon/k8s/infra/cert-manager-resources/cluster-issuers-cloudflare.yaml +51 -0
  106. package/carbon/k8s/infra/cert-manager-resources/cluster-issuers-hetzner.yaml +59 -0
  107. package/carbon/k8s/infra/cert-manager-resources/cluster-issuers-manual.yaml +43 -0
  108. package/carbon/k8s/infra/cert-manager-resources/kustomization.yaml +15 -0
  109. package/carbon/k8s/infra/kustomization.yaml +21 -0
  110. package/carbon/k8s/infra/traefik-crds/kustomization.yaml +10 -0
  111. package/carbon/k8s/overlays/local/configmap.yaml +23 -0
  112. package/carbon/k8s/overlays/local/ingressroute-studio.yaml +104 -0
  113. package/carbon/k8s/overlays/local/kustomization.yaml +215 -0
  114. package/carbon/k8s/overlays/local/namespace.yaml +8 -0
  115. package/carbon/k8s/overlays/local/secrets.yaml +32 -0
  116. package/carbon/k8s/overlays/production/kustomization.yaml +34 -0
  117. package/carbon/k8s/test-local.sh +318 -0
  118. package/carbon/k8s/values/supabase.values.yaml +133 -0
  119. package/carbon/package.json +154 -0
  120. package/carbon/runtime.Dockerfile +17 -0
  121. package/carbon/scripts/_dev-jwt.mjs +45 -0
  122. package/carbon/scripts/check-rls.ts +53 -0
  123. package/carbon/scripts/dev-init.js +191 -0
  124. package/carbon/scripts/dev.js +191 -0
  125. package/carbon/scripts/docker-down.js +63 -0
  126. package/carbon/scripts/docker-logs.js +59 -0
  127. package/carbon/scripts/docker-up.js +222 -0
  128. package/carbon/scripts/generate-dev-configs.sh +131 -0
  129. package/carbon/scripts/generate-rss.ts +116 -0
  130. package/carbon/scripts/generate-sitemap.ts +102 -0
  131. package/carbon/scripts/k8s-apply.js +71 -0
  132. package/carbon/scripts/k8s-delete.js +75 -0
  133. package/carbon/scripts/lib/manifest.js +176 -0
  134. package/carbon/scripts/secret-scan.mjs +278 -0
  135. package/carbon/scripts/validate-dev-configs.sh +101 -0
  136. package/carbon/src/client/App.tsx +202 -0
  137. package/carbon/src/client/assets/hyperformant-dark.svg +29 -0
  138. package/carbon/src/client/assets/hyperformant-light.svg +29 -0
  139. package/carbon/src/client/assets/logos/aider.svg +1 -0
  140. package/carbon/src/client/assets/logos/antigravity.svg +1 -0
  141. package/carbon/src/client/assets/logos/bolt.svg +1 -0
  142. package/carbon/src/client/assets/logos/claude-code.svg +1 -0
  143. package/carbon/src/client/assets/logos/copilot.svg +1 -0
  144. package/carbon/src/client/assets/logos/cursor.svg +1 -0
  145. package/carbon/src/client/assets/logos/gemini-cli.svg +1 -0
  146. package/carbon/src/client/assets/logos/lovable.svg +1 -0
  147. package/carbon/src/client/assets/logos/openai-codex.svg +1 -0
  148. package/carbon/src/client/assets/logos/v0.svg +1 -0
  149. package/carbon/src/client/assets/logos/windsurf.svg +1 -0
  150. package/carbon/src/client/assets/vibecarbon-icon.svg +19 -0
  151. package/carbon/src/client/assets/vibecarbon-logo-dark.svg +29 -0
  152. package/carbon/src/client/assets/vibecarbon-logo-light.svg +29 -0
  153. package/carbon/src/client/components/AIIntegrationSection.tsx +120 -0
  154. package/carbon/src/client/components/AppSidebar.tsx +760 -0
  155. package/carbon/src/client/components/ArchitectureSection.tsx +46 -0
  156. package/carbon/src/client/components/CTAFooter.tsx +59 -0
  157. package/carbon/src/client/components/ComparisonSection.tsx +132 -0
  158. package/carbon/src/client/components/ContentPanel.tsx +66 -0
  159. package/carbon/src/client/components/ContentSkeleton.tsx +21 -0
  160. package/carbon/src/client/components/ErrorBoundary.tsx +46 -0
  161. package/carbon/src/client/components/FAQSection.tsx +76 -0
  162. package/carbon/src/client/components/FileUpload.tsx +210 -0
  163. package/carbon/src/client/components/HeaderActions.tsx +17 -0
  164. package/carbon/src/client/components/Hero.tsx +608 -0
  165. package/carbon/src/client/components/ImpersonationBanner.tsx +31 -0
  166. package/carbon/src/client/components/LanguageSwitcher.tsx +67 -0
  167. package/carbon/src/client/components/Logo.tsx +87 -0
  168. package/carbon/src/client/components/LogoStrip.tsx +76 -0
  169. package/carbon/src/client/components/MetricsStrip.tsx +48 -0
  170. package/carbon/src/client/components/Nav.tsx +195 -0
  171. package/carbon/src/client/components/NewsletterSignup.tsx +147 -0
  172. package/carbon/src/client/components/NotificationDrawer.tsx +171 -0
  173. package/carbon/src/client/components/PageHeader.tsx +24 -0
  174. package/carbon/src/client/components/PlanGate.tsx +36 -0
  175. package/carbon/src/client/components/PricingSection.tsx +371 -0
  176. package/carbon/src/client/components/SEO.tsx +34 -0
  177. package/carbon/src/client/components/SmoothScroll.tsx +45 -0
  178. package/carbon/src/client/components/TechStackSection.tsx +165 -0
  179. package/carbon/src/client/components/WorkflowSection.tsx +604 -0
  180. package/carbon/src/client/components/admin/DockerLogs.tsx +276 -0
  181. package/carbon/src/client/components/admin/PerformanceMetrics.tsx +230 -0
  182. package/carbon/src/client/components/admin/ServiceCard.tsx +45 -0
  183. package/carbon/src/client/components/admin/ServicesStatus.tsx +296 -0
  184. package/carbon/src/client/components/architecture/ArchitectureDiagram.tsx +413 -0
  185. package/carbon/src/client/components/auth/AuthProvider.tsx +466 -0
  186. package/carbon/src/client/components/effects/FilmGrainOverlay.tsx +35 -0
  187. package/carbon/src/client/components/effects/FresnelEdge.tsx +49 -0
  188. package/carbon/src/client/components/effects/GlowTracker.tsx +46 -0
  189. package/carbon/src/client/components/effects/SparkBurst.tsx +145 -0
  190. package/carbon/src/client/components/effects/VGlowEffect.tsx +83 -0
  191. package/carbon/src/client/components/effects/index.ts +2 -0
  192. package/carbon/src/client/components/layouts/SidebarLayout.tsx +20 -0
  193. package/carbon/src/client/components/scroll/ScrollSection.tsx +76 -0
  194. package/carbon/src/client/components/scroll/ScrollytellingProvider.tsx +81 -0
  195. package/carbon/src/client/components/scroll/index.ts +2 -0
  196. package/carbon/src/client/components/ui/accordion.tsx +71 -0
  197. package/carbon/src/client/components/ui/alert-dialog.tsx +162 -0
  198. package/carbon/src/client/components/ui/alert.tsx +73 -0
  199. package/carbon/src/client/components/ui/aspect-ratio.tsx +22 -0
  200. package/carbon/src/client/components/ui/avatar.tsx +91 -0
  201. package/carbon/src/client/components/ui/badge.tsx +50 -0
  202. package/carbon/src/client/components/ui/breadcrumb.tsx +100 -0
  203. package/carbon/src/client/components/ui/button-group.tsx +78 -0
  204. package/carbon/src/client/components/ui/button.tsx +120 -0
  205. package/carbon/src/client/components/ui/calendar.tsx +182 -0
  206. package/carbon/src/client/components/ui/card.tsx +85 -0
  207. package/carbon/src/client/components/ui/carousel.tsx +227 -0
  208. package/carbon/src/client/components/ui/chart.tsx +357 -0
  209. package/carbon/src/client/components/ui/checkbox.tsx +27 -0
  210. package/carbon/src/client/components/ui/collapsible.tsx +15 -0
  211. package/carbon/src/client/components/ui/command.tsx +178 -0
  212. package/carbon/src/client/components/ui/context-menu.tsx +233 -0
  213. package/carbon/src/client/components/ui/dialog.tsx +132 -0
  214. package/carbon/src/client/components/ui/drawer.tsx +118 -0
  215. package/carbon/src/client/components/ui/dropdown-menu.tsx +242 -0
  216. package/carbon/src/client/components/ui/empty.tsx +94 -0
  217. package/carbon/src/client/components/ui/field.tsx +226 -0
  218. package/carbon/src/client/components/ui/hover-card.tsx +44 -0
  219. package/carbon/src/client/components/ui/input-group.tsx +146 -0
  220. package/carbon/src/client/components/ui/input-otp.tsx +83 -0
  221. package/carbon/src/client/components/ui/input.tsx +20 -0
  222. package/carbon/src/client/components/ui/item.tsx +188 -0
  223. package/carbon/src/client/components/ui/kbd.tsx +26 -0
  224. package/carbon/src/client/components/ui/label.tsx +21 -0
  225. package/carbon/src/client/components/ui/menubar.tsx +250 -0
  226. package/carbon/src/client/components/ui/navigation-menu.tsx +155 -0
  227. package/carbon/src/client/components/ui/pagination.tsx +102 -0
  228. package/carbon/src/client/components/ui/popover.tsx +75 -0
  229. package/carbon/src/client/components/ui/progress.tsx +66 -0
  230. package/carbon/src/client/components/ui/radio-group.tsx +36 -0
  231. package/carbon/src/client/components/ui/resizable.tsx +46 -0
  232. package/carbon/src/client/components/ui/scroll-area.tsx +48 -0
  233. package/carbon/src/client/components/ui/select.tsx +186 -0
  234. package/carbon/src/client/components/ui/separator.tsx +21 -0
  235. package/carbon/src/client/components/ui/sheet.tsx +124 -0
  236. package/carbon/src/client/components/ui/sidebar.tsx +702 -0
  237. package/carbon/src/client/components/ui/skeleton.tsx +13 -0
  238. package/carbon/src/client/components/ui/slider.tsx +57 -0
  239. package/carbon/src/client/components/ui/sonner.tsx +45 -0
  240. package/carbon/src/client/components/ui/spinner.tsx +15 -0
  241. package/carbon/src/client/components/ui/switch.tsx +30 -0
  242. package/carbon/src/client/components/ui/table.tsx +89 -0
  243. package/carbon/src/client/components/ui/tabs.tsx +73 -0
  244. package/carbon/src/client/components/ui/textarea.tsx +18 -0
  245. package/carbon/src/client/components/ui/toggle-group.tsx +87 -0
  246. package/carbon/src/client/components/ui/toggle.tsx +44 -0
  247. package/carbon/src/client/components/ui/tooltip.tsx +56 -0
  248. package/carbon/src/client/hooks/api/index.ts +14 -0
  249. package/carbon/src/client/hooks/api/useAuthSettings.ts +80 -0
  250. package/carbon/src/client/hooks/api/useSubscription.ts +87 -0
  251. package/carbon/src/client/hooks/use-mobile.ts +21 -0
  252. package/carbon/src/client/hooks/useMousePosition.ts +91 -0
  253. package/carbon/src/client/hooks/useNotifications.tsx +124 -0
  254. package/carbon/src/client/hooks/useOrganizationMembers.ts +127 -0
  255. package/carbon/src/client/hooks/useOrganizations.tsx +230 -0
  256. package/carbon/src/client/hooks/usePackageManager.ts +69 -0
  257. package/carbon/src/client/hooks/useReducedMotion.ts +20 -0
  258. package/carbon/src/client/hooks/useRunningServices.ts +114 -0
  259. package/carbon/src/client/hooks/useScrollProgress.ts +56 -0
  260. package/carbon/src/client/index.css +467 -0
  261. package/carbon/src/client/index.html +56 -0
  262. package/carbon/src/client/lib/admin-services.ts +151 -0
  263. package/carbon/src/client/lib/api.ts +32 -0
  264. package/carbon/src/client/lib/blog.ts +35 -0
  265. package/carbon/src/client/lib/changelog.ts +33 -0
  266. package/carbon/src/client/lib/docs-search.ts +101 -0
  267. package/carbon/src/client/lib/docs.ts +37 -0
  268. package/carbon/src/client/lib/i18n.ts +32 -0
  269. package/carbon/src/client/lib/supabase.ts +72 -0
  270. package/carbon/src/client/lib/tailwind-colors.ts +357 -0
  271. package/carbon/src/client/lib/theme.ts +117 -0
  272. package/carbon/src/client/lib/utils.ts +22 -0
  273. package/carbon/src/client/locales/de.json +529 -0
  274. package/carbon/src/client/locales/en.json +461 -0
  275. package/carbon/src/client/locales/es.json +529 -0
  276. package/carbon/src/client/locales/fr.json +529 -0
  277. package/carbon/src/client/locales/pt.json +529 -0
  278. package/carbon/src/client/main.tsx +56 -0
  279. package/carbon/src/client/mdx.d.ts +13 -0
  280. package/carbon/src/client/pages/ApiDocs.tsx +76 -0
  281. package/carbon/src/client/pages/AuthCallback.tsx +34 -0
  282. package/carbon/src/client/pages/Blog.tsx +167 -0
  283. package/carbon/src/client/pages/Changelog.tsx +171 -0
  284. package/carbon/src/client/pages/Charts.tsx +388 -0
  285. package/carbon/src/client/pages/Checkout.tsx +227 -0
  286. package/carbon/src/client/pages/Contact.tsx +174 -0
  287. package/carbon/src/client/pages/Dashboard.tsx +368 -0
  288. package/carbon/src/client/pages/Docs.tsx +372 -0
  289. package/carbon/src/client/pages/ForgotPassword.tsx +111 -0
  290. package/carbon/src/client/pages/Home.tsx +187 -0
  291. package/carbon/src/client/pages/Legal.tsx +100 -0
  292. package/carbon/src/client/pages/Login.tsx +408 -0
  293. package/carbon/src/client/pages/MFAVerify.tsx +156 -0
  294. package/carbon/src/client/pages/NotFound.tsx +21 -0
  295. package/carbon/src/client/pages/Onboarding.tsx +246 -0
  296. package/carbon/src/client/pages/ResetPassword.tsx +200 -0
  297. package/carbon/src/client/pages/UIComponents.tsx +390 -0
  298. package/carbon/src/client/pages/admin/ContactSubmissions.tsx +220 -0
  299. package/carbon/src/client/pages/admin/Dashboard.tsx +24 -0
  300. package/carbon/src/client/pages/admin/Infrastructure.tsx +257 -0
  301. package/carbon/src/client/pages/admin/Jobs.tsx +225 -0
  302. package/carbon/src/client/pages/admin/Logs.tsx +18 -0
  303. package/carbon/src/client/pages/admin/Newsletter.tsx +300 -0
  304. package/carbon/src/client/pages/admin/Notifications.tsx +603 -0
  305. package/carbon/src/client/pages/admin/Organizations.tsx +306 -0
  306. package/carbon/src/client/pages/admin/Settings.tsx +314 -0
  307. package/carbon/src/client/pages/admin/Theme.tsx +465 -0
  308. package/carbon/src/client/pages/admin/Users.tsx +365 -0
  309. package/carbon/src/client/pages/api-docs.css +156 -0
  310. package/carbon/src/client/pages/organizations/Details.tsx +200 -0
  311. package/carbon/src/client/pages/organizations/Members.tsx +402 -0
  312. package/carbon/src/client/pages/settings/Billing.tsx +473 -0
  313. package/carbon/src/client/pages/settings/Profile.tsx +160 -0
  314. package/carbon/src/client/pages/settings/Security.tsx +341 -0
  315. package/carbon/src/client/public/favicon.svg +19 -0
  316. package/carbon/src/client/public/robots.txt +8 -0
  317. package/carbon/src/server/billing/index.ts +104 -0
  318. package/carbon/src/server/billing/provider.ts +81 -0
  319. package/carbon/src/server/billing/providers/paddle.ts +314 -0
  320. package/carbon/src/server/billing/providers/polar.ts +325 -0
  321. package/carbon/src/server/billing/providers/stripe.ts +233 -0
  322. package/carbon/src/server/emails/templates.ts +116 -0
  323. package/carbon/src/server/index.ts +554 -0
  324. package/carbon/src/server/lib/auth.ts +6 -0
  325. package/carbon/src/server/lib/email.ts +64 -0
  326. package/carbon/src/server/lib/env.ts +112 -0
  327. package/carbon/src/server/lib/errors.ts +21 -0
  328. package/carbon/src/server/lib/logger.ts +17 -0
  329. package/carbon/src/server/lib/rate-limiter.ts +288 -0
  330. package/carbon/src/server/lib/request.ts +34 -0
  331. package/carbon/src/server/lib/stripe.ts +42 -0
  332. package/carbon/src/server/lib/supabase.ts +65 -0
  333. package/carbon/src/server/middleware/requirePlan.ts +80 -0
  334. package/carbon/src/server/routes/_internal/services-status.ts +958 -0
  335. package/carbon/src/server/routes/_internal/verify-role.ts +185 -0
  336. package/carbon/src/server/routes/health.ts +48 -0
  337. package/carbon/src/server/routes/v1/admin/contact.ts +128 -0
  338. package/carbon/src/server/routes/v1/admin/jobs.ts +171 -0
  339. package/carbon/src/server/routes/v1/admin/newsletter.ts +237 -0
  340. package/carbon/src/server/routes/v1/auth.ts +390 -0
  341. package/carbon/src/server/routes/v1/billing.ts +718 -0
  342. package/carbon/src/server/routes/v1/contact.ts +93 -0
  343. package/carbon/src/server/routes/v1/index.ts +1333 -0
  344. package/carbon/src/server/routes/v1/newsletter.ts +181 -0
  345. package/carbon/src/server/routes/v1/performance.ts +157 -0
  346. package/carbon/src/server/routes/v1/stats.ts +170 -0
  347. package/carbon/src/server/routes/v1/theme.ts +106 -0
  348. package/carbon/src/server/routes/webhooks/billing.ts +376 -0
  349. package/carbon/src/server/routes/webhooks/stripe.ts +276 -0
  350. package/carbon/src/server/types.ts +11 -0
  351. package/carbon/src/shared/pricing.ts +155 -0
  352. package/carbon/src/shared/types.ts +338 -0
  353. package/carbon/supabase/migrations/00001_init.sql +717 -0
  354. package/carbon/supabase/migrations/00002_theme_settings.sql +13 -0
  355. package/carbon/supabase/migrations/00003_pg_cron.sql +121 -0
  356. package/carbon/supabase/migrations/00004_contact_newsletter.sql +81 -0
  357. package/carbon/supabase/migrations/00005_localization_languages.sql +22 -0
  358. package/carbon/supabase/seed.sql +16 -0
  359. package/carbon/tests/_helpers/app.ts +45 -0
  360. package/carbon/tests/_helpers/env.ts +37 -0
  361. package/carbon/tests/_helpers/factories.ts +69 -0
  362. package/carbon/tests/_helpers/jwt.ts +23 -0
  363. package/carbon/tests/_helpers/setup-integration.ts +20 -0
  364. package/carbon/tests/_helpers/setup-rtl.ts +12 -0
  365. package/carbon/tests/component/ErrorBoundary.test.tsx +53 -0
  366. package/carbon/tests/component/use-auth-settings.test.tsx +119 -0
  367. package/carbon/tests/integration/server/routes/contact.test.ts +162 -0
  368. package/carbon/tests/integration/server/routes/health.test.ts +61 -0
  369. package/carbon/tests/structural/i18n-parity.test.ts +42 -0
  370. package/carbon/tests/unit/client/utils.test.ts +49 -0
  371. package/carbon/tests/unit/shared/pricing.test.ts +93 -0
  372. package/carbon/tsconfig.json +27 -0
  373. package/carbon/tsconfig.server.json +27 -0
  374. package/carbon/tsconfig.test.json +9 -0
  375. package/carbon/vite.config.ts +110 -0
  376. package/carbon/vitest.config.ts +74 -0
  377. package/carbon/volumes/db/jwt.sql +57 -0
  378. package/carbon/volumes/db/metabase-init.sh +29 -0
  379. package/carbon/volumes/db/n8n-init.sh +25 -0
  380. package/carbon/volumes/db/realtime.sql +33 -0
  381. package/carbon/volumes/db/roles.sql +93 -0
  382. package/carbon/volumes/db/set-passwords.sh +12 -0
  383. package/carbon/volumes/db/super-admin.dev.sql +113 -0
  384. package/carbon/volumes/db/super-admin.generated.sql +113 -0
  385. package/carbon/volumes/db/super-admin.sql +114 -0
  386. package/carbon/volumes/grafana/dashboards/logs.json +179 -0
  387. package/carbon/volumes/grafana/dashboards/overview.json +523 -0
  388. package/carbon/volumes/grafana/dashboards/postgresql.json +337 -0
  389. package/carbon/volumes/grafana/dashboards.dev/logs.json +179 -0
  390. package/carbon/volumes/grafana/dashboards.dev/overview.json +156 -0
  391. package/carbon/volumes/grafana/dashboards.dev/postgresql.json +337 -0
  392. package/carbon/volumes/grafana/provisioning/dashboards/dashboards.dev.yml +16 -0
  393. package/carbon/volumes/grafana/provisioning/dashboards/dashboards.yml +16 -0
  394. package/carbon/volumes/grafana/provisioning/datasources/datasources.yml +43 -0
  395. package/carbon/volumes/kong/docker-entrypoint.sh +9 -0
  396. package/carbon/volumes/kong/kong.yml +208 -0
  397. package/carbon/volumes/loki/loki-config.yml +58 -0
  398. package/carbon/volumes/n8n/hooks.js +131 -0
  399. package/carbon/volumes/n8n/scripts/setup.sh +66 -0
  400. package/carbon/volumes/prometheus/prometheus.yml +43 -0
  401. package/carbon/volumes/promtail/promtail-config.yml +64 -0
  402. package/carbon/volumes/traefik/middlewares.dev.yml +83 -0
  403. package/carbon/volumes/traefik/middlewares.yml +95 -0
  404. package/carbon/volumes/traefik/vite-dev.yml +20 -0
  405. package/package.json +95 -0
  406. package/src/access.js +354 -0
  407. package/src/activate.js +187 -0
  408. package/src/add.js +718 -0
  409. package/src/backup.js +786 -0
  410. package/src/cli.js +350 -0
  411. package/src/configure.js +967 -0
  412. package/src/console.js +155 -0
  413. package/src/create.js +1499 -0
  414. package/src/deploy.js +311 -0
  415. package/src/destroy.js +2033 -0
  416. package/src/diagnose.js +735 -0
  417. package/src/down.js +80 -0
  418. package/src/failover.js +1032 -0
  419. package/src/lib/backup-s3.js +179 -0
  420. package/src/lib/build.js +33 -0
  421. package/src/lib/checksum.js +28 -0
  422. package/src/lib/ci-setup.js +666 -0
  423. package/src/lib/cli/help.js +129 -0
  424. package/src/lib/cli/parse-flags.js +160 -0
  425. package/src/lib/cli/select-action.js +65 -0
  426. package/src/lib/cli/select-environment.js +108 -0
  427. package/src/lib/cli/tty-guard.js +75 -0
  428. package/src/lib/cloudflare.js +447 -0
  429. package/src/lib/colors.js +52 -0
  430. package/src/lib/command.js +361 -0
  431. package/src/lib/config.js +359 -0
  432. package/src/lib/cost.js +103 -0
  433. package/src/lib/deploy/bundle.js +231 -0
  434. package/src/lib/deploy/compose/acme-verify.js +121 -0
  435. package/src/lib/deploy/compose/build-args.js +78 -0
  436. package/src/lib/deploy/compose/ha.js +1874 -0
  437. package/src/lib/deploy/compose/index.js +1294 -0
  438. package/src/lib/deploy/compose/reconcile.js +74 -0
  439. package/src/lib/deploy/github.js +382 -0
  440. package/src/lib/deploy/image.js +191 -0
  441. package/src/lib/deploy/index.js +119 -0
  442. package/src/lib/deploy/k8s/LICENSE +99 -0
  443. package/src/lib/deploy/k8s/gitops-deploy.js +298 -0
  444. package/src/lib/deploy/k8s/ha/index.js +1000 -0
  445. package/src/lib/deploy/k8s/index.js +62 -0
  446. package/src/lib/deploy/k8s/k3s.js +2515 -0
  447. package/src/lib/deploy/orchestrator.js +1401 -0
  448. package/src/lib/deploy/prompts.js +545 -0
  449. package/src/lib/deploy/remote-build.js +130 -0
  450. package/src/lib/deploy/state.js +120 -0
  451. package/src/lib/deploy/utils.js +328 -0
  452. package/src/lib/deploy-logger.js +93 -0
  453. package/src/lib/dns-propagation.js +48 -0
  454. package/src/lib/environment.js +58 -0
  455. package/src/lib/fetch-retry.js +103 -0
  456. package/src/lib/github-environments.js +335 -0
  457. package/src/lib/hetzner-dns.js +377 -0
  458. package/src/lib/hetzner-guided-setup.js +275 -0
  459. package/src/lib/host-keys.js +37 -0
  460. package/src/lib/iac/cloud-init.js +52 -0
  461. package/src/lib/iac/index.js +325 -0
  462. package/src/lib/iac/programs/hetzner-compose.js +130 -0
  463. package/src/lib/iac/programs/hetzner-k8s.js +320 -0
  464. package/src/lib/kubectl.js +81 -0
  465. package/src/lib/licensing/index.js +259 -0
  466. package/src/lib/licensing/tiers.js +181 -0
  467. package/src/lib/licensing/validator.js +171 -0
  468. package/src/lib/merge-package-json.js +90 -0
  469. package/src/lib/operator-ip.js +381 -0
  470. package/src/lib/package-manager.js +111 -0
  471. package/src/lib/perf.js +71 -0
  472. package/src/lib/project-guard.js +39 -0
  473. package/src/lib/project.js +334 -0
  474. package/src/lib/providers/base.js +276 -0
  475. package/src/lib/providers/hetzner-s3.js +656 -0
  476. package/src/lib/providers/hetzner.js +755 -0
  477. package/src/lib/providers/index.js +164 -0
  478. package/src/lib/s3.js +510 -0
  479. package/src/lib/secret-scan.js +583 -0
  480. package/src/lib/secrets.js +63 -0
  481. package/src/lib/server-types.js +195 -0
  482. package/src/lib/shell.js +91 -0
  483. package/src/lib/ssh.js +241 -0
  484. package/src/lib/tracker.js +242 -0
  485. package/src/lib/upgrade-policy.js +170 -0
  486. package/src/lib/validators.js +105 -0
  487. package/src/lib/version.js +5 -0
  488. package/src/remove.js +292 -0
  489. package/src/reset.js +97 -0
  490. package/src/restore.js +871 -0
  491. package/src/scale.js +1734 -0
  492. package/src/shell.js +222 -0
  493. package/src/status.js +981 -0
  494. package/src/up.js +264 -0
  495. package/src/upgrade.js +721 -0
@@ -0,0 +1,630 @@
1
+ ---
2
+ title: "CLI Reference"
3
+ description: "All vibecarbon commands, options, and flags."
4
+ order: 2
5
+ ---
6
+
7
+ ## Usage
8
+
9
+ ```bash
10
+ npx vibecarbon # show top-level help
11
+ npx vibecarbon <command> # bare command — opens guided prompts
12
+ npx vibecarbon <command> [seeds] # positional/flag seeds skip matching prompts
13
+ ```
14
+
15
+ **Vibecarbon is interactive-by-default.** Running a bare command always opens a
16
+ guided prompt flow — you never have to memorise flags. Positionals and flags are
17
+ *optional prompt seeds*: when present they pre-fill the corresponding prompt and
18
+ skip it. When absent, the prompt asks you. CI and piped-stdin contexts that
19
+ can't prompt fail with a canonical error that names exactly which flags would
20
+ unblock the invocation.
21
+
22
+ **Flag form:** vibecarbon uses **single-dash flags only** (`-h`, not `--help`).
23
+ Multi-letter flags are spelled out (`-env`, `-mode`, `-source`). Only `-h`,
24
+ `-v`, `-y`, and `-l` are single-letter.
25
+
26
+ | Flag | Description |
27
+ |------|-------------|
28
+ | `-h` | Show help |
29
+ | `-v` | Show version number |
30
+
31
+ ---
32
+
33
+ ## License Requirements
34
+
35
+ | Commands | License |
36
+ |----------|---------|
37
+ | `create`, `up`, `down`, `reset`, `status`, `add`, `remove`, `configure`, `upgrade`, `activate`, `deactivate` | None — always free |
38
+ | `deploy`, `destroy`, `backup`, `restore`, `failover`, `scale`, `shell`, `diagnose`, `console`, `access` | Diamond or Fullerene |
39
+
40
+ Run `npx vibecarbon activate <key>` to activate a license.
41
+
42
+ ---
43
+
44
+ # Dev
45
+
46
+ Local-development primitives. All free, all interactive-by-default.
47
+
48
+ ## create
49
+
50
+ Scaffold a new Vibecarbon project.
51
+
52
+ ```bash
53
+ # Interactive (recommended)
54
+ npx vibecarbon create
55
+
56
+ # Power-user / CI
57
+ npx vibecarbon create my-saas -y -admin-email admin@example.com -admin-password secret123
58
+ npx vibecarbon create my-saas -git -install
59
+ ```
60
+
61
+ Generates secure secrets (JWT, database password, Supabase keys), copies the
62
+ template, optionally runs `pnpm install`, optionally initializes a git
63
+ repository, and creates the admin user in Supabase Auth.
64
+
65
+ | Flag | Description |
66
+ |------|-------------|
67
+ | `-y` | Skip prompts (requires `-admin-email` and `-admin-password`) |
68
+ | `-admin-email <email>` | Admin email for dashboard access |
69
+ | `-admin-password <pw>` | Admin password for dashboard access |
70
+ | `-pm <name>` | Package manager: `npm`, `pnpm` (default), or `bun` |
71
+ | `-git` | Initialize a git repository (default: off; opt-in) |
72
+ | `-install` | Run `<pm> install` during create (default: deferred to first `vibecarbon up`) |
73
+
74
+ ---
75
+
76
+ ## up
77
+
78
+ Start the local development environment.
79
+
80
+ ```bash
81
+ npx vibecarbon up
82
+ ```
83
+
84
+ Auto-detects the project's package manager and runs the `dev:start` script,
85
+ which boots Docker services (PostgreSQL, Supabase, Traefik), runs database
86
+ migrations, and starts the Hono API and Vite dev servers. If ports are already
87
+ in use, a port offset is applied automatically.
88
+
89
+ ---
90
+
91
+ ## down
92
+
93
+ Stop the local development environment.
94
+
95
+ ```bash
96
+ npx vibecarbon down
97
+ ```
98
+
99
+ Stops all Docker Compose services for this project. Volumes (database data) are
100
+ preserved.
101
+
102
+ ---
103
+
104
+ ## reset
105
+
106
+ Reset the local development environment.
107
+
108
+ ```bash
109
+ # Interactive (prompts for confirmation)
110
+ npx vibecarbon reset
111
+
112
+ # Skip the confirmation prompt
113
+ npx vibecarbon reset -y
114
+ ```
115
+
116
+ Removes containers, Docker volumes, and locally-built images. **All local
117
+ database data will be lost.** Run `npx vibecarbon up` afterward to restart.
118
+
119
+ | Flag | Description |
120
+ |------|-------------|
121
+ | `-y` | Skip confirmation prompt |
122
+
123
+ ---
124
+
125
+ ## status
126
+
127
+ Show project and deployment status (read-only).
128
+
129
+ ```bash
130
+ # Full status
131
+ npx vibecarbon status
132
+
133
+ # Specific environment
134
+ npx vibecarbon status -env prod
135
+
136
+ # Machine-readable JSON for CI/scripting
137
+ npx vibecarbon status -json
138
+ ```
139
+
140
+ When run outside a project directory, shows a summary of all registered
141
+ projects. When run inside a project, shows detailed environment status. Live
142
+ server checks require `HETZNER_API_TOKEN` in the environment.
143
+
144
+ | Flag | Description |
145
+ |------|-------------|
146
+ | `-env <name>` | Show only a specific environment |
147
+ | `-json` | Machine-readable JSON output |
148
+
149
+ ---
150
+
151
+ ## add
152
+
153
+ Add an optional service or feature to a Vibecarbon project.
154
+
155
+ ```bash
156
+ # Interactive — prompts for which feature
157
+ npx vibecarbon add
158
+
159
+ # Add a specific feature
160
+ npx vibecarbon add observability
161
+
162
+ # Add multiple features
163
+ npx vibecarbon add observability redis
164
+ ```
165
+
166
+ **Available features:** `observability`, `n8n`, `metabase`, `redis`.
167
+
168
+ CI/CD and external services (Stripe, OAuth, SMTP, etc.) live in
169
+ [`vibecarbon configure`](#configure) instead.
170
+
171
+ | Flag | Description |
172
+ |------|-------------|
173
+ | `-y` | Skip confirmation prompts |
174
+ | `-offline` | Use bundled templates (for air-gapped environments) |
175
+
176
+ ---
177
+
178
+ ## remove
179
+
180
+ Remove a feature from a Vibecarbon project.
181
+
182
+ ```bash
183
+ # Interactive — prompts for which feature
184
+ npx vibecarbon remove
185
+
186
+ # Remove a specific feature
187
+ npx vibecarbon remove n8n
188
+
189
+ # Remove without confirmation
190
+ npx vibecarbon remove n8n -force
191
+ ```
192
+
193
+ Service data (volumes, databases) is preserved — only deployment configs
194
+ (Docker / k8s manifests) are removed.
195
+
196
+ | Flag | Description |
197
+ |------|-------------|
198
+ | `-y` | Skip confirmation prompts |
199
+ | `-force` | Skip confirmation prompts (alias for `-y`) |
200
+ | `-offline` | Use bundled service definitions (for air-gapped environments) |
201
+
202
+ ---
203
+
204
+ ## configure
205
+
206
+ Interactive wizard for configuring external services (billing, OAuth, SMTP,
207
+ CI/CD).
208
+
209
+ ```bash
210
+ # Configure a new project after creation
211
+ npx vibecarbon configure
212
+
213
+ # Layer GitOps onto a deployed k8s cluster
214
+ npx vibecarbon configure cicd prod
215
+ ```
216
+
217
+ Walks you through enabling features and entering API keys, then writes
218
+ everything to `.env.local` and `.env`. Configured credentials are deployed
219
+ automatically when you run `vibecarbon deploy`.
220
+
221
+ **Configurable features:** CI/CD (GitHub Actions), Billing (Stripe / Paddle /
222
+ Polar), Google OAuth, Microsoft OAuth, SMTP / Email, Plausible Analytics.
223
+
224
+ ### `configure cicd <env>` subcommand
225
+
226
+ Layer Flux + GitHub Actions wiring onto a deployed `k8s` or `k8s-ha` cluster.
227
+
228
+ ```bash
229
+ npx vibecarbon configure cicd prod
230
+ ```
231
+
232
+ Pre-conditions: the cluster must already be deployed (`vibecarbon deploy <env>`
233
+ with `-mode k8s` or `-mode k8s-ha`), the `gh` CLI must be authenticated, and a
234
+ Diamond or Fullerene license is required.
235
+
236
+ What it does:
237
+
238
+ 1. Installs `.github/workflows/vibecarbon-build.yml` and
239
+ `.github/workflows/deploy.yml` if missing, and marks `cicdEnabled: true` in
240
+ `vibecarbon.json`.
241
+ 2. Connects to the cluster, installs Flux, seeds the GitHub Environment
242
+ secrets/vars, uploads `KUBECONFIG_B64`, and triggers the first reconcile.
243
+ 3. For HA clusters, the same handover runs against both the primary and
244
+ standby kubeconfigs.
245
+
246
+ After this, future commits to `main` reconcile through Flux automatically. The
247
+ deploy path itself stays local-first — `vibecarbon deploy` continues to build
248
+ and sideload as before; GitOps just runs on top.
249
+
250
+ ---
251
+
252
+ ## upgrade
253
+
254
+ Update infrastructure files in your project to match the latest template.
255
+
256
+ ```bash
257
+ # Preview changes without applying
258
+ npx vibecarbon upgrade -dry
259
+
260
+ # Interactive upgrade
261
+ npx vibecarbon upgrade
262
+
263
+ # Non-interactive: update safe files, skip merge files
264
+ npx vibecarbon upgrade -y
265
+ ```
266
+
267
+ User source code (`src/**`, `content/**`, `migrations/**`) is never touched.
268
+ Files are classified into three categories:
269
+
270
+ - **Safe** — auto-replaced if you haven't modified them
271
+ - **Merge** — always shown for review (e.g. `docker-compose.yml`, `package.json`)
272
+ - **Never** — your code, never touched (e.g. `src/**`, `supabase/**`, `.env`)
273
+
274
+ | Flag | Description |
275
+ |------|-------------|
276
+ | `-y` | Auto-accept safe replacements, skip merge files |
277
+ | `-dry` | Preview changes without applying |
278
+ | `-force` | Replace all files (creates `.upgrade-backup` copies) |
279
+
280
+ ---
281
+
282
+ # Deploy
283
+
284
+ Cloud infrastructure primitives. Diamond or Fullerene license required.
285
+
286
+ ## deploy
287
+
288
+ Deploy a Vibecarbon environment to the cloud.
289
+
290
+ ```bash
291
+ # Interactive — prompts for env (defaults to prod) and mode
292
+ npx vibecarbon deploy
293
+
294
+ # Env seeded; prompts for the rest
295
+ npx vibecarbon deploy prod
296
+
297
+ # Scripted HA k8s deploy to Helsinki
298
+ npx vibecarbon deploy prod -mode k8s-ha -region hel1 -y
299
+
300
+ # Redo a previously-failed deploy from scratch
301
+ npx vibecarbon deploy prod -full
302
+ ```
303
+
304
+ Most settings (server type, S3, DNS, backup schedule, worker bounds) come from
305
+ the interactive prompt or `.vibecarbon.json`. Power users who want one-shot
306
+ scripted deploys configure `.vibecarbon.json` once and re-run with `-y` to skip
307
+ confirmations.
308
+
309
+ | Flag | Description |
310
+ |------|-------------|
311
+ | `-y` | Skip confirmation prompts |
312
+ | `-env <name>` | Environment seed (alternative to positional) |
313
+ | `-region <id>` | Primary Hetzner region (e.g. `hel1`, `nbg1`, `fsn1`) |
314
+ | `-mode <mode>` | Deploy mode: `compose`, `compose-ha`, `k8s`, or `k8s-ha` |
315
+ | `-full` | Clear resume state and redo every step from scratch |
316
+
317
+ > Server types, worker bounds, domain, DNS provider, S3 credentials, and backup
318
+ > schedules are configured interactively or via `.vibecarbon.json` — they don't
319
+ > have CLI flags. The "does this deserve a flag?" question is the forcing
320
+ > function for elegance: anything you'd set once and forget belongs in the
321
+ > config file.
322
+
323
+ ---
324
+
325
+ ## destroy
326
+
327
+ Tear down a cloud environment. **This is irreversible.**
328
+
329
+ ```bash
330
+ # Interactive — prompts for env
331
+ npx vibecarbon destroy
332
+
333
+ # Env seeded; still prompts for confirmation
334
+ npx vibecarbon destroy prod
335
+
336
+ # Skip confirmation (dangerous!)
337
+ npx vibecarbon destroy prod -y
338
+
339
+ # Also delete the backup S3 bucket
340
+ npx vibecarbon destroy prod -y -purge
341
+ ```
342
+
343
+ The following are deleted: Hetzner servers and all data on them, Hetzner
344
+ volumes (orphaned PVCs), Hetzner firewalls, Hetzner SSH keys (deployment keys
345
+ only), Cloudflare/Hetzner DNS records and health checks, and GitHub
346
+ environment secrets.
347
+
348
+ > Production environments (`prod` or `production`) require a type-to-confirm
349
+ > prompt **even with `-y`**. This is a hard guard that can't be bypassed.
350
+
351
+ | Flag | Description |
352
+ |------|-------------|
353
+ | `-y` | Skip confirmation prompts (does not skip prod type-to-confirm) |
354
+ | `-env <name>` | Environment seed (alternative to positional) |
355
+ | `-orphans` | Destroy stray Pulumi stacks not tracked in config |
356
+ | `-purge` | Also delete the backup S3 bucket (default: preserved) |
357
+
358
+ ---
359
+
360
+ ## backup
361
+
362
+ Create or manage database backups.
363
+
364
+ ```bash
365
+ # Interactive — prompts for env and action
366
+ npx vibecarbon backup
367
+
368
+ # Env seeded; prompts for action
369
+ npx vibecarbon backup prod
370
+
371
+ # List backups for prod
372
+ npx vibecarbon backup prod -l
373
+
374
+ # Scripted download
375
+ npx vibecarbon backup -env prod -action download -source myapp_20260507.tar.gz
376
+ ```
377
+
378
+ | Flag | Description |
379
+ |------|-------------|
380
+ | `-y` | Skip confirmation prompts |
381
+ | `-l` | List backups (read-only; equivalent to `-action list`) |
382
+ | `-env <name>` | Environment seed (alternative to positional) |
383
+ | `-action <verb>` | Action seed: `create`, `list`, or `download` |
384
+ | `-source <file>` | Backup filename (required for non-interactive download) |
385
+
386
+ ---
387
+
388
+ ## restore
389
+
390
+ Restore a database from a backup.
391
+
392
+ ```bash
393
+ # Interactive — prompts for env and backup
394
+ npx vibecarbon restore
395
+
396
+ # List available backups for prod
397
+ npx vibecarbon restore prod -l
398
+
399
+ # Restore a specific backup from S3
400
+ npx vibecarbon restore prod -source myapp_20260507.tar.gz
401
+
402
+ # Restore from a local file
403
+ npx vibecarbon restore prod -source ./backup.tar.gz -y
404
+
405
+ # Restore the most-recent S3 backup, non-interactively
406
+ npx vibecarbon restore prod -y -source latest
407
+ ```
408
+
409
+ `-source` accepts a local file path, an S3 backup name, or the literal
410
+ `latest` to fetch the most recent S3 backup.
411
+
412
+ | Flag | Description |
413
+ |------|-------------|
414
+ | `-y` | Skip confirmation prompts |
415
+ | `-l` | List available backups (read-only; does not restore) |
416
+ | `-env <name>` | Environment seed (alternative to positional) |
417
+ | `-source <file-or-name-or-latest>` | Local file path, S3 backup name, or `latest` |
418
+
419
+ ---
420
+
421
+ ## failover
422
+
423
+ Promote the standby region of an HA deployment to primary.
424
+
425
+ ```bash
426
+ # Interactive — prompts for env
427
+ npx vibecarbon failover
428
+
429
+ # Preview the failover plan
430
+ npx vibecarbon failover prod -dry
431
+
432
+ # Execute without confirmation
433
+ npx vibecarbon failover prod -y
434
+ ```
435
+
436
+ Behavior depends on deployment topology:
437
+
438
+ | Topology | Behavior |
439
+ |----------|----------|
440
+ | HA + Cloudflare DNS | Promotes standby DB, switches DNS A record automatically |
441
+ | HA + Hetzner DNS | Promotes standby DB, switches DNS A record automatically |
442
+ | HA + manual DNS | Promotes standby DB, prints DNS update instructions |
443
+ | Single server | Prints backup/restore recovery steps (failover is a no-op) |
444
+
445
+ | Flag | Description |
446
+ |------|-------------|
447
+ | `-y` | Skip confirmation prompts |
448
+ | `-dry` | Show plan without executing |
449
+ | `-env <name>` | Environment seed (alternative to positional) |
450
+
451
+ ---
452
+
453
+ ## scale
454
+
455
+ Adjust instance types post-deploy without re-running the full deploy flow.
456
+
457
+ ```bash
458
+ # Interactive — prompts for env and changes
459
+ npx vibecarbon scale
460
+
461
+ # Env seeded; prompts for changes
462
+ npx vibecarbon scale prod
463
+
464
+ # Scripted: resize all roles to cx33
465
+ npx vibecarbon scale -env prod -type cx33 -y
466
+ ```
467
+
468
+ | Topology | What you can change |
469
+ |----------|---------------------|
470
+ | Compose / Compose HA | VPS server type (blue-green; zero downtime) |
471
+ | Kubernetes | Worker / master / supabase server types (in-place) |
472
+ | Kubernetes | Worker bounds (autoscaler floor + ceiling) |
473
+
474
+ | Flag | Description |
475
+ |------|-------------|
476
+ | `-y` | Skip confirmations (required with `-type`) |
477
+ | `-env <name>` | Environment seed (alternative to positional) |
478
+ | `-type <id>` | Server type to scale to (e.g. `cx33`). Compose: resizes the VPS. K8s: resizes all roles. |
479
+
480
+ ---
481
+
482
+ # Debug & Access
483
+
484
+ Operator tools for cluster introspection and access management. Diamond or
485
+ Fullerene license required (these read or modify deployed infrastructure).
486
+
487
+ ## shell
488
+
489
+ Drop into an interactive bash with cluster context exported.
490
+
491
+ ```bash
492
+ # Default to prod
493
+ npx vibecarbon shell
494
+
495
+ # Specific environment
496
+ npx vibecarbon shell staging
497
+ ```
498
+
499
+ Exports `KUBECONFIG`, `VC_SSH_KEY`, `HCLOUD_TOKEN`, `HCLOUD_NETWORK`, and
500
+ `VC_ENV` so `kubectl` and `hcloud` "just work" against the named environment.
501
+ Use SSH directly for per-node debug — the master IP and SSH key path are in
502
+ the welcome banner.
503
+
504
+ ---
505
+
506
+ ## diagnose
507
+
508
+ Dump full cluster state for an environment.
509
+
510
+ ```bash
511
+ # Full dump (excludes the heavy egress probe)
512
+ npx vibecarbon diagnose prod
513
+
514
+ # Just one section
515
+ npx vibecarbon diagnose prod network
516
+ npx vibecarbon diagnose prod flux
517
+
518
+ # Heavy egress probe (netshoot DNS + MTU + route battery)
519
+ npx vibecarbon diagnose prod egress
520
+ ```
521
+
522
+ Streams sections to stdout AND writes the full report to
523
+ `~/.vibecarbon/diag-<env>-<timestamp>.txt`.
524
+
525
+ **Sections:** `nodes`, `pods`, `network`, `flux`, `hcloud`, `egress`, `all`
526
+ (default — excludes `egress`).
527
+
528
+ ---
529
+
530
+ ## console
531
+
532
+ Open Hetzner's web VNC console for a node — last-resort debug helper for when
533
+ SSH is broken (firewall change, cloud-init failure, kernel panic).
534
+
535
+ ```bash
536
+ # Open the noVNC URL for the master node
537
+ npx vibecarbon console master
538
+
539
+ # Specific server by full name
540
+ npx vibecarbon console myproject-prod-supabase
541
+ ```
542
+
543
+ The `<node>` argument is a substring matched against server names. Tries
544
+ `hcloud server request-console` (which prints the noVNC URL directly) when
545
+ available; otherwise prints the Hetzner Cloud Console URL and the server ID
546
+ so you can click through. Does NOT auto-open a browser.
547
+
548
+ ---
549
+
550
+ ## access
551
+
552
+ Manage the operator-CIDR allowlist that locks SSH (port 22) and the Kubernetes
553
+ API (port 6443) on the Hetzner Cloud firewall.
554
+
555
+ ```bash
556
+ # List current CIDRs (default)
557
+ npx vibecarbon access
558
+
559
+ # Add a CIDR + push to all firewalls
560
+ npx vibecarbon access add 5.6.7.8/32
561
+
562
+ # Remove a CIDR + push to all firewalls
563
+ npx vibecarbon access remove 5.6.7.8/32
564
+
565
+ # Drop entries with lastUsedAt > 90 days, push
566
+ npx vibecarbon access prune
567
+ ```
568
+
569
+ Every interactive command that needs SSH or k8s-API access (`deploy`, `shell`,
570
+ `diagnose`, `scale`, `failover`, `backup`, `restore`) auto-detects the
571
+ operator's public IP, persists it under `operatorCidrs` in `.vibecarbon.json`,
572
+ and patches the live firewall via the Hetzner Cloud API. Subsequent commands
573
+ from the same IP are silent.
574
+
575
+ **Non-interactive (`-y`) flows do *not* auto-detect** — CI runners have
576
+ ephemeral IPs that would pollute the list. Either commit a populated
577
+ `operatorCidrs` to `.vibecarbon.json` or set
578
+ `ALLOWED_SSH_IPS="1.2.3.4/32,5.6.7.8/32"` once on the first deploy.
579
+
580
+ If you somehow lock yourself out (no Hetzner API token, API unreachable), use
581
+ [`vibecarbon console <node>`](#console) — Hetzner's web VNC bypasses the
582
+ firewall entirely.
583
+
584
+ ---
585
+
586
+ # License
587
+
588
+ ## activate
589
+
590
+ Activate a license key (Diamond or Fullerene tier).
591
+
592
+ ```bash
593
+ # Prompts for key
594
+ npx vibecarbon activate
595
+
596
+ # Key seeded
597
+ npx vibecarbon activate vc-xxxxxxxx-signature...
598
+ ```
599
+
600
+ License keys start with `vc-` or `CARBON-`. Purchase a license at
601
+ [vibecarbon.dev/pricing](https://vibecarbon.dev/pricing).
602
+
603
+ ---
604
+
605
+ ## deactivate
606
+
607
+ Remove the current license and revert to the Graphite (free) tier.
608
+
609
+ ```bash
610
+ # Interactive — prompts for confirmation
611
+ npx vibecarbon deactivate
612
+
613
+ # Skip confirmation
614
+ npx vibecarbon deactivate -y
615
+ ```
616
+
617
+ | Flag | Description |
618
+ |------|-------------|
619
+ | `-y` | Skip confirmation prompt |
620
+
621
+ ---
622
+
623
+ ## Environment Variables
624
+
625
+ | Variable | Description |
626
+ |----------|-------------|
627
+ | `HETZNER_API_TOKEN` | Enables live server status checks and deployment |
628
+ | `CLOUDFLARE_API_TOKEN` | Required for Cloudflare DNS operations |
629
+ | `ALLOWED_SSH_IPS` | Bootstrap CIDRs for non-interactive deploys (CI) |
630
+ | `DEV_PORT_OFFSET` | Port offset for local development (set by `vibecarbon up`) |