Compare commits

...

7 Commits

Author SHA1 Message Date
Phil 2aef491901
Merge 6caca55e43 into f7466c2530 2026-01-27 20:52:48 -05:00
Murat K Ozcan f7466c2530
feat: added tea module as an external module (#1430) 2026-01-27 17:29:34 -08:00
Phil 6caca55e43
Merge branch 'main' into dir-install-flag 2026-01-26 10:12:47 -05:00
Brian 2c3285f47e
Merge branch 'main' into dir-install-flag 2026-01-25 14:11:01 -06:00
Brian c46453259f
Merge branch 'main' into dir-install-flag 2026-01-24 19:46:50 -06:00
Phil 83ed3a978d
Merge branch 'main' into dir-install-flag 2026-01-23 13:09:19 -05:00
Phil Mahncke 3dd05b0584 feat: enhance install command with directory option and update prompt logic
Added a new CLI option for specifying the target project directory, allowing users to skip the interactive prompt. Updated the installation prompt method to accept options and handle directory validation accordingly.
2026-01-22 22:31:13 -05:00
3 changed files with 33 additions and 5 deletions

View File

@ -9,7 +9,10 @@ const ui = new UI();
module.exports = {
command: 'install',
description: 'Install BMAD Core agents and tools',
options: [['-d, --debug', 'Enable debug output for manifest generation']],
options: [
['-d, --debug', 'Enable debug output for manifest generation'],
['-D, --directory <path>', 'Target project directory (skips interactive prompt)'],
],
action: async (options) => {
try {
// Set debug flag as environment variable for all components
@ -18,7 +21,7 @@ module.exports = {
console.log(chalk.cyan('Debug mode enabled\n'));
}
const config = await ui.promptInstall();
const config = await ui.promptInstall(options);
// Handle cancel
if (config.actionType === 'cancel') {

View File

@ -32,6 +32,16 @@ modules:
type: bmad-org
npmPackage: bmad-game-dev-studio
bmad-method-test-architecture-enterprise:
url: https://github.com/bmad-code-org/bmad-method-test-architecture-enterprise
module-definition: src/module.yaml
code: tea
name: "Test Architect"
description: "Master Test Architect for quality strategy, test automation, and release gates"
defaultSelected: false
type: bmad-org
npmPackage: bmad-method-test-architecture-enterprise
# TODO: Enable once fixes applied:
# whiteport-design-system:

View File

@ -26,9 +26,10 @@ const choiceUtils = { Separator };
class UI {
/**
* Prompt for installation configuration
* @param {Object} options - CLI options object (may contain directory property)
* @returns {Object} Installation configuration
*/
async promptInstall() {
async promptInstall(options = {}) {
CLIUtils.displayLogo();
// Display version-specific start message from install-messages.yaml
@ -36,7 +37,7 @@ class UI {
const messageLoader = new MessageLoader();
messageLoader.displayStartMessage();
const confirmedDirectory = await this.getConfirmedDirectory();
const confirmedDirectory = await this.getConfirmedDirectory(options);
// Preflight: Check for legacy BMAD v4 footprints immediately after getting directory
const { Detector } = require('../installers/lib/core/detector');
@ -506,9 +507,23 @@ class UI {
/**
* Get confirmed directory from user
* @param {Object} options - CLI options object (may contain directory property)
* @returns {string} Confirmed directory path
*/
async getConfirmedDirectory() {
async getConfirmedDirectory(options = {}) {
// If directory provided via CLI, validate and return it
if (options.directory) {
const expandedPath = this.expandUserPath(options.directory);
const validationError = this.validateDirectorySync(expandedPath);
if (validationError) {
throw new Error(`Invalid directory: ${validationError}`);
}
await this.displayDirectoryInfo(expandedPath);
// Skip confirmation for CLI-provided directories
return expandedPath;
}
// Existing interactive prompt logic
let confirmedDirectory = null;
while (!confirmedDirectory) {
const directoryAnswer = await this.promptForDirectory();