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@1.27.0/tools/cli.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","#!/usr/bin/env node\n\nconst { Command } = require('commander');\nconst WebBuilder = require('./builders/web-builder');\nconst V3ToV4Upgrader = require('./upgraders/v3-to-v4-upgrader');\nconst IdeSetup = require('./installer/lib/ide-setup');\nconst path = require('path');\n\nconst program = new Command();\n\nprogram\n  .name('bmad-build')\n  .description('BMad-Method build tool for creating web bundles')\n  .version('4.0.0');\n\nprogram\n  .command('build')\n  .description('Build web bundles for agents and teams')\n  .option('-a, --agents-only', 'Build only agent bundles')\n  .option('-t, --teams-only', 'Build only team bundles')\n  .option('-e, --expansions-only', 'Build only expansion pack bundles')\n  .option('--no-expansions', 'Skip building expansion packs')\n  .option('--no-clean', 'Skip cleaning output directories')\n  .action(async (options) => {\n    const builder = new WebBuilder({\n      rootDir: process.cwd()\n    });\n\n    try {\n      if (options.clean) {\n        console.log('Cleaning output directories...');\n        await builder.cleanOutputDirs();\n      }\n\n      if (options.expansionsOnly) {\n        console.log('Building expansion pack bundles...');\n        await builder.buildAllExpansionPacks({ clean: false });\n      } else {\n        if (!options.teamsOnly) {\n          console.log('Building agent bundles...');\n          await builder.buildAgents();\n        }\n\n        if (!options.agentsOnly) {\n          console.log('Building team bundles...');\n          await builder.buildTeams();\n        }\n\n        if (!options.noExpansions) {\n          console.log('Building expansion pack bundles...');\n          await builder.buildAllExpansionPacks({ clean: false });\n        }\n      }\n\n      console.log('Build completed successfully!');\n    } catch (error) {\n      console.error('Build failed:', error.message);\n      process.exit(1);\n    }\n  });\n\nprogram\n  .command('build:expansions')\n  .description('Build web bundles for all expansion packs')\n  .option('--expansion <name>', 'Build specific expansion pack only')\n  .option('--no-clean', 'Skip cleaning output directories')\n  .action(async (options) => {\n    const builder = new WebBuilder({\n      rootDir: process.cwd()\n    });\n\n    try {\n      if (options.expansion) {\n        console.log(`Building expansion pack: ${options.expansion}`);\n        await builder.buildExpansionPack(options.expansion, { clean: options.clean });\n      } else {\n        console.log('Building all expansion packs...');\n        await builder.buildAllExpansionPacks({ clean: options.clean });\n      }\n\n      console.log('Expansion pack build completed successfully!');\n    } catch (error) {\n      console.error('Expansion pack build failed:', error.message);\n      process.exit(1);\n    }\n  });\n\nprogram\n  .command('list:agents')\n  .description('List all available agents')\n  .action(async () => {\n    const builder = new WebBuilder({ rootDir: process.cwd() });\n    const agents = await builder.resolver.listAgents();\n    console.log('Available agents:');\n    agents.forEach(agent => console.log(`  - ${agent}`));\n  });\n\nprogram\n  .command('list:expansions')\n  .description('List all available expansion packs')\n  .action(async () => {\n    const builder = new WebBuilder({ rootDir: process.cwd() });\n    const expansions = await builder.listExpansionPacks();\n    console.log('Available expansion packs:');\n    expansions.forEach(expansion => console.log(`  - ${expansion}`));\n  });\n\nprogram\n  .command('validate')\n  .description('Validate agent and team configurations')\n  .action(async () => {\n    const builder = new WebBuilder({ rootDir: process.cwd() });\n    try {\n      // Validate by attempting to build all agents and teams\n      const agents = await builder.resolver.listAgents();\n      const teams = await builder.resolver.listTeams();\n      \n      console.log('Validating agents...');\n      for (const agent of agents) {\n        await builder.resolver.resolveAgentDependencies(agent);\n        console.log(`  ✓ ${agent}`);\n      }\n      \n      console.log('\\nValidating teams...');\n      for (const team of teams) {\n        await builder.resolver.resolveTeamDependencies(team);\n        console.log(`  ✓ ${team}`);\n      }\n      \n      console.log('\\nAll configurations are valid!');\n    } catch (error) {\n      console.error('Validation failed:', error.message);\n      process.exit(1);\n    }\n  });\n\nprogram\n  .command('upgrade')\n  .description('Upgrade a BMad-Method V3 project to V4')\n  .option('-p, --project <path>', 'Path to V3 project (defaults to current directory)')\n  .option('--dry-run', 'Show what would be changed without making changes')\n  .option('--no-backup', 'Skip creating backup (not recommended)')\n  .action(async (options) => {\n    const upgrader = new V3ToV4Upgrader();\n    await upgrader.upgrade({\n      projectPath: options.project,\n      dryRun: options.dryRun,\n      backup: options.backup\n    });\n  });\n\nprogram.parse();"]}