#!/usr/bin/env bun import { showBanner } from '@bunkit/core'; import { log, outro } from '@clack/prompts'; import { Command } from 'commander'; import pc from 'picocolors'; import { addCommand } from './commands/add'; import { catalogAddCommand, catalogListCommand, catalogSyncCommand } from './commands/catalog'; import { createCommand } from './commands/create'; import { enhancedInitCommand } from './commands/init.enhanced'; import { migrateCommand } from './commands/migrate'; import { deletePresetCommand, listPresetsCommand } from './commands/preset'; // Read version from package.json const packageJson = await Bun.file(new URL('../package.json', import.meta.url)).json(); const VERSION = packageJson.version; const program = new Command(); program .name('bunkit') .description('Bake production-ready apps in seconds | Modern CLI for Bun-powered projects') .version(VERSION) .usage(' [options]') .addHelpText( 'after', ` Examples: $ bunkit init Create a new project interactively $ bunkit create nextjs my-app Create a Next.js web application $ bunkit add workspace Add a new workspace to monorepo $ bunkit add component --all Browse and add shadcn/ui components $ bunkit migrate radix Migrate to unified radix-ui package $ bunkit catalog add zod ^3.24.1 Add package to dependency catalog $ bunkit preset list List all custom presets For more information, visit: https://github.com/Arakiss/bunkit ` ); program .command('init') .description('Create a new project with full customization options') .alias('i') .option('--name ', 'Project name (kebab-case recommended, e.g., my-awesome-app)') .option( '--preset ', 'Project preset: minimal | nextjs | hono-api | nextjs-monorepo | bun-monorepo' ) .option( '--enterprise', 'Enable enterprise features (additional apps/services, only for nextjs-monorepo)' ) .option( '--theme ', 'Theme preset: modern-clean | bold-vibrant | minimalist | elegant | custom' ) .option( '--database ', 'Database option: postgres-drizzle | postgres-prisma | mysql-drizzle | mysql-prisma | supabase | supabase-drizzle | supabase-prisma | sqlite-drizzle | sqlite-prisma | none' ) .option('--auth ', 'Authentication system: better-auth | nextauth | supabase | none') .option('--redis', 'Enable Redis cache/session store') .option('--use-bun-secrets', 'Use Bun.secrets API instead of .env files') .option( '--supabase-preset ', 'Supabase configuration preset: full-stack | auth-only | database-only | custom' ) .option( '--supabase-features ', 'Comma-separated Supabase features: auth,storage,realtime,edge-functions,database' ) .option('--code-quality ', 'Code quality tool: ultracite | biome') .option('--ts-strictness ', 'TypeScript strictness level: strict | moderate | loose') .option('--ui-library ', 'UI component library: shadcn | none') .option('--css-framework ', 'CSS framework: tailwind | vanilla | css-modules') .option( '--shadcn-style