chore: remove version prompt from npx installer
This commit is contained in:
parent
b05f4751d7
commit
5a70512a30
30
README.md
30
README.md
|
|
@ -1,11 +1,21 @@
|
||||||
# BMad CORE v6 Beta
|
# BMad CORE + BMad Method
|
||||||
|
|
||||||
[](https://www.npmjs.com/package/bmad-method)
|
[](https://www.npmjs.com/package/bmad-method)
|
||||||
[](LICENSE)
|
[](LICENSE)
|
||||||
[](https://nodejs.org)
|
[](https://nodejs.org)
|
||||||
[](https://discord.gg/gk8jAdXWmj)
|
[](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.
|
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:
|
Install BMad to your project using npx:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
# Install v6 Alpha (this version)
|
||||||
|
npx bmad-method@alpha install
|
||||||
|
|
||||||
|
# Install stable v4 (production-ready)
|
||||||
npx bmad-method install
|
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:
|
The interactive installer will guide you through:
|
||||||
|
|
||||||
1. **Project location** - Where to install BMad
|
1. **Project location** - Where to install BMad
|
||||||
|
|
|
||||||
|
|
@ -197,13 +197,13 @@ If you're using:
|
||||||
After installation:
|
After installation:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# In your project have the agent mode run workflow-init, in Claude Code:
|
# Start the analyst and tell the analyst after it loads - claude code instructions:
|
||||||
/workflow-init
|
claude # wait for claude to launch in terminal
|
||||||
# or run the analyst and tell the analyst after it loads
|
- `/analyst` # wait for analyst greeting and menu
|
||||||
*workflow-init
|
- `*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.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,124 +3,7 @@
|
||||||
/**
|
/**
|
||||||
* BMad Method CLI - Direct execution wrapper for npx
|
* BMad Method CLI - Direct execution wrapper for npx
|
||||||
* This file ensures proper execution when run via npx from GitHub or npm registry
|
* 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');
|
// Simply delegate to the CLI tool
|
||||||
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');
|
require('./cli/bmad-cli.js');
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
main().catch((error) => {
|
|
||||||
console.error('Unexpected error:', error);
|
|
||||||
process.exit(1);
|
|
||||||
});
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue