From 5a70512a305a74be42f45a4487a1b1cc16f21be4 Mon Sep 17 00:00:00 2001 From: Brian Madison Date: Wed, 29 Oct 2025 09:12:27 -0500 Subject: [PATCH] chore: remove version prompt from npx installer --- README.md | 30 +++++----- docs/v4-to-v6-upgrade.md | 10 ++-- tools/bmad-npx-wrapper.js | 121 +------------------------------------- 3 files changed, 23 insertions(+), 138 deletions(-) diff --git a/README.md b/README.md index b8be3e55..364e98c0 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,21 @@ -# BMad CORE v6 Beta +# BMad CORE + BMad Method [![Version](https://img.shields.io/npm/v/bmad-method?color=blue&label=version)](https://www.npmjs.com/package/bmad-method) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) [![Node.js Version](https://img.shields.io/badge/node-%3E%3D20.0.0-brightgreen)](https://nodejs.org) [![Discord](https://img.shields.io/badge/Discord-Join%20Community-7289da?logo=discord&logoColor=white)](https://discord.gg/gk8jAdXWmj) -**The Universal Human-AI Collaboration Platform** +> **🚨 ALPHA VERSION DOCUMENTATION** +> +> This README documents **BMad v6 (Alpha)** - currently under active development. +> +> **To install v6 Alpha:** `npx bmad-method@alpha install` +> +> **Looking for stable v4 documentation?** [View v4 README](https://github.com/bmad-code-org/BMAD-METHOD/tree/v4-stable) +> +> **Want the stable version?** `npx bmad-method install` (installs v4.x) + +## The Universal Human-AI Collaboration Platform BMad-CORE (**C**ollaboration **O**ptimized **R**eflection **E**ngine) is a revolutionary framework that amplifies human potential through specialized AI agents. Unlike traditional AI tools that replace human thinking, BMad-CORE guides you through reflective workflows that bring out your best ideas and the AI's full capabilities. @@ -148,21 +158,13 @@ Transform creative and strategic thinking through AI-powered facilitation across Install BMad to your project using npx: ```bash +# Install v6 Alpha (this version) +npx bmad-method@alpha install + +# Install stable v4 (production-ready) npx bmad-method install ``` -> **Version Selection:** When running `npx bmad-method install`, you'll be prompted to choose: -> -> - **Stable (v4.x)** - Production-ready version -> - **Beta (v6.0.0-beta)** - Latest features with early access -> -> To install a specific version directly (skip prompt): -> -> ```bash -> npx bmad-method@4 install # Stable v4.x -> npx bmad-method@6.0.0-beta.0 install # Beta v6 -> ``` - The interactive installer will guide you through: 1. **Project location** - Where to install BMad diff --git a/docs/v4-to-v6-upgrade.md b/docs/v4-to-v6-upgrade.md index b2c30fbd..48a340a2 100644 --- a/docs/v4-to-v6-upgrade.md +++ b/docs/v4-to-v6-upgrade.md @@ -197,13 +197,13 @@ If you're using: After installation: ```bash -# In your project have the agent mode run workflow-init, in Claude Code: -/workflow-init -# or run the analyst and tell the analyst after it loads -*workflow-init +# Start the analyst and tell the analyst after it loads - claude code instructions: +claude # wait for claude to launch in terminal +- `/analyst` # wait for analyst greeting and menu +- `*workflow-init` # v6 now supports much better natural language fuzzy matching - so you could also say `workflow init` or possibly `please init the workflow` ``` -Select **Level 3 or 4** if you've already completed PRD/architecture in v4. +Since you are migrating an existing project from v4, its most likely **Level 3 or 4** you will want to suggest when asked - if you've already completed PRD/architecture in v4. --- diff --git a/tools/bmad-npx-wrapper.js b/tools/bmad-npx-wrapper.js index 126349c1..8a5ad09d 100755 --- a/tools/bmad-npx-wrapper.js +++ b/tools/bmad-npx-wrapper.js @@ -3,124 +3,7 @@ /** * BMad Method CLI - Direct execution wrapper for npx * This file ensures proper execution when run via npx from GitHub or npm registry - * Supports version selection between stable (v4) and beta (v6) */ -const { execSync } = require('node:child_process'); -const path = require('node:path'); -const fs = require('node:fs'); - -// Check if we're running in an npx temporary directory -const isNpxExecution = __dirname.includes('_npx') || __dirname.includes('.npm'); - -async function promptVersionSelection() { - const inquirer = require('inquirer'); - const chalk = require('chalk'); - - console.log( - chalk.cyan(` - ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā•— ā–ˆā–ˆā–ˆā•— ā–ˆā–ˆā–ˆā•— ā–ˆā–ˆā–ˆā–ˆā–ˆā•— ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā•— ā„¢ - ā–ˆā–ˆā•”ā•ā•ā–ˆā–ˆā•—ā–ˆā–ˆā–ˆā–ˆā•— ā–ˆā–ˆā–ˆā–ˆā•‘ā–ˆā–ˆā•”ā•ā•ā–ˆā–ˆā•—ā–ˆā–ˆā•”ā•ā•ā–ˆā–ˆā•— - ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā•”ā•ā–ˆā–ˆā•”ā–ˆā–ˆā–ˆā–ˆā•”ā–ˆā–ˆā•‘ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā•‘ā–ˆā–ˆā•‘ ā–ˆā–ˆā•‘ - ā–ˆā–ˆā•”ā•ā•ā–ˆā–ˆā•—ā–ˆā–ˆā•‘ā•šā–ˆā–ˆā•”ā•ā–ˆā–ˆā•‘ā–ˆā–ˆā•”ā•ā•ā–ˆā–ˆā•‘ā–ˆā–ˆā•‘ ā–ˆā–ˆā•‘ - ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā•”ā•ā–ˆā–ˆā•‘ ā•šā•ā• ā–ˆā–ˆā•‘ā–ˆā–ˆā•‘ ā–ˆā–ˆā•‘ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā•”ā• - ā•šā•ā•ā•ā•ā•ā• ā•šā•ā• ā•šā•ā•ā•šā•ā• ā•šā•ā•ā•šā•ā•ā•ā•ā•ā• - `), - ); - - console.log(chalk.dim(' Build More, Architect Dreams\n')); - - const answers = await inquirer.prompt([ - { - type: 'list', - name: 'version', - message: 'Which version would you like to install?', - choices: [ - { - name: chalk.green('Stable (v4.x) - Production Ready'), - value: 'stable', - short: 'Stable v4.x', - }, - { - name: chalk.yellow('Beta (v6.0.0-beta) - Latest Features (Early Access)'), - value: 'beta', - short: 'Beta v6.0.0-beta', - }, - ], - default: 'stable', - }, - ]); - - return answers.version; -} - -async function installStableVersion(args) { - const chalk = require('chalk'); - - console.log(chalk.cyan('\nšŸ“¦ Installing BMad Method v4 (Stable)...\n')); - - // Use npx to install the stable version from npm registry - // The @4 tag will fetch the latest v4.x.x version - const npxCommand = `npx bmad-method@4 ${args.join(' ')}`; - - try { - execSync(npxCommand, { - stdio: 'inherit', - cwd: process.cwd(), - }); - } catch (error) { - console.error(chalk.red('Failed to install stable version')); - process.exit(error.status || 1); - } -} - -async function installBetaVersion(args) { - const chalk = require('chalk'); - - console.log(chalk.yellow('\nšŸ“¦ Installing BMad Method v6 Beta (Early Access)...\n')); - - // Use the v6 installer from the current installation - const bmadCliPath = path.join(__dirname, 'cli', 'bmad-cli.js'); - - if (!fs.existsSync(bmadCliPath)) { - console.error(chalk.red('Error: Could not find bmad-cli.js at'), bmadCliPath); - console.error(chalk.dim('Current directory:'), __dirname); - process.exit(1); - } - - try { - execSync(`node "${bmadCliPath}" ${args.join(' ')}`, { - stdio: 'inherit', - cwd: path.dirname(__dirname), - }); - } catch (error) { - process.exit(error.status || 1); - } -} - -async function main() { - const args = process.argv.slice(2); - - // Check if user wants to skip version prompt - const skipPrompt = args.includes('--skip-version-prompt'); - const filteredArgs = args.filter((arg) => arg !== '--skip-version-prompt'); - - if (isNpxExecution && !skipPrompt) { - // Running via npx - prompt for version selection unless skipped - const selectedVersion = await promptVersionSelection(); - - if (selectedVersion === 'stable') { - await installStableVersion(filteredArgs); - } else { - await installBetaVersion(filteredArgs); - } - } else { - // Local execution or skipped prompt - use the v6 installer directly - require('./cli/bmad-cli.js'); - } -} - -main().catch((error) => { - console.error('Unexpected error:', error); - process.exit(1); -}); +// Simply delegate to the CLI tool +require('./cli/bmad-cli.js');