feat: Add Auggie CLI (Augment Code) Integration (#520)

* 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.

* Added options to choose the rule locations

* Update instruction to match with namespace for commands

* Update instruction to match with namespace for commands

* Renamed Augment Code to Auggie CLI (Augment Code)

---------

Co-authored-by: Hau Vo <hauvo@Haus-Mac-mini.local>
Co-authored-by: Brian <bmadcode@gmail.com>
This commit is contained in:
Hau Vo
2025-09-03 00:16:26 +07:00
committed by GitHub
parent 6919049eae
commit 155f9591ea
5 changed files with 153 additions and 2 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
- **Auggie CLI (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, codex, codex-web, other)',
'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, 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: 'Auggie CLI (Augment Code)', value: 'auggie-cli' },
{ name: 'Codex CLI', value: 'codex' },
{ name: 'Codex Web', value: 'codex-web' },
],
@@ -476,6 +477,38 @@ async function promptInstallation() {
answers.githubCopilotConfig = { configChoice };
}
// Configure Auggie CLI (Augment Code) immediately if selected
if (ides.includes('auggie-cli')) {
console.log(chalk.cyan('\n📍 Auggie CLI Location Configuration'));
console.log(chalk.dim('Choose where to install BMad agents for Auggie CLI access.\n'));
const { selectedLocations } = await inquirer.prompt([
{
type: 'checkbox',
name: 'selectedLocations',
message: 'Select Auggie CLI command locations:',
choices: [
{
name: 'User Commands (Global): Available across all your projects (user-wide)',
value: 'user',
},
{
name: 'Workspace Commands (Project): Stored in repository, shared with team',
value: 'workspace',
},
],
validate: (selected) => {
if (selected.length === 0) {
return 'Please select at least one location';
}
return true;
},
},
]);
answers.augmentCodeConfig = { selectedLocations };
}
// Ask for web bundles installation
const { includeWebBundles } = await inquirer.prompt([
{

View File

@@ -122,6 +122,25 @@ ide-configurations:
# 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.
auggie-cli:
name: Auggie CLI (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 Auggie CLI (Augment Code):
# 1. Type /bmad:agent-name (e.g., "/bmad:dev", "/bmad:pm", "/bmad:architect")
# 2. The agent will adopt that persona for the conversation
# 3. Commands are available based on your selected location(s)
codex:
name: Codex CLI
format: project-memory

View File

@@ -74,6 +74,9 @@ class IdeSetup extends BaseIdeSetup {
case 'qwen-code': {
return this.setupQwenCode(installDir, selectedAgent);
}
case 'auggie-cli': {
return this.setupAuggieCLI(installDir, selectedAgent, spinner, preConfiguredSettings);
}
case 'codex': {
return this.setupCodex(installDir, selectedAgent, { webEnabled: false });
}
@@ -1611,6 +1614,96 @@ 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 setupAuggieCLI(installDir, selectedAgent, spinner = null, preConfiguredSettings = null) {
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('auggie-cli');
const locations = ideConfig.locations;
// Use pre-configured settings if provided, otherwise prompt
let selectedLocations;
if (preConfiguredSettings && preConfiguredSettings.selectedLocations) {
selectedLocations = preConfiguredSettings.selectedLocations;
console.log(
chalk.dim(
`Using pre-configured Auggie CLI (Augment Code) locations: ${selectedLocations.join(', ')}`,
),
);
} else {
// Pause spinner during location selection to avoid UI conflicts
let spinnerWasActive = false;
if (spinner && spinner.isSpinning) {
spinner.stop();
spinnerWasActive = true;
}
// Clear any previous output and add spacing to avoid conflicts with loaders
console.log('\n'.repeat(2));
console.log(chalk.blue('📍 Auggie CLI Location Configuration'));
console.log(chalk.dim('Choose where to install BMad agents for Auggie CLI access.'));
console.log(''); // Add extra spacing
const response = await inquirer.prompt([
{
type: 'checkbox',
name: 'selectedLocations',
message: 'Select Auggie CLI 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;
},
},
]);
selectedLocations = response.selectedLocations;
// Restart spinner if it was active before prompts
if (spinner && spinnerWasActive) {
spinner.start();
}
}
// 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 Auggie CLI commands in ${commandsDir}`));
console.log(chalk.dim(` Location: ${location.name} - ${location.description}`));
}
return true;
}
}
module.exports = new IdeSetup();

View File

@@ -408,7 +408,12 @@ class Installer {
if (ides.length > 0) {
for (const ide of ides) {
spinner.text = `Setting up ${ide} integration...`;
const preConfiguredSettings = ide === 'github-copilot' ? config.githubCopilotConfig : null;
let preConfiguredSettings = null;
if (ide === 'github-copilot') {
preConfiguredSettings = config.githubCopilotConfig;
} else if (ide === 'auggie-cli') {
preConfiguredSettings = config.augmentCodeConfig;
}
await ideSetup.setup(ide, installDir, config.agent, spinner, preConfiguredSettings);
}
}