Skip to content

feat: add non-interactive installation support#1520

Merged
bmadcode merged 4 commits intobmad-code-org:mainfrom
wladimiiir:feat/non-interactive-install
Feb 6, 2026
Merged

feat: add non-interactive installation support#1520
bmadcode merged 4 commits intobmad-code-org:mainfrom
wladimiiir:feat/non-interactive-install

Conversation

@wladimiiir
Copy link
Copy Markdown
Contributor

Summary

  • Add command-line flags to support non-interactive installation for CI/CD pipelines and automated deployments
  • When flags are provided, prompts are skipped; missing values gracefully fall back to interactive prompts
  • Support --tools none to explicitly skip tool configuration

New CLI Options

Flag Description
--directory <path> Installation directory
--modules <modules> Comma-separated module IDs (e.g., "bmm,bmb")
--tools <tools> Tool/IDE IDs (use "none" to skip)
--custom-content <paths> Custom module paths
--action <type> Action type for existing installations
--user-name <name> Name for agents to use
--communication-language <lang> Agent communication language
--document-output-language <lang> Document output language
--output-folder <path> Output folder path
-y, --yes Accept all defaults and skip prompts

Example Usage

# Fully non-interactive
npx bmad-method install \
  --directory ~/myproject \
  --modules bmm,bmb \
  --tools claude-code \
  --yes

# Skip tool configuration
npx bmad-method install --directory ~/myproject --modules bmm --tools none

# Semi-interactive (prompts for missing values)
npx bmad-method install --directory ~/myproject --modules bmm

Test plan

  • Test fresh installation with all flags
  • Test installation with --tools none
  • Test installation with --yes flag
  • Test partial flags (should prompt for missing values)
  • Test invalid flag values (should show error)
  • Verify interactive mode still works as before

🤖 Generated by AiderDesk

@wladimiiir wladimiiir force-pushed the feat/non-interactive-install branch from 676595e to ce8a43a Compare February 3, 2026 21:59
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 3, 2026

📝 Walkthrough

Walkthrough

This change adds non-interactive installation support to BMAD's CLI, introducing command-line flags for automated workflows. Updates include new documentation, expanded CLI options, and modified prompt logic to respect provided configuration values and skip interactive prompts when options are supplied.

Changes

Cohort / File(s) Summary
Documentation
README.md, docs/non-interactive-installation.md
Added Non-Interactive Installation section to README with example usage; created comprehensive guide documenting installation modes, CLI flags, supported actions, module/tool IDs, CI/CD examples, and troubleshooting.
CLI Command & UI Layer
tools/cli/commands/install.js, tools/cli/lib/ui.js
Expanded install command with 11 new CLI flags (directory, modules, tools, custom-content, action, user-name, communication-language, document-output-language, output-folder, yes). Modified UI methods to accept options parameter and conditionally bypass prompts or preset values based on CLI-provided configuration.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • bmadcode
  • alexeyv
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: add non-interactive installation support' directly and clearly describes the main objective of the changeset, which is to add non-interactive installation capabilities via command-line flags.
Description check ✅ Passed The description comprehensively explains the feature, documents all new CLI options with a clear table, provides multiple usage examples, and outlines a test plan, all directly related to the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Important

Action Needed: IP Allowlist Update

If your organization protects your Git platform with IP whitelisting, please add the new CodeRabbit IP address to your allowlist:

  • 136.113.208.247/32 (new)
  • 34.170.211.100/32
  • 35.222.179.152/32

