feat: v6.0.0-alpha.0 - the future is now

This commit is contained in:
Brian Madison
2025-09-28 23:17:07 -05:00
parent 52f6889089
commit 0a6a3f3015
747 changed files with 52759 additions and 235199 deletions

View File

@@ -0,0 +1,41 @@
const chalk = require('chalk');
const path = require('node:path');
const { Installer } = require('../installers/lib/core/installer');
const { UI } = require('../lib/ui');
const installer = new Installer();
const ui = new UI();
module.exports = {
command: 'install',
description: 'Install BMAD Core agents and tools',
options: [],
action: async () => {
try {
const config = await ui.promptInstall();
const result = await installer.install(config);
console.log(chalk.green('\n✨ Installation complete!'));
console.log(
chalk.cyan('BMAD Core and Selected Modules have been installed to:'),
chalk.bold(result.path || path.resolve(config.directory, 'bmad')),
);
console.log(chalk.yellow('\nThank you for helping test the early release version of the new BMad Core and BMad Method!'));
console.log(chalk.cyan('Check docs/alpha-release-notes.md in this repository for important information.'));
process.exit(0);
} catch (error) {
// Check if error has a complete formatted message
if (error.fullMessage) {
console.error(error.fullMessage);
if (error.stack) {
console.error('\n' + chalk.dim(error.stack));
}
} else {
// Generic error handling for all other errors
console.error(chalk.red('Installation failed:'), error.message);
console.error(chalk.dim(error.stack));
}
process.exit(1);
}
},
};

View File

@@ -0,0 +1,28 @@
const chalk = require('chalk');
const { Installer } = require('../installers/lib/core/installer');
const installer = new Installer();
module.exports = {
command: 'list',
description: 'List available modules',
options: [],
action: async () => {
try {
const modules = await installer.getAvailableModules();
console.log(chalk.cyan('\n📦 Available BMAD Modules:\n'));
for (const module of modules) {
console.log(chalk.bold(` ${module.id}`));
console.log(chalk.dim(` ${module.description}`));
console.log(chalk.dim(` Version: ${module.version}`));
console.log();
}
process.exit(0);
} catch (error) {
console.error(chalk.red('Error:'), error.message);
process.exit(1);
}
},
};

View File

@@ -0,0 +1,47 @@
const chalk = require('chalk');
const { Installer } = require('../installers/lib/core/installer');
const installer = new Installer();
module.exports = {
command: 'status',
description: 'Show installation status',
options: [['-d, --directory <path>', 'Installation directory', '.']],
action: async (options) => {
try {
const status = await installer.getStatus(options.directory);
if (!status.installed) {
console.log(chalk.yellow('\n⚠ No BMAD installation found in:'), options.directory);
console.log(chalk.dim('Run "bmad install" to set up BMAD Method'));
process.exit(0);
}
console.log(chalk.cyan('\n📊 BMAD Installation Status\n'));
console.log(chalk.bold('Location:'), status.path);
console.log(chalk.bold('Version:'), status.version);
console.log(chalk.bold('Core:'), status.hasCore ? chalk.green('✓ Installed') : chalk.red('✗ Not installed'));
if (status.modules.length > 0) {
console.log(chalk.bold('\nModules:'));
for (const mod of status.modules) {
console.log(` ${chalk.green('✓')} ${mod.id} (v${mod.version})`);
}
} else {
console.log(chalk.bold('\nModules:'), chalk.dim('None installed'));
}
if (status.ides.length > 0) {
console.log(chalk.bold('\nConfigured IDEs:'));
for (const ide of status.ides) {
console.log(` ${chalk.green('✓')} ${ide}`);
}
}
process.exit(0);
} catch (error) {
console.error(chalk.red('Error:'), error.message);
process.exit(1);
}
},
};

View File

@@ -0,0 +1,44 @@
const chalk = require('chalk');
const path = require('node:path');
const { Installer } = require('../installers/lib/core/installer');
const { UI } = require('../lib/ui');
const installer = new Installer();
const ui = new UI();
module.exports = {
command: 'uninstall',
description: 'Remove BMAD installation',
options: [
['-d, --directory <path>', 'Installation directory', '.'],
['--force', 'Skip confirmation prompt'],
],
action: async (options) => {
try {
const bmadPath = path.join(options.directory, 'bmad');
if (!options.force) {
const { confirm } = await ui.prompt([
{
type: 'confirm',
name: 'confirm',
message: `Are you sure you want to remove BMAD from ${bmadPath}?`,
default: false,
},
]);
if (!confirm) {
console.log('Uninstall cancelled.');
process.exit(0);
}
}
await installer.uninstall(options.directory);
console.log(chalk.green('\n✨ BMAD Method has been uninstalled.'));
process.exit(0);
} catch (error) {
console.error(chalk.red('Uninstall failed:'), error.message);
process.exit(1);
}
},
};

View File

@@ -0,0 +1,28 @@
const chalk = require('chalk');
const { Installer } = require('../installers/lib/core/installer');
const installer = new Installer();
module.exports = {
command: 'update',
description: 'Update existing BMAD installation',
options: [
['-d, --directory <path>', 'Installation directory', '.'],
['--force', 'Force update, overwriting modified files'],
['--dry-run', 'Show what would be updated without making changes'],
],
action: async (options) => {
try {
await installer.update({
directory: options.directory,
force: options.force,
dryRun: options.dryRun,
});
console.log(chalk.green('\n✨ Update complete!'));
process.exit(0);
} catch (error) {
console.error(chalk.red('Update failed:'), error.message);
process.exit(1);
}
},
};