feat: Add --with-audio flag for first-time AgentVibes installations

Automatically includes --with-audio parameter when installing AgentVibes
for the first time (detects by checking if .agentvibes directory exists).
This ensures new users get audio tracks downloaded automatically.

Updates skip --with-audio to avoid re-downloading existing audio files.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Paul Preibisch 2025-12-07 15:39:17 -07:00
parent 9a36a00b17
commit 6f95e04df7
1 changed files with 9 additions and 1 deletions

View File

@ -84,6 +84,9 @@ module.exports = {
// Run AgentVibes installer
const { execSync } = require('node:child_process');
const fs = require('node:fs');
const path = require('node:path');
try {
// Clear ALL npm config env vars to prevent inheritance issues
// when BMAD is invoked with --prefix flag
@ -92,7 +95,12 @@ module.exports = {
Object.entries(process.env).filter(([key]) => !key.startsWith('npm_config_') && !key.startsWith('npm_package_')),
);
execSync('npx agentvibes@latest install', {
// Check if this is first-time AgentVibes installation
const agentvibesDir = path.join(result.projectDir, '.agentvibes');
const isFirstTime = !fs.existsSync(agentvibesDir);
const installCmd = isFirstTime ? 'npx agentvibes@latest install --with-audio' : 'npx agentvibes@latest install';
execSync(installCmd, {
cwd: result.projectDir,
stdio: 'inherit',
shell: true,