Compare commits

...

4 Commits

Author SHA1 Message Date
Murat K Ozcan 724a1a7da0
Merge 1e0196b2cc into d19cca79d2 2026-01-08 09:50:49 +01:00
Q00 d19cca79d2
fix: resolve ERR_REQUIRE_ESM by using dynamic import for inquirer (#1278)
Inquirer v9+ is ESM-only, causing ERR_REQUIRE_ESM when loaded via
require() in CommonJS. Convert all require('inquirer') calls to
dynamic import('inquirer') across 8 CLI files.

Fixes #1197
2026-01-08 15:42:22 +08:00
Alex Verkhovsky 8e165b9b57
chore: enable CodeRabbit auto-review on new PRs (#1276) 2026-01-08 07:59:30 +08:00
Alex Verkhovsky 67b70288a6
docs: update README links to new documentation site (#1274) 2026-01-08 07:58:53 +08:00
10 changed files with 59 additions and 29 deletions

View File

@ -11,8 +11,8 @@ reviews:
walkthrough: false
poem: false
auto_review:
enabled: false
drafts: true # Can review drafts. Since it's manually triggered, it's fine.
enabled: true
drafts: false # Don't review drafts automatically
auto_incremental_review: false # always review the whole PR, not just new commits
base_branches:
- main

View File

@ -24,8 +24,8 @@ The completely revamped **BMAD V6 installer** now includes built-in support for
**📚 Learn More:**
- [**Custom Content Overview**](docs/modules/bmb-bmad-builder/custom-content.md) - Discover all supported content types
- [**Installation Guide**](docs/modules/bmb-bmad-builder/custom-content-installation.md) - Learn to create and install custom content
- [**Custom Content Overview**](http://docs.bmad-method.org/explanation/bmad-builder/custom-content-types/) - Discover all supported content types
- [**Installation Guide**](http://docs.bmad-method.org/how-to/installation/install-custom-modules/) - Learn to create and install custom content
- [**2 Very simple Custom Modules of questionable quality**](./samples/sample-custom-modules/README.md) - if you want to download and try to install a custom shared module, get an idea of how to bundle and share your own, or create your own personal agents, workflows and modules.
</div>
@ -67,7 +67,7 @@ With **BMad Builder**, you can architect both simple agents and vastly complex d
## 📊 See It In Action
<p align="center">
<img src="./docs/modules/bmm-bmad-method/images/workflow-method-greenfield.svg" alt="BMad Method Workflow" width="100%">
<img src="./docs/tutorials/getting-started/images/workflow-method-greenfield.svg" alt="BMad Method Workflow" width="100%">
</p>
<p align="center">
@ -146,17 +146,17 @@ Each agent brings deep expertise and can be customized to match your team's styl
- 12 specialized agents
- 34 workflows across 4 phases
- Stand Along Quick Spec Flow for a streamlined simple implementation process
- [→ Documentation Hub](./docs/modules/bmm-bmad-method/index.md)
- [→ Documentation Hub](http://docs.bmad-method.org/explanation/bmm/)
- **BMad Builder (BMB)** - Create custom agents and workflows
- Build anything from simple agents to complex modules
- Create domain-specific solutions (legal, medical, finance, education)
- [→ Builder Guide](./docs/modules/bmb-bmad-builder/index.md)
- [→ Builder Guide](http://docs.bmad-method.org/explanation/bmad-builder/)
- **Creative Intelligence Suite (CIS)** - Innovation & problem-solving
- Brainstorming, design thinking, storytelling
- 5 creative facilitation workflows
- [→ Creative Workflows](./docs/modules/cis-creative-intelligence-suite/index.md)
- [→ Creative Workflows](http://docs.bmad-method.org/explanation/creative-intelligence/)
### Key Features
@ -170,15 +170,15 @@ Each agent brings deep expertise and can be customized to match your team's styl
### Quick Links
- **[Quick Start Guide](./docs/modules/bmm-bmad-method/quick-start.md)** - 15-minute introduction
- **[Complete BMM Documentation](./docs/modules/bmm-bmad-method/index.md)** - All guides and references
- **[Agent Customization](docs/bmad-customization/agent-customization-guide.md)** - Personalize your agents
- **[All Documentation](./docs/index.md)** - Complete documentation index
- **[Quick Start Guide](http://docs.bmad-method.org/tutorials/getting-started/getting-started-bmadv6/)** - 15-minute introduction
- **[Complete BMM Documentation](http://docs.bmad-method.org/explanation/bmm/)** - All guides and references
- **[Agent Customization](http://docs.bmad-method.org/how-to/customization/customize-agents/)** - Personalize your agents
- **[All Documentation](http://docs.bmad-method.org/)** - Complete documentation index
### For v4 Users
- **[v4 Documentation](https://github.com/bmad-code-org/BMAD-METHOD/tree/V4/docs)**
- **[v4 to v6 Upgrade Guide](./docs/v4-to-v6-upgrade.md)**
- **[v4 to v6 Upgrade Guide](http://docs.bmad-method.org/how-to/installation/upgrade-to-v6/)**
## 💬 Community & Support
@ -211,7 +211,7 @@ If you would like to contribute, first check the [CONTRIBUTING.md](CONTRIBUTING.
### 🔄 For v4 Users
- **[Comprehensive Upgrade Guide](./docs/v4-to-v6-upgrade.md)** - Step-by-step migration
- **[Comprehensive Upgrade Guide](http://docs.bmad-method.org/how-to/installation/upgrade-to-v6/)** - Step-by-step migration
- **[v4 Documentation Archive](https://github.com/bmad-code-org/BMAD-METHOD/tree/V4)** - Legacy reference
- Backwards compatibility where possible
- Smooth migration path with installer detection

View File

@ -1,6 +1,5 @@
const chalk = require('chalk');
const path = require('node:path');
const inquirer = require('inquirer').default || require('inquirer');
const { Installer } = require('../installers/lib/core/installer');
const { UI } = require('../lib/ui');
@ -72,6 +71,7 @@ module.exports = {
console.log(chalk.dim(' • ElevenLabs AI (150+ premium voices)'));
console.log(chalk.dim(' • Piper TTS (50+ free voices)\n'));
const { default: inquirer } = await import('inquirer');
await inquirer.prompt([
{
type: 'input',

View File

@ -2,10 +2,18 @@ const path = require('node:path');
const fs = require('fs-extra');
const yaml = require('yaml');
const chalk = require('chalk');
const inquirer = require('inquirer').default || require('inquirer');
const { getProjectRoot, getModulePath } = require('../../../lib/project-root');
const { CLIUtils } = require('../../../lib/cli-utils');
// Lazy-load inquirer (ESM module) to avoid ERR_REQUIRE_ESM
let _inquirer = null;
async function getInquirer() {
if (!_inquirer) {
_inquirer = (await import('inquirer')).default;
}
return _inquirer;
}
class ConfigCollector {
constructor() {
this.collectedConfig = {};
@ -175,6 +183,7 @@ class ConfigCollector {
* @returns {boolean} True if new fields were prompted, false if all fields existed
*/
async collectModuleConfigQuick(moduleName, projectDir, silentMode = true) {
const inquirer = await getInquirer();
this.currentProjectDir = projectDir;
// Load existing config if not already loaded
@ -493,6 +502,7 @@ class ConfigCollector {
* @param {boolean} skipCompletion - Skip showing completion message (for early core collection)
*/
async collectModuleConfig(moduleName, projectDir, skipLoadExisting = false, skipCompletion = false) {
const inquirer = await getInquirer();
this.currentProjectDir = projectDir;
// Load existing config if needed and not already loaded
if (!skipLoadExisting && !this.existingConfig) {

View File

@ -2,7 +2,6 @@ const path = require('node:path');
const fs = require('fs-extra');
const chalk = require('chalk');
const ora = require('ora');
const inquirer = require('inquirer').default || require('inquirer');
const { Detector } = require('./detector');
const { Manifest } = require('./manifest');
const { ModuleManager } = require('../modules/manager');
@ -2140,7 +2139,7 @@ class Installer {
* Private: Prompt for update action
*/
async promptUpdateAction() {
const inquirer = require('inquirer').default || require('inquirer');
const { default: inquirer } = await import('inquirer');
return await inquirer.prompt([
{
type: 'list',
@ -2157,7 +2156,7 @@ class Installer {
* @param {Object} _legacyV4 - Legacy V4 detection result (unused in simplified version)
*/
async handleLegacyV4Migration(_projectDir, _legacyV4) {
const inquirer = require('inquirer').default || require('inquirer');
const { default: inquirer } = await import('inquirer');
console.log('');
console.log(chalk.yellow.bold('⚠️ Legacy BMAD v4 detected'));
@ -2438,7 +2437,7 @@ class Installer {
console.log(chalk.yellow(`\n⚠️ Found ${customModulesWithMissingSources.length} custom module(s) with missing sources:`));
const inquirer = require('inquirer').default || require('inquirer');
const { default: inquirer } = await import('inquirer');
let keptCount = 0;
let updatedCount = 0;
let removedCount = 0;

View File

@ -58,7 +58,7 @@ class AntigravitySetup extends BaseIdeSetup {
if (config.subagentChoices.install !== 'none') {
// Ask for installation location
const inquirer = require('inquirer').default || require('inquirer');
const { default: inquirer } = await import('inquirer');
const locationAnswer = await inquirer.prompt([
{
type: 'list',
@ -297,7 +297,7 @@ class AntigravitySetup extends BaseIdeSetup {
choices = await this.promptSubagentInstallation(config.subagents);
if (choices.install !== 'none') {
const inquirer = require('inquirer').default || require('inquirer');
const { default: inquirer } = await import('inquirer');
const locationAnswer = await inquirer.prompt([
{
type: 'list',
@ -334,7 +334,7 @@ class AntigravitySetup extends BaseIdeSetup {
* Prompt user for subagent installation preferences
*/
async promptSubagentInstallation(subagentConfig) {
const inquirer = require('inquirer').default || require('inquirer');
const { default: inquirer } = await import('inquirer');
// First ask if they want to install subagents
const { install } = await inquirer.prompt([

View File

@ -57,7 +57,7 @@ class ClaudeCodeSetup extends BaseIdeSetup {
if (config.subagentChoices.install !== 'none') {
// Ask for installation location
const inquirer = require('inquirer').default || require('inquirer');
const { default: inquirer } = await import('inquirer');
const locationAnswer = await inquirer.prompt([
{
type: 'list',
@ -305,7 +305,7 @@ class ClaudeCodeSetup extends BaseIdeSetup {
choices = await this.promptSubagentInstallation(config.subagents);
if (choices.install !== 'none') {
const inquirer = require('inquirer').default || require('inquirer');
const { default: inquirer } = await import('inquirer');
const locationAnswer = await inquirer.prompt([
{
type: 'list',
@ -342,7 +342,7 @@ class ClaudeCodeSetup extends BaseIdeSetup {
* Prompt user for subagent installation preferences
*/
async promptSubagentInstallation(subagentConfig) {
const inquirer = require('inquirer').default || require('inquirer');
const { default: inquirer } = await import('inquirer');
// First ask if they want to install subagents
const { install } = await inquirer.prompt([

View File

@ -21,7 +21,7 @@ class CodexSetup extends BaseIdeSetup {
* @returns {Object} Collected configuration
*/
async collectConfiguration(options = {}) {
const inquirer = require('inquirer').default || require('inquirer');
const { default: inquirer } = await import('inquirer');
let confirmed = false;
let installLocation = 'global';

View File

@ -1,7 +1,6 @@
const path = require('node:path');
const { BaseIdeSetup } = require('./_base-ide');
const chalk = require('chalk');
const inquirer = require('inquirer').default || require('inquirer');
const { AgentCommandGenerator } = require('./shared/agent-command-generator');
/**
@ -22,6 +21,7 @@ class GitHubCopilotSetup extends BaseIdeSetup {
* @returns {Object} Collected configuration
*/
async collectConfiguration(options = {}) {
const { default: inquirer } = await import('inquirer');
const config = {};
console.log('\n' + chalk.blue(' 🔧 VS Code Settings Configuration'));

View File

@ -1,11 +1,19 @@
const chalk = require('chalk');
const inquirer = require('inquirer').default || require('inquirer');
const path = require('node:path');
const os = require('node:os');
const fs = require('fs-extra');
const { CLIUtils } = require('./cli-utils');
const { CustomHandler } = require('../installers/lib/custom/handler');
// Lazy-load inquirer (ESM module) to avoid ERR_REQUIRE_ESM
let _inquirer = null;
async function getInquirer() {
if (!_inquirer) {
_inquirer = (await import('inquirer')).default;
}
return _inquirer;
}
/**
* UI utilities for the installer
*/
@ -15,6 +23,7 @@ class UI {
* @returns {Object} Installation configuration
*/
async promptInstall() {
const inquirer = await getInquirer();
CLIUtils.displayLogo();
// Display version-specific start message from install-messages.yaml
@ -450,6 +459,7 @@ class UI {
* @returns {Object} Tool configuration
*/
async promptToolSelection(projectDir, selectedModules) {
const inquirer = await getInquirer();
// Check for existing configured IDEs - use findBmadDir to detect custom folder names
const { Detector } = require('../installers/lib/core/detector');
const { Installer } = require('../installers/lib/core/installer');
@ -582,6 +592,7 @@ class UI {
* @returns {Object} Update configuration
*/
async promptUpdate() {
const inquirer = await getInquirer();
const answers = await inquirer.prompt([
{
type: 'confirm',
@ -606,6 +617,7 @@ class UI {
* @returns {Array} Selected modules
*/
async promptModules(modules) {
const inquirer = await getInquirer();
const choices = modules.map((mod) => ({
name: `${mod.name} - ${mod.description}`,
value: mod.id,
@ -637,6 +649,7 @@ class UI {
* @returns {boolean} User confirmation
*/
async confirm(message, defaultValue = false) {
const inquirer = await getInquirer();
const { confirmed } = await inquirer.prompt([
{
type: 'confirm',
@ -743,6 +756,7 @@ class UI {
* @returns {Array} Module choices for inquirer
*/
async getModuleChoices(installedModuleIds, customContentConfig = null) {
const inquirer = await getInquirer();
const moduleChoices = [];
const isNewInstallation = installedModuleIds.size === 0;
@ -823,6 +837,7 @@ class UI {
* @returns {Array} Selected module IDs
*/
async selectModules(moduleChoices, defaultSelections = []) {
const inquirer = await getInquirer();
const moduleAnswer = await inquirer.prompt([
{
type: 'checkbox',
@ -843,6 +858,7 @@ class UI {
* @returns {Object} Directory answer from inquirer
*/
async promptForDirectory() {
const inquirer = await getInquirer();
return await inquirer.prompt([
{
type: 'input',
@ -899,6 +915,7 @@ class UI {
* @returns {boolean} Whether user confirmed
*/
async confirmDirectory(directory) {
const inquirer = await getInquirer();
const dirExists = await fs.pathExists(directory);
if (dirExists) {
@ -1085,6 +1102,7 @@ class UI {
* - GitHub Issue: paulpreibisch/AgentVibes#36
*/
async promptAgentVibes(projectDir) {
const inquirer = await getInquirer();
CLIUtils.displaySection('🎤 Voice Features', 'Enable TTS for multi-agent conversations');
// Check if AgentVibes is already installed
@ -1235,6 +1253,7 @@ class UI {
* @returns {Object} Custom content configuration
*/
async promptCustomContentSource() {
const inquirer = await getInquirer();
const customContentConfig = { hasCustomContent: true, sources: [] };
// Keep asking for more sources until user is done
@ -1372,6 +1391,7 @@ class UI {
* @returns {Object} Result with selected custom modules and custom content config
*/
async handleCustomModulesInModifyFlow(directory, selectedModules) {
const inquirer = await getInquirer();
// Get existing installation to find custom modules
const { existingInstall } = await this.getExistingInstallation(directory);
@ -1566,6 +1586,7 @@ class UI {
* @returns {Promise<boolean>} True if user wants to proceed, false if they cancel
*/
async showOldAlphaVersionWarning(installedVersion, currentVersion, bmadFolderName) {
const inquirer = await getInquirer();
const versionInfo = this.checkAlphaVersionAge(installedVersion, currentVersion);
// Also warn if version is unknown or can't be parsed (legacy/unsupported)