marketing-agent-team 1.0.0 → 1.0.1

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.
Files changed (2) hide show
  1. package/install.js +62 -5
  2. package/package.json +1 -1
package/install.js CHANGED
@@ -45,6 +45,57 @@ function banner() {
45
45
  console.log('');
46
46
  }
47
47
 
48
+ async function installBMAD() {
49
+ log('🚀 Auto-installing BMAD...', 'yellow');
50
+
51
+ try {
52
+ log(' Cloning BMAD repository...', 'cyan');
53
+ execSync('git clone --depth 1 https://github.com/bmad-code-org/BMAD-METHOD.git _bmad-temp', {
54
+ stdio: 'inherit',
55
+ cwd: process.cwd()
56
+ });
57
+
58
+ // Move contents to _bmad
59
+ const tempDir = path.join(process.cwd(), '_bmad-temp');
60
+ const bmadDir = path.join(process.cwd(), '_bmad');
61
+
62
+ // Create _bmad directory
63
+ if (!fs.existsSync(bmadDir)) {
64
+ fs.mkdirSync(bmadDir, { recursive: true });
65
+ }
66
+
67
+ // Copy contents from temp to _bmad
68
+ const copyDir = (src, dest) => {
69
+ const entries = fs.readdirSync(src, { withFileTypes: true });
70
+ for (const entry of entries) {
71
+ const srcPath = path.join(src, entry.name);
72
+ const destPath = path.join(dest, entry.name);
73
+ if (entry.isDirectory()) {
74
+ if (!fs.existsSync(destPath)) {
75
+ fs.mkdirSync(destPath, { recursive: true });
76
+ }
77
+ copyDir(srcPath, destPath);
78
+ } else {
79
+ fs.copyFileSync(srcPath, destPath);
80
+ }
81
+ }
82
+ };
83
+
84
+ copyDir(tempDir, bmadDir);
85
+
86
+ // Clean up temp directory
87
+ fs.rmSync(tempDir, { recursive: true, force: true });
88
+
89
+ log('✅ BMAD installed successfully!', 'green');
90
+ return true;
91
+ } catch (error) {
92
+ log(`❌ Failed to install BMAD: ${error.message}`, 'red');
93
+ log(' Please install BMAD manually:', 'yellow');
94
+ log(' Visit: https://github.com/bmad-code-org/BMAD-METHOD', 'cyan');
95
+ return false;
96
+ }
97
+ }
98
+
48
99
  async function checkBMAD() {
49
100
  log('📋 Checking BMAD installation...', 'yellow');
50
101
 
@@ -53,11 +104,17 @@ async function checkBMAD() {
53
104
  log('⚠️ BMAD structure not found in current directory!', 'yellow');
54
105
  log(' This module requires BMAD to be installed.', 'yellow');
55
106
  log('');
56
- log(' To install BMAD:', 'cyan');
57
- log(' 1. Visit: https://github.com/your-org/bmad', 'cyan');
58
- log(' 2. Follow installation instructions', 'cyan');
59
- log(' 3. Run this installer again from a BMAD project', 'cyan');
60
- return false;
107
+ log(' Would you like to auto-install BMAD?', 'cyan');
108
+ log(' (This will clone the BMAD repository to your project)', 'yellow');
109
+ log('');
110
+ log(' To manually install BMAD later, visit:', 'cyan');
111
+ log(' https://github.com/bmad-code-org/BMAD-METHOD', 'bright');
112
+
113
+ // Auto-install BMAD
114
+ const success = await installBMAD();
115
+ if (!success) {
116
+ return false;
117
+ }
61
118
  }
62
119
 
63
120
  log('✅ BMAD structure detected', 'green');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "marketing-agent-team",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Your Complete AI-Powered Marketing Team - 7 specialized agents for brand strategy, content creation, and performance analytics",
5
5
  "main": "index.js",
6
6
  "bin": {