create-alta-app 1.3.0 → 1.5.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 (2) hide show
  1. package/index.mjs +42 -22
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -240,19 +240,23 @@ export default function SettingsRoute() {
240
240
  async function main() {
241
241
  console.clear();
242
242
  console.log('');
243
- console.log(pc.magenta(' ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓'));
244
- console.log(pc.magenta(' ┃ ┃'));
245
- console.log(pc.magenta(' ┃') + pc.bold(pc.white(' ██████╗ ██╗ ████████╗ ██████╗ ')) + pc.magenta('┃'));
246
- console.log(pc.magenta(' ┃') + pc.bold(pc.white(' ██╔══██╗██║ ╚══██╔══╝██╔══██╗ ')) + pc.magenta('┃'));
247
- console.log(pc.magenta(' ') + pc.bold(pc.white(' ███████║██║ ██║ ███████║ ')) + pc.magenta(''));
248
- console.log(pc.magenta(' ┃') + pc.bold(pc.white(' ██╔══██║██║ ██║ ██╔══██║ ')) + pc.magenta('┃'));
249
- console.log(pc.magenta(' ┃') + pc.bold(pc.white(' ██║ ██║███████╗██║ ██║ ██║ ')) + pc.magenta('┃'));
250
- console.log(pc.magenta(' ┃') + pc.bold(pc.white(' ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═╝ ')) + pc.magenta('┃'));
251
- console.log(pc.magenta(' ┃ ┃'));
252
- console.log(pc.magenta(' ') + pc.dim(' The Full-Stack Project Scaffolding ') + pc.magenta('┃'));
253
- console.log(pc.magenta(' ') + pc.dim(' React · Supabase · Vercel · AI ') + pc.magenta('┃'));
254
- console.log(pc.magenta(' ┃ ┃'));
255
- console.log(pc.magenta(' ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛'));
243
+ const W = 44;
244
+ const line = (s) => pc.magenta(' ┃') + pc.bold(pc.white(s.padEnd(W))) + pc.magenta('┃');
245
+ const dim = (s) => pc.magenta(' ┃') + pc.dim(s.padEnd(W)) + pc.magenta('┃');
246
+ const empty = () => pc.magenta(' ┃') + ' '.repeat(W) + pc.magenta('┃');
247
+ console.log(pc.magenta(' ' + '━'.repeat(W) + ''));
248
+ console.log(empty());
249
+ console.log(line(' █████╗ ██╗ ████████╗█████╗ '));
250
+ console.log(line(' ██╔══██╗██║ ╚══██╔══╝██╔══██╗'));
251
+ console.log(line(' ███████║██║ ██║ ███████║'));
252
+ console.log(line(' ██╔══██║██║ ██║ ██╔══██║'));
253
+ console.log(line(' ██║ ██║███████╗██║ ██║ ██║'));
254
+ console.log(line(' ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═╝'));
255
+ console.log(empty());
256
+ console.log(dim(' The Full-Stack Project Scaffolder'));
257
+ console.log(dim(' React · Supabase · Vercel · Claude Skills'));
258
+ console.log(empty());
259
+ console.log(pc.magenta(' ┗' + '━'.repeat(W) + '┛'));
256
260
  console.log('');
257
261
 
258
262
  const argName = process.argv[2];
@@ -345,12 +349,17 @@ async function main() {
345
349
  // ── Step 4: Write env files ──
346
350
  if (credentials) {
347
351
  const spinnerEnv = ora({ text: 'Writing environment variables...', indent: 2 }).start();
352
+ const githubToken = credentials.githubRepoUrl
353
+ ? credentials.githubRepoUrl.match(/https:\/\/([^@]+)@/)?.[1] || ''
354
+ : '';
348
355
  const env = [
349
356
  `VITE_SUPABASE_URL=${credentials.supabaseUrl}`,
350
357
  `VITE_SUPABASE_ANON_KEY=${credentials.supabaseAnonKey}`,
351
358
  `SUPABASE_PROJECT_REF=${credentials.supabaseProjectRef}`,
352
359
  `SUPABASE_DB_PASSWORD=${credentials.dbPassword}`,
353
360
  `DATABASE_URL=${credentials.databaseUrl}`,
361
+ `GITHUB_TOKEN=${githubToken}`,
362
+ `GITHUB_REPO=${credentials.githubFullName || ''}`,
354
363
  '',
355
364
  ].join('\n');
356
365
  fs.writeFileSync(path.join(targetDir, '.env'), env);
@@ -372,7 +381,20 @@ async function main() {
372
381
  console.log(` ${pc.dim(`Then run: cd ${projectName} && pnpm install`)}`);
373
382
  }
374
383
 
375
- // ── Step 6: Init git + push ──
384
+ // ── Step 6: Install Claude Skills ──
385
+ const spinnerSkills = ora({ text: 'Installing Claude Skills...', indent: 2 }).start();
386
+ try {
387
+ run('npx --yes skills add https://github.com/supabase/agent-skills --skill supabase-postgres-best-practices', targetDir);
388
+ run('npx --yes skills add https://github.com/vercel-labs/agent-skills --skill vercel-react-best-practices', targetDir);
389
+ run('npx --yes skills add https://github.com/vercel-labs/agent-skills --skill web-design-guidelines', targetDir);
390
+ run('npx --yes skills add https://github.com/anthropics/skills --skill frontend-design', targetDir);
391
+ spinnerSkills.succeed(pc.green('Claude Skills installed'));
392
+ } catch {
393
+ spinnerSkills.warn(pc.yellow('Could not install Claude Skills'));
394
+ console.log(` ${pc.dim('Install manually: npx skills add <package>')}`);
395
+ }
396
+
397
+ // ── Step 7: Init git + push ──
376
398
  const spinnerGit = ora({ text: 'Initializing git...', indent: 2 }).start();
377
399
  try {
378
400
  run('git init', targetDir);
@@ -398,11 +420,7 @@ async function main() {
398
420
 
399
421
  // ── Done ──
400
422
  console.log('');
401
- console.log(pc.green(' ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓'));
402
- console.log(pc.green(' ┃ ┃'));
403
- console.log(pc.green(' ┃') + pc.bold(pc.white(' ✦ Your project is ready! ✦ ')) + pc.green('┃'));
404
- console.log(pc.green(' ┃ ┃'));
405
- console.log(pc.green(' ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛'));
423
+ console.log(pc.bold(pc.green(' Your project is ready!')));
406
424
  console.log('');
407
425
 
408
426
  if (credentials) {
@@ -410,10 +428,12 @@ async function main() {
410
428
  console.log('');
411
429
  console.log(` ${pc.magenta('◆')} ${pc.dim('Supabase')} ${credentials.supabaseUrl}`);
412
430
  if (credentials.vercelUrl) {
413
- console.log(` ${pc.magenta('◆')} ${pc.dim('Vercel')} ${credentials.vercelUrl}`);
431
+ console.log(` ${pc.magenta('◆')} ${pc.dim('Vercel')} ${credentials.vercelUrl} ${pc.dim('(first deploy may take a few minutes)')}`);
432
+
414
433
  }
415
434
  if (credentials.githubRepoUrl) {
416
- console.log(` ${pc.magenta('◆')} ${pc.dim('GitHub')} ${credentials.githubRepoUrl}`);
435
+ const cleanGitUrl = credentials.githubRepoUrl.replace(/https:\/\/[^@]+@/, 'https://');
436
+ console.log(` ${pc.magenta('◆')} ${pc.dim('GitHub')} ${cleanGitUrl}`);
417
437
  }
418
438
  console.log(` ${pc.magenta('◆')} ${pc.dim('DB pass')} Saved in .env`);
419
439
  console.log('');
@@ -423,7 +443,7 @@ async function main() {
423
443
  console.log('');
424
444
  }
425
445
 
426
- // ── Step 7: Start dev server ──
446
+ // ── Step 8: Start dev server ──
427
447
  console.log(` ${pc.bold('Starting dev server...')}`);
428
448
  console.log('');
429
449
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-alta-app",
3
- "version": "1.3.0",
3
+ "version": "1.5.0",
4
4
  "description": "Create a new Alta project",
5
5
  "bin": {
6
6
  "create-alta-app": "./index.mjs"