bmad-method 4.14.1 → 4.15.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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [4.15.0](https://github.com/bmadcode/BMAD-METHOD/compare/v4.14.1...v4.15.0) (2025-06-26)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* Add Gemini CLI Integration ([#271](https://github.com/bmadcode/BMAD-METHOD/issues/271)) ([44b9d7b](https://github.com/bmadcode/BMAD-METHOD/commit/44b9d7bcb5cbb6de5a15d8f2ec7918d186ac9576))
|
|
7
|
+
|
|
1
8
|
## [4.14.1](https://github.com/bmadcode/BMAD-METHOD/compare/v4.14.0...v4.14.1) (2025-06-26)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
|
@@ -50,7 +50,7 @@ program
|
|
|
50
50
|
.option('-t, --team <team>', 'Install specific team with required agents and dependencies')
|
|
51
51
|
.option('-x, --expansion-only', 'Install only expansion packs (no bmad-core)')
|
|
52
52
|
.option('-d, --directory <path>', 'Installation directory (default: .bmad-core)')
|
|
53
|
-
.option('-i, --ide <ide...>', 'Configure for specific IDE(s) - can specify multiple (cursor, claude-code, windsurf, roo, cline, other)')
|
|
53
|
+
.option('-i, --ide <ide...>', 'Configure for specific IDE(s) - can specify multiple (cursor, claude-code, windsurf, roo, cline, gemini, other)')
|
|
54
54
|
.option('-e, --expansion-packs <packs...>', 'Install specific expansion packs (can specify multiple)')
|
|
55
55
|
.action(async (options) => {
|
|
56
56
|
try {
|
|
@@ -314,7 +314,8 @@ async function promptInstallation() {
|
|
|
314
314
|
{ name: 'Claude Code', value: 'claude-code' },
|
|
315
315
|
{ name: 'Windsurf', value: 'windsurf' },
|
|
316
316
|
{ name: 'Roo Code', value: 'roo' },
|
|
317
|
-
{ name: 'Cline', value: 'cline' }
|
|
317
|
+
{ name: 'Cline', value: 'cline' },
|
|
318
|
+
{ name: 'Gemini CLI', value: 'gemini' }
|
|
318
319
|
]
|
|
319
320
|
}
|
|
320
321
|
]);
|
|
@@ -101,6 +101,16 @@ ide-configurations:
|
|
|
101
101
|
# 2. Type @agent-name (e.g., "@dev", "@pm", "@architect")
|
|
102
102
|
# 3. The agent will adopt that persona for the conversation
|
|
103
103
|
# 4. Rules are stored in .clinerules/ directory in your project
|
|
104
|
+
gemini:
|
|
105
|
+
name: Gemini CLI
|
|
106
|
+
rule-dir: .gemini/agents/
|
|
107
|
+
format: context-files
|
|
108
|
+
instructions: |
|
|
109
|
+
# To use BMAD agents with the Gemini CLI:
|
|
110
|
+
# 1. The installer creates a .gemini/ directory in your project.
|
|
111
|
+
# 2. It also configures .gemini/settings.json to load all agent files.
|
|
112
|
+
# 3. Simply mention the agent in your prompt (e.g., "As @dev, ...").
|
|
113
|
+
# 4. The Gemini CLI will automatically have the context for that agent.
|
|
104
114
|
available-agents:
|
|
105
115
|
- id: analyst
|
|
106
116
|
name: Business Analyst
|
|
@@ -33,6 +33,8 @@ class IdeSetup {
|
|
|
33
33
|
return this.setupRoo(installDir, selectedAgent);
|
|
34
34
|
case "cline":
|
|
35
35
|
return this.setupCline(installDir, selectedAgent);
|
|
36
|
+
case "gemini":
|
|
37
|
+
return this.setupGeminiCli(installDir, selectedAgent);
|
|
36
38
|
default:
|
|
37
39
|
console.log(chalk.yellow(`\nIDE ${ide} not yet supported`));
|
|
38
40
|
return false;
|
|
@@ -411,6 +413,63 @@ class IdeSetup {
|
|
|
411
413
|
|
|
412
414
|
return true;
|
|
413
415
|
}
|
|
416
|
+
|
|
417
|
+
async setupGeminiCli(installDir, selectedAgent) {
|
|
418
|
+
await initializeModules();
|
|
419
|
+
const geminiDir = path.join(installDir, ".gemini");
|
|
420
|
+
const agentsContextDir = path.join(geminiDir, "agents");
|
|
421
|
+
await fileManager.ensureDirectory(agentsContextDir);
|
|
422
|
+
|
|
423
|
+
// Get all available agents
|
|
424
|
+
const agents = await this.getAllAgentIds(installDir);
|
|
425
|
+
const agentContextFiles = [];
|
|
426
|
+
|
|
427
|
+
for (const agentId of agents) {
|
|
428
|
+
// Find the source agent file
|
|
429
|
+
let agentPath = path.join(installDir, ".bmad-core", "agents", `${agentId}.md`);
|
|
430
|
+
if (!(await fileManager.pathExists(agentPath))) {
|
|
431
|
+
agentPath = path.join(installDir, "agents", `${agentId}.md`);
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
if (await fileManager.pathExists(agentPath)) {
|
|
435
|
+
const agentContent = await fileManager.readFile(agentPath);
|
|
436
|
+
const contextFilePath = path.join(agentsContextDir, `${agentId}.md`);
|
|
437
|
+
|
|
438
|
+
// Copy the agent content directly into its own context file
|
|
439
|
+
await fileManager.writeFile(contextFilePath, agentContent);
|
|
440
|
+
|
|
441
|
+
// Store the relative path for settings.json
|
|
442
|
+
const relativePath = path.relative(geminiDir, contextFilePath);
|
|
443
|
+
agentContextFiles.push(relativePath.replace(/\\/g, '/')); // Ensure forward slashes for consistency
|
|
444
|
+
console.log(chalk.green(`✓ Created context file for @${agentId}`));
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
console.log(chalk.green(`\n✓ Created individual agent context files in ${agentsContextDir}`));
|
|
449
|
+
|
|
450
|
+
// Create or update settings.json
|
|
451
|
+
const settingsPath = path.join(geminiDir, "settings.json");
|
|
452
|
+
let settings = {};
|
|
453
|
+
|
|
454
|
+
if (await fileManager.pathExists(settingsPath)) {
|
|
455
|
+
try {
|
|
456
|
+
const existingSettings = await fileManager.readFile(settingsPath);
|
|
457
|
+
settings = JSON.parse(existingSettings);
|
|
458
|
+
console.log(chalk.yellow("Found existing .gemini/settings.json. Merging settings..."));
|
|
459
|
+
} catch (e) {
|
|
460
|
+
console.error(chalk.red("Error parsing existing settings.json. It will be overwritten."), e);
|
|
461
|
+
settings = {};
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
// Set contextFileName to our new array of files
|
|
466
|
+
settings.contextFileName = agentContextFiles;
|
|
467
|
+
|
|
468
|
+
await fileManager.writeFile(settingsPath, JSON.stringify(settings, null, 2));
|
|
469
|
+
console.log(chalk.green(`✓ Configured .gemini/settings.json to load all agent context files.`));
|
|
470
|
+
|
|
471
|
+
return true;
|
|
472
|
+
}
|
|
414
473
|
}
|
|
415
474
|
|
|
416
475
|
module.exports = new IdeSetup();
|