feat: add Augment Code IDE support with multi-location installation options

- Add Augment Code to supported IDE list in installer CLI and interactive prompts
- Configure multi-location setup for Augment Code commands:
  - User Commands: ~/.augment/commands/bmad/ (global, user-wide)
  - Workspace Commands: ./.augment/commands/bmad/ (project-specific, team-shared)
- Update IDE configuration with proper location handling and tilde expansion
- Add interactive prompt for users to select installation locations
- Update documentation in bmad-kb.md to include Augment Code in supported IDEs
- Implement setupAugmentCode method with location selection and file installation

This enables BMAD Method integration with Augment Code's custom command system,
allowing users to access BMad agents via /agent-name slash commands in both
global and project-specific contexts.
This commit is contained in:
Hau Vo 2025-08-29 10:30:11 +07:00
parent bf97f05190
commit 80d6437fe5
4 changed files with 86 additions and 1 deletions

View File

@ -102,6 +102,7 @@ npx bmad-method install
- **Cline**: VS Code extension with AI features
- **Roo Code**: Web-based IDE with agent support
- **GitHub Copilot**: VS Code extension with AI peer programming assistant
- **Augment Code**: AI-powered development environment
**Note for VS Code Users**: BMAD-METHOD™ assumes when you mention "VS Code" that you're using it with an AI-powered extension like GitHub Copilot, Cline, or Roo. Standard VS Code without AI capabilities cannot run BMad agents. The installer includes built-in support for Cline and Roo.

View File

@ -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, other)',
'Configure for specific IDE(s) - can specify multiple (cursor, claude-code, windsurf, trae, roo, kilo, cline, gemini, qwen-code, github-copilot, augment-code, other)',
)
.option(
'-e, --expansion-packs <packs...>',
@ -406,6 +406,7 @@ async function promptInstallation() {
{ name: 'Qwen Code', value: 'qwen-code' },
{ name: 'Crush', value: 'crush' },
{ name: 'Github Copilot', value: 'github-copilot' },
{ name: 'Augment Code', value: 'augment-code' },
],
},
]);

View File

@ -121,3 +121,22 @@ ide-configurations:
# 2. It concatenates all agent files into a single QWEN.md file.
# 3. Simply mention the agent in your prompt (e.g., "As *dev, ...").
# 4. The Qwen Code CLI will automatically have the context for that agent.
augment-code:
name: Augment Code
format: multi-location
locations:
user:
name: User Commands (Global)
rule-dir: ~/.augment/commands/bmad/
description: Available across all your projects (user-wide)
workspace:
name: Workspace Commands (Project)
rule-dir: ./.augment/commands/bmad/
description: Stored in your repository and shared with your team
command-suffix: .md
instructions: |
# To use BMad agents in Augment Code:
# 1. Type /agent-name (e.g., "/dev", "/pm", "/architect")
# 2. The agent will adopt that persona for the conversation
# 3. Commands are available based on your selected location(s)

View File

@ -74,6 +74,9 @@ class IdeSetup extends BaseIdeSetup {
case 'qwen-code': {
return this.setupQwenCode(installDir, selectedAgent);
}
case 'augment-code': {
return this.setupAugmentCode(installDir, selectedAgent);
}
default: {
console.log(chalk.yellow(`\nIDE ${ide} not yet supported`));
return false;
@ -1436,6 +1439,67 @@ tools: ['changes', 'codebase', 'fetch', 'findTestFiles', 'githubRepo', 'problems
console.log(chalk.dim(''));
console.log(chalk.dim('You can modify these settings anytime in .vscode/settings.json'));
}
async setupAugmentCode(installDir, selectedAgent) {
const os = require('node:os');
const inquirer = require('inquirer');
const agents = selectedAgent ? [selectedAgent] : await this.getAllAgentIds(installDir);
// Get the IDE configuration to access location options
const ideConfig = await configLoader.getIdeConfiguration('augment-code');
const locations = ideConfig.locations;
// Prompt user to select which locations to install to
const { selectedLocations } = await inquirer.prompt([
{
type: 'checkbox',
name: 'selectedLocations',
message: 'Select Augment Code command locations:',
choices: Object.entries(locations).map(([key, location]) => ({
name: `${location.name}: ${location.description}`,
value: key,
})),
validate: (selected) => {
if (selected.length === 0) {
return 'Please select at least one location';
}
return true;
},
},
]);
// Install to each selected location
for (const locationKey of selectedLocations) {
const location = locations[locationKey];
let commandsDir = location['rule-dir'];
// Handle tilde expansion for user directory
if (commandsDir.startsWith('~/')) {
commandsDir = path.join(os.homedir(), commandsDir.slice(2));
} else if (commandsDir.startsWith('./')) {
commandsDir = path.join(installDir, commandsDir.slice(2));
}
await fileManager.ensureDirectory(commandsDir);
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(commandsDir, `${agentId}.md`);
await fileManager.writeFile(mdPath, agentContent);
console.log(chalk.green(`✓ Created command: ${agentId}.md in ${location.name}`));
}
}
console.log(chalk.green(`\n✓ Created Augment Code commands in ${commandsDir}`));
console.log(chalk.dim(` Location: ${location.name} - ${location.description}`));
}
return true;
}
}
module.exports = new IdeSetup();