vibecarbon 0.1.1 → 0.1.2

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.
@@ -55,12 +55,12 @@ npx vibecarbon create
55
55
 
56
56
  # Power-user / CI
57
57
  npx vibecarbon create my-saas -y -admin-email admin@example.com -admin-password secret123
58
- npx vibecarbon create my-saas -git -install
58
+ npx vibecarbon create my-saas -install
59
59
  ```
60
60
 
61
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.
62
+ template, initializes a git repository (with pre-commit + pre-push hooks),
63
+ optionally runs `pnpm install`, and creates the admin user in Supabase Auth.
64
64
 
65
65
  | Flag | Description |
66
66
  |------|-------------|
@@ -68,9 +68,10 @@ repository, and creates the admin user in Supabase Auth.
68
68
  | `-admin-email <email>` | Admin email for dashboard access |
69
69
  | `-admin-password <pw>` | Admin password for dashboard access |
70
70
  | `-pm <name>` | Package manager: `npm`, `pnpm` (default), or `bun` |
71
- | `-git` | Initialize a git repository (default: off; opt-in) |
72
71
  | `-install` | Run `<pm> install` during create (default: deferred to first `vibecarbon up`) |
73
72
 
73
+ A git repository is initialized automatically (with pre-commit + pre-push hooks). If `git` isn't on PATH, this step is skipped silently with a hint to run `git init` manually afterwards.
74
+
74
75
  ---
75
76
 
76
77
  ## up
@@ -3,10 +3,7 @@ import { cva, type VariantProps } from 'class-variance-authority';
3
3
  import * as React from 'react';
4
4
 
5
5
  import { cn } from '@/lib/utils';
6
-
7
- const SparkBurst = React.lazy(() =>
8
- import('../effects/SparkBurst').then((m) => ({ default: m.SparkBurst }))
9
- );
6
+ import { SparkBurst } from '../effects/SparkBurst';
10
7
 
11
8
  const buttonVariants = cva(
12
9
  "cursor-pointer focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-4xl border border-transparent text-sm leading-none font-medium focus-visible:ring-[3px] aria-invalid:ring-[3px] [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all disabled:cursor-default [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none",
@@ -109,9 +106,7 @@ function Button({
109
106
  >
110
107
  {resolvedChildren}
111
108
  {hasSparkle && (
112
- <React.Suspense>
113
- <SparkBurst delay={0.05} count={10} palette="primary" trigger={sparkTrigger} />
114
- </React.Suspense>
109
+ <SparkBurst delay={0.05} count={10} palette="primary" trigger={sparkTrigger} />
115
110
  )}
116
111
  </ButtonPrimitive>
117
112
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibecarbon",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Create and manage production-ready Vibecarbon applications",
5
5
  "type": "module",
6
6
  "bin": "./src/cli.js",
package/src/create.js CHANGED
@@ -152,11 +152,6 @@ const SPEC = {
152
152
  boolean: true,
153
153
  description: 'Skip prompts (requires -admin-email and -admin-password)',
154
154
  },
155
- {
156
- name: 'git',
157
- boolean: true,
158
- description: 'Initialize a git repository (default: off; opt-in)',
159
- },
160
155
  {
161
156
  name: 'install',
162
157
  boolean: true,
@@ -476,14 +471,13 @@ async function bootstrap(cliArgs) {
476
471
  }
477
472
 
478
473
  // Build the legacy `args` shape that the orchestration code reads.
479
- // -git is opt-in (default off), so noGit (the legacy field) is the
480
- // INVERSE of values.git.
474
+ // Git init always runs when `git` is on PATH; falls back to no-repo silently
475
+ // if git isn't installed. No CLI flag needed either way.
481
476
  const args = {
482
477
  projectName: positional.projectName || null,
483
478
  yes: !!values.y,
484
479
  install: !!values.install,
485
480
  skipLockfile: !!values['skip-lockfile'],
486
- noGit: !values.git,
487
481
  packageManager: /** @type {string|null} */ (values.pm),
488
482
  adminEmail: /** @type {string|null} */ (values['admin-email']),
489
483
  adminPassword: /** @type {string|null} */ (values['admin-password']),
@@ -502,7 +496,6 @@ async function bootstrap(cliArgs) {
502
496
  // and can't escape cwd (CVE-class path-traversal).
503
497
  let projectName = args.projectName;
504
498
  let packageManager = args.packageManager || detectPackageManager();
505
- let initGit = !args.noGit;
506
499
  let adminEmail = args.adminEmail;
507
500
  let adminPassword = args.adminPassword;
508
501
 
@@ -566,13 +559,6 @@ async function bootstrap(cliArgs) {
566
559
  initialValue: packageManager,
567
560
  });
568
561
  },
569
- git: () => {
570
- if (args.noGit) return Promise.resolve(false);
571
- return p.confirm({
572
- message: 'Initialize a git repository for version control?',
573
- initialValue: true,
574
- });
575
- },
576
562
  },
577
563
  {
578
564
  onCancel: () => {
@@ -586,7 +572,6 @@ async function bootstrap(cliArgs) {
586
572
  adminEmail = project.adminEmail;
587
573
  adminPassword = project.adminPassword;
588
574
  packageManager = project.packageManager;
589
- initGit = project.git;
590
575
  } else {
591
576
  // Non-interactive validation
592
577
  if (!projectName) {
@@ -633,7 +618,6 @@ async function bootstrap(cliArgs) {
633
618
  `Project: ${projectName}`,
634
619
  `Admin: ${adminEmail}`,
635
620
  `Package manager: ${packageManager}`,
636
- `Git: ${initGit ? 'yes' : 'no'}`,
637
621
  ].join('\n'),
638
622
  'Configuration',
639
623
  );
@@ -1120,8 +1104,16 @@ async function bootstrap(cliArgs) {
1120
1104
  }
1121
1105
  }
1122
1106
 
1123
- // Initialize git
1124
- if (initGit) {
1107
+ // Initialize git. Always attempted; skipped silently with a friendly note
1108
+ // if the `git` binary isn't on PATH (no flag exposed for opt-out).
1109
+ let gitAvailable = true;
1110
+ try {
1111
+ execFileSync('git', ['--version'], { stdio: 'ignore' });
1112
+ } catch {
1113
+ gitAvailable = false;
1114
+ }
1115
+
1116
+ if (gitAvailable) {
1125
1117
  s.message('Initializing git repository');
1126
1118
  copyTemplate('.gitignore', join(projectDir, '.gitignore'), variables);
1127
1119
 
@@ -1205,6 +1197,10 @@ ${runCmd} test:prepush
1205
1197
  writeFileSync(join(hooksDir, 'pre-push'), prePushHook);
1206
1198
  chmodSync(join(hooksDir, 'pre-push'), 0o755);
1207
1199
  await tick();
1200
+ } else {
1201
+ p.log.info(
1202
+ "git not found on PATH — skipping repo init. Install git and run 'git init' in this directory to enable version control + pre-commit/pre-push hooks.",
1203
+ );
1208
1204
  }
1209
1205
 
1210
1206
  // Store template version and file checksums for `vibecarbon upgrade`