Reviews will stop working after February 8, 2026 if the new IP is not added to your allowlist.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@wladimiiir wladimiiir force-pushed the feat/non-interactive-install branch from ce8a43a to 29c26f5 Compare February 3, 2026 22:03
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@tools/cli/lib/ui.js`:
- Around line 753-761: The code assumes os.userInfo() always succeeds when
computing defaultUsername; wrap the os.userInfo() call in a safe fallback: first
try calling os.userInfo() in a try/catch (or guard with typeof), fall back to
process.env.USER || process.env.USERNAME || 'User' if it throws or is undefined,
then compute defaultUsername by capitalizing the first character of that safe
username and assign it to configCollector.collectedConfig.core.user_name; ensure
the console message and existing keys (existingConfig,
configCollector.collectedConfig.core, defaultUsername) remain unchanged
otherwise.
- Around line 317-325: Wrap the module.yaml reading and parsing in a try/catch
to avoid crashes: around the logic that builds moduleYamlPath, reads moduleYaml
with fs.readFile and calls yaml.parse to produce moduleMeta, catch any errors
and log a graceful warning (using console.log/chalk.yellow) that includes the
customPath and the error message, then continue the loop instead of throwing;
ensure you reference moduleYamlPath, moduleYaml, yaml.parse and moduleMeta when
locating where to add the try/catch.
🧹 Nitpick comments (2)
tools/cli/lib/ui.js (2)

296-340: Code duplication: custom content parsing logic appears twice.

The custom content parsing logic (splitting paths, validating, reading module.yaml, building config) is nearly identical here and in lines 407-448 for the new installation flow. Consider extracting this into a helper method to reduce duplication and ensure consistent behavior.

♻️ Suggested helper extraction
+  /**
+   * Parse custom content paths from command-line option
+   * `@param` {string} customContentOption - Comma-separated paths
+   * `@returns` {Object} Custom content config with paths and module IDs
+   */
+  async parseCustomContentPaths(customContentOption) {
+    const paths = customContentOption
+      .split(',')
+      .map((p) => p.trim())
+      .filter(Boolean);
+    console.log(chalk.cyan('Using custom content from command-line:'), chalk.bold(paths.join(', ')));
+
+    const customPaths = [];
+    const selectedModuleIds = [];
+
+    for (const customPath of paths) {
+      const expandedPath = this.expandUserPath(customPath);
+      const validation = this.validateCustomContentPathSync(expandedPath);
+      if (validation !== true) {
+        console.log(chalk.yellow(`⚠️  Skipping invalid custom content path: ${customPath} - ${validation}`));
+        continue;
+      }
+
+      try {
+        const moduleYamlPath = path.join(expandedPath, 'module.yaml');
+        const moduleYaml = await fs.readFile(moduleYamlPath, 'utf-8');
+        const yaml = require('yaml');
+        const moduleMeta = yaml.parse(moduleYaml);
+
+        if (!moduleMeta.code) {
+          console.log(chalk.yellow(`⚠️  Skipping custom content path: ${customPath} - module.yaml missing 'code' field`));
+          continue;
+        }
+
+        customPaths.push(expandedPath);
+        selectedModuleIds.push(moduleMeta.code);
+      } catch (error) {
+        console.log(chalk.yellow(`⚠️  Skipping custom content path: ${customPath} - ${error.message}`));
+      }
+    }
+
+    return { customPaths, selectedModuleIds };
+  }

573-585: Consider validating tool IDs from command-line.

When tools are provided via --tools, invalid IDs are silently accepted. Per the documentation, the system should "warn about invalid tool IDs (but won't fail)". Adding validation here would improve user feedback.

🔧 Optional validation
     } else {
       selectedIdes = options.tools
         .split(',')
         .map((t) => t.trim())
         .filter(Boolean);
+
+      // Validate tool IDs and warn about invalid ones
+      const allValidTools = [...preferredIdes, ...otherIdes].map((ide) => ide.value);
+      const invalidTools = selectedIdes.filter((t) => !allValidTools.includes(t));
+      if (invalidTools.length > 0) {
+        console.log(chalk.yellow(`⚠️  Unknown tool ID(s): ${invalidTools.join(', ')} (will be skipped)`));
+        selectedIdes = selectedIdes.filter((t) => allValidTools.includes(t));
+      }
+
       console.log(chalk.cyan('Using tools from command-line:'), chalk.bold(selectedIdes.join(', ')));
     }

Add command-line flags to support non-interactive installation for CI/CD
pipelines and automated deployments:

- --directory: Installation directory
- --modules: Comma-separated module IDs
- --tools: Tool/IDE IDs (use "none" to skip)
- --custom-content: Custom module paths
- --action: Action type for existing installations
- --user-name, --communication-language, --document-output-language, --output-folder: Core config
- -y, --yes: Accept all defaults

When flags are provided, prompts are skipped. Missing values gracefully
fall back to interactive prompts.
@wladimiiir wladimiiir force-pushed the feat/non-interactive-install branch from 29c26f5 to c18944f Compare February 3, 2026 22:08
@bmadcode
Copy link
Copy Markdown
Collaborator

bmadcode commented Feb 4, 2026

can you update this against the latest, would love to get this in - there is a conflict @wladimiiir

Integrated non-interactive tool selection support with the new
autocompleteMultiselect UI from main.

Co-Authored-By: AiderDesk <https://github.com/hotovo/aider-desk>
- Fix validation checks using truthy instead of !== true
- Add skipPrompts flag to skip module config prompts with --yes
- Add getDefaultModules() for automatic module selection with --yes
- Fix IDE selection to use array check instead of length check

Co-Authored-By: AiderDesk <https://github.com/hotovo/aider-desk>
@wladimiiir
Copy link
Copy Markdown
Contributor Author

@bmadcode
Conflicts resolved!

@bmadcode
Copy link
Copy Markdown
Collaborator

bmadcode commented Feb 6, 2026

Thank you @wladimiiir this is a great add for the final release! Will run some more testing on it also

@bmadcode bmadcode merged commit 22601f8 into bmad-code-org:main Feb 6, 2026
5 checks passed
dickymoore pushed a commit to dickymoore/BMAD-METHOD that referenced this pull request Feb 6, 2026
* feat: add non-interactive installation support

Add command-line flags to support non-interactive installation for CI/CD
pipelines and automated deployments:

- --directory: Installation directory
- --modules: Comma-separated module IDs
- --tools: Tool/IDE IDs (use "none" to skip)
- --custom-content: Custom module paths
- --action: Action type for existing installations
- --user-name, --communication-language, --document-output-language, --output-folder: Core config
- -y, --yes: Accept all defaults

When flags are provided, prompts are skipped. Missing values gracefully
fall back to interactive prompts.

* fix: complete non-interactive installation support

- Fix validation checks using truthy instead of !== true
- Add skipPrompts flag to skip module config prompts with --yes
- Add getDefaultModules() for automatic module selection with --yes
- Fix IDE selection to use array check instead of length check

Co-Authored-By: AiderDesk <https://github.com/hotovo/aider-desk>

---------

Co-authored-by: Brian <bmadcode@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants