Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dd27531151 | ||
|
|
44b9d7bcb5 |
@@ -1,3 +1,10 @@
|
||||
# [4.15.0](https://github.com/bmadcode/BMAD-METHOD/compare/v4.14.1...v4.15.0) (2025-06-26)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* Add Gemini CLI Integration ([#271](https://github.com/bmadcode/BMAD-METHOD/issues/271)) ([44b9d7b](https://github.com/bmadcode/BMAD-METHOD/commit/44b9d7bcb5cbb6de5a15d8f2ec7918d186ac9576))
|
||||
|
||||
## [4.14.1](https://github.com/bmadcode/BMAD-METHOD/compare/v4.14.0...v4.14.1) (2025-06-26)
|
||||
|
||||
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "bmad-method",
|
||||
"version": "4.14.1",
|
||||
"version": "4.15.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "bmad-method",
|
||||
"version": "4.14.1",
|
||||
"version": "4.15.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@kayvan/markdown-tree-parser": "^1.5.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "bmad-method",
|
||||
"version": "4.14.1",
|
||||
"version": "4.15.0",
|
||||
"description": "Breakthrough Method of Agile AI-driven Development",
|
||||
"main": "tools/cli.js",
|
||||
"bin": {
|
||||
|
||||
@@ -50,7 +50,7 @@ program
|
||||
.option('-t, --team <team>', 'Install specific team with required agents and dependencies')
|
||||
.option('-x, --expansion-only', 'Install only expansion packs (no bmad-core)')
|
||||
.option('-d, --directory <path>', 'Installation directory (default: .bmad-core)')
|
||||
.option('-i, --ide <ide...>', 'Configure for specific IDE(s) - can specify multiple (cursor, claude-code, windsurf, roo, cline, other)')
|
||||
.option('-i, --ide <ide...>', 'Configure for specific IDE(s) - can specify multiple (cursor, claude-code, windsurf, roo, cline, gemini, other)')
|
||||
.option('-e, --expansion-packs <packs...>', 'Install specific expansion packs (can specify multiple)')
|
||||
.action(async (options) => {
|
||||
try {
|
||||
@@ -314,7 +314,8 @@ async function promptInstallation() {
|
||||
{ name: 'Claude Code', value: 'claude-code' },
|
||||
{ name: 'Windsurf', value: 'windsurf' },
|
||||
{ name: 'Roo Code', value: 'roo' },
|
||||
{ name: 'Cline', value: 'cline' }
|
||||
{ name: 'Cline', value: 'cline' },
|
||||
{ name: 'Gemini CLI', value: 'gemini' }
|
||||
]
|
||||
}
|
||||
]);
|
||||
|
||||
@@ -101,6 +101,16 @@ ide-configurations:
|
||||
# 2. Type @agent-name (e.g., "@dev", "@pm", "@architect")
|
||||
# 3. The agent will adopt that persona for the conversation
|
||||
# 4. Rules are stored in .clinerules/ directory in your project
|
||||
gemini:
|
||||
name: Gemini CLI
|
||||
rule-dir: .gemini/agents/
|
||||
format: context-files
|
||||
instructions: |
|
||||
# To use BMAD agents with the Gemini CLI:
|
||||
# 1. The installer creates a .gemini/ directory in your project.
|
||||
# 2. It also configures .gemini/settings.json to load all agent files.
|
||||
# 3. Simply mention the agent in your prompt (e.g., "As @dev, ...").
|
||||
# 4. The Gemini CLI will automatically have the context for that agent.
|
||||
available-agents:
|
||||
- id: analyst
|
||||
name: Business Analyst
|
||||
|
||||
@@ -33,6 +33,8 @@ class IdeSetup {
|
||||
return this.setupRoo(installDir, selectedAgent);
|
||||
case "cline":
|
||||
return this.setupCline(installDir, selectedAgent);
|
||||
case "gemini":
|
||||
return this.setupGeminiCli(installDir, selectedAgent);
|
||||
default:
|
||||
console.log(chalk.yellow(`\nIDE ${ide} not yet supported`));
|
||||
return false;
|
||||
@@ -411,6 +413,63 @@ class IdeSetup {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
async setupGeminiCli(installDir, selectedAgent) {
|
||||
await initializeModules();
|
||||
const geminiDir = path.join(installDir, ".gemini");
|
||||
const agentsContextDir = path.join(geminiDir, "agents");
|
||||
await fileManager.ensureDirectory(agentsContextDir);
|
||||
|
||||
// Get all available agents
|
||||
const agents = await this.getAllAgentIds(installDir);
|
||||
const agentContextFiles = [];
|
||||
|
||||
for (const agentId of agents) {
|
||||
// Find the source agent file
|
||||
let agentPath = path.join(installDir, ".bmad-core", "agents", `${agentId}.md`);
|
||||
if (!(await fileManager.pathExists(agentPath))) {
|
||||
agentPath = path.join(installDir, "agents", `${agentId}.md`);
|
||||
}
|
||||
|
||||
if (await fileManager.pathExists(agentPath)) {
|
||||
const agentContent = await fileManager.readFile(agentPath);
|
||||
const contextFilePath = path.join(agentsContextDir, `${agentId}.md`);
|
||||
|
||||
// Copy the agent content directly into its own context file
|
||||
await fileManager.writeFile(contextFilePath, agentContent);
|
||||
|
||||
// Store the relative path for settings.json
|
||||
const relativePath = path.relative(geminiDir, contextFilePath);
|
||||
agentContextFiles.push(relativePath.replace(/\\/g, '/')); // Ensure forward slashes for consistency
|
||||
console.log(chalk.green(`✓ Created context file for @${agentId}`));
|
||||
}
|
||||
}
|
||||
|
||||
console.log(chalk.green(`\n✓ Created individual agent context files in ${agentsContextDir}`));
|
||||
|
||||
// Create or update settings.json
|
||||
const settingsPath = path.join(geminiDir, "settings.json");
|
||||
let settings = {};
|
||||
|
||||
if (await fileManager.pathExists(settingsPath)) {
|
||||
try {
|
||||
const existingSettings = await fileManager.readFile(settingsPath);
|
||||
settings = JSON.parse(existingSettings);
|
||||
console.log(chalk.yellow("Found existing .gemini/settings.json. Merging settings..."));
|
||||
} catch (e) {
|
||||
console.error(chalk.red("Error parsing existing settings.json. It will be overwritten."), e);
|
||||
settings = {};
|
||||
}
|
||||
}
|
||||
|
||||
// Set contextFileName to our new array of files
|
||||
settings.contextFileName = agentContextFiles;
|
||||
|
||||
await fileManager.writeFile(settingsPath, JSON.stringify(settings, null, 2));
|
||||
console.log(chalk.green(`✓ Configured .gemini/settings.json to load all agent context files.`));
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = new IdeSetup();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "bmad-method",
|
||||
"version": "4.14.1",
|
||||
"version": "4.15.0",
|
||||
"description": "BMAD Method installer - AI-powered Agile development framework",
|
||||
"main": "lib/installer.js",
|
||||
"bin": {
|
||||
|
||||
Reference in New Issue
Block a user