feat: add Kiro IDE support
- Added Kiro IDE to the list of supported IDEs in the installer. - Implemented the `setupKiro` function to create the necessary files and directories for Kiro IDE integration in `ide-setup.js`. - Updated `bmad.js` to include `kiro` in the interactive installer and command-line options. - Added `kiro` configuration to `install.config.yaml.
This commit is contained in:
parent
415026b0eb
commit
79f2af34d5
|
|
@ -49,7 +49,7 @@ program
|
|||
.option('-d, --directory <path>', 'Installation directory')
|
||||
.option(
|
||||
'-i, --ide <ide...>',
|
||||
'Configure for specific IDE(s) - can specify multiple (cursor, claude-code, windsurf, trae, roo, kilo, cline, gemini, qwen-code, github-copilot, codex, codex-web, auggie-cli, iflow-cli, opencode, other)',
|
||||
'Configure for specific IDE(s) - can specify multiple (cursor, claude-code, windsurf, trae, roo, kilo, kiro, cline, gemini, qwen-code, github-copilot, codex, codex-web, auggie-cli, iflow-cli, opencode, other)',
|
||||
)
|
||||
.option(
|
||||
'-e, --expansion-packs <packs...>',
|
||||
|
|
@ -402,6 +402,7 @@ async function promptInstallation() {
|
|||
{ name: 'Trae', value: 'trae' }, // { name: 'Trae', value: 'trae'}
|
||||
{ name: 'Roo Code', value: 'roo' },
|
||||
{ name: 'Kilo Code', value: 'kilo' },
|
||||
{ name: 'Kiro IDE', value: 'kiro' },
|
||||
{ name: 'Cline', value: 'cline' },
|
||||
{ name: 'Gemini CLI', value: 'gemini' },
|
||||
{ name: 'Qwen Code', value: 'qwen-code' },
|
||||
|
|
|
|||
|
|
@ -9,6 +9,16 @@ installation-options:
|
|||
description: Select and install a single agent with its dependencies
|
||||
action: copy-agent
|
||||
ide-configurations:
|
||||
kiro:
|
||||
name: Kiro IDE
|
||||
rule-dir: .kiro/steering/
|
||||
format: multi-file
|
||||
command-suffix: .md
|
||||
instructions: |
|
||||
# To use BMad agents in Kiro IDE:
|
||||
# 1. The installer creates agent files in `.kiro/steering/`.
|
||||
# 2. The steering file `bmad.md` is always included.
|
||||
# 3. Type *agent-name (e.g., "*agent-dev", "*agent-pm") to activate the agent.
|
||||
cursor:
|
||||
name: Cursor
|
||||
rule-dir: .cursor/rules/bmad/
|
||||
|
|
|
|||
|
|
@ -69,6 +69,9 @@ class IdeSetup extends BaseIdeSetup {
|
|||
case 'cline': {
|
||||
return this.setupCline(installDir, selectedAgent);
|
||||
}
|
||||
case 'kiro': {
|
||||
return this.setupKiro(installDir, selectedAgent);
|
||||
}
|
||||
case 'kilo': {
|
||||
return this.setupKilocode(installDir, selectedAgent);
|
||||
}
|
||||
|
|
@ -1391,6 +1394,36 @@ class IdeSetup extends BaseIdeSetup {
|
|||
}
|
||||
}
|
||||
|
||||
async setupKiro(installDir, selectedAgent) {
|
||||
const kiroSteeringDir = path.join(installDir, '.kiro', 'steering');
|
||||
await fileManager.ensureDirectory(kiroSteeringDir);
|
||||
|
||||
// Get all agent IDs
|
||||
const agents = selectedAgent ? [selectedAgent] : await this.getAllAgentIds(installDir);
|
||||
const agentLinks = [];
|
||||
|
||||
for (const agentId of agents) {
|
||||
// Find the agent file
|
||||
const agentPath = await this.findAgentPath(agentId, installDir);
|
||||
if (agentPath) {
|
||||
const agentContent = await fileManager.readFile(agentPath);
|
||||
const mdPath = path.join(kiroSteeringDir, `${agentId}.md`);
|
||||
await fileManager.writeFile(mdPath, agentContent);
|
||||
agentLinks.push(`- [*agent-${agentId}](./${agentId}.md)`);
|
||||
console.log(chalk.green(`✓ Created steering file: ${agentId}.md`));
|
||||
}
|
||||
}
|
||||
|
||||
// Create bmad-method.md and readme.md with inclusion header and agent links
|
||||
const inclusionHeader = '---\ninclusion: always\n---\n';
|
||||
const intro =
|
||||
"i'll open the next file that is under the .kiro/steering/ dir based on the user's input file name\n";
|
||||
const content = `${inclusionHeader}\n${intro}\n${agentLinks.join('\n')}\n`;
|
||||
await fileManager.writeFile(path.join(kiroSteeringDir, 'bmad.md'), content);
|
||||
console.log(chalk.green('✓ Created bmad.md for Kiro steering.'));
|
||||
return true;
|
||||
}
|
||||
|
||||
async findAgentPath(agentId, installDir) {
|
||||
// Try to find the agent file in various locations
|
||||
const possiblePaths = [
|
||||
|
|
|
|||
Loading…
Reference in New Issue