agentvibes 2.0.23 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/installer.js CHANGED
@@ -602,6 +602,62 @@ async function install(options = {}) {
602
602
 
603
603
  spinner.succeed(chalk.green(`Provider set to: ${selectedProvider === 'elevenlabs' ? 'ElevenLabs' : 'Piper TTS'}\n`));
604
604
 
605
+ // Auto-install Piper if selected and not already installed
606
+ if (selectedProvider === 'piper') {
607
+ try {
608
+ const { execSync } = await import('node:child_process');
609
+
610
+ // Check if piper is installed
611
+ try {
612
+ execSync('piper --version', { stdio: 'ignore' });
613
+ console.log(chalk.green('✅ Piper TTS is already installed\n'));
614
+ } catch {
615
+ // Piper not installed - offer to install it
616
+ console.log(chalk.yellow('⚠️ Piper TTS binary not detected\n'));
617
+
618
+ let installPiper = true;
619
+ if (!options.yes) {
620
+ const { confirmPiperInstall } = await inquirer.prompt([
621
+ {
622
+ type: 'confirm',
623
+ name: 'confirmPiperInstall',
624
+ message: 'Would you like to install Piper TTS now? (Recommended)',
625
+ default: true,
626
+ },
627
+ ]);
628
+ installPiper = confirmPiperInstall;
629
+ }
630
+
631
+ if (installPiper) {
632
+ console.log(chalk.cyan('\n📦 Installing Piper TTS...\n'));
633
+ const piperInstallerPath = path.join(hooksDir, 'piper-installer.sh');
634
+
635
+ try {
636
+ execSync(`bash "${piperInstallerPath}"`, {
637
+ stdio: 'inherit',
638
+ env: process.env
639
+ });
640
+ console.log(chalk.green('\n✅ Piper TTS installed successfully!\n'));
641
+ } catch (error) {
642
+ console.log(chalk.yellow('\n⚠️ Piper installation failed or was cancelled'));
643
+ console.log(chalk.gray(' You can install it later by running:'));
644
+ console.log(chalk.cyan(` bash "${piperInstallerPath}"`));
645
+ console.log(chalk.gray(' Or manually: pipx install piper-tts\n'));
646
+ }
647
+ } else {
648
+ console.log(chalk.yellow('\n⚠️ Skipping Piper installation'));
649
+ console.log(chalk.gray(' You can install it later by running:'));
650
+ console.log(chalk.cyan(` ${targetDir}/.claude/hooks/piper-installer.sh`));
651
+ console.log(chalk.gray(' Or manually: pipx install piper-tts\n'));
652
+ }
653
+ }
654
+ } catch (error) {
655
+ // execSync import failed - skip auto-install
656
+ console.log(chalk.yellow('⚠️ Unable to auto-detect Piper installation'));
657
+ console.log(chalk.gray(' Install manually if needed: pipx install piper-tts\n'));
658
+ }
659
+ }
660
+
605
661
  // List what was installed
606
662
  console.log(chalk.cyan('📦 Installation Summary:'));
607
663
  console.log(chalk.white(` • ${commandFiles.length} slash commands installed`));