#!/usr/bin/env bun /** * Scaffold Project Skill * Generates complete project boilerplates from plain English descriptions */ import { spawnSync } from "child_process"; import { existsSync } from "fs"; import { parseArgs } from "util"; import { detectTemplate } from "./ai-detect"; import { generateFiles } from "./file-generators"; import { generateProjectConfig } from "./project-config"; import { TEMPLATES } from "./templates"; import { validatePackageManager } from "./types"; import type { Auth, Database, PackageManager, ScaffoldOptions, State, Template, Testing } from "./types"; // Main CLI Logic // ============================================================================ async function main() { const { values, positionals } = parseArgs({ args: process.argv.slice(2), options: { description: { type: 'string' }, template: { type: 'string' }, name: { type: 'string' }, output: { type: 'string' }, typescript: { type: 'boolean', default: true }, tailwind: { type: 'boolean', default: true }, shadcn: { type: 'boolean', default: false }, database: { type: 'string', default: 'none' }, auth: { type: 'string', default: 'none' }, testing: { type: 'string', default: 'none' }, state: { type: 'string', default: 'none' }, git: { type: 'boolean', default: true }, install: { type: 'boolean', default: false }, pm: { type: 'string', default: 'bun' }, 'dry-run': { type: 'boolean', default: false }, verbose: { type: 'boolean', default: false }, help: { type: 'boolean', default: false }, }, allowPositionals: true, }); if (values.help) { console.log(` Scaffold Project - Generate project boilerplates from descriptions Usage: scaffold-project [description] [options] scaffold-project --template