Skip to content

Commit 155f959

Browse files
phuochauHau Vobmadcode
authored
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>
1 parent 6919049 commit 155f959

File tree

5 files changed

+153
-2
lines changed

5 files changed

+153
-2
lines changed

bmad-core/data/bmad-kb.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ npx bmad-method install
102102
- **Cline**: VS Code extension with AI features
103103
- **Roo Code**: Web-based IDE with agent support
104104
- **GitHub Copilot**: VS Code extension with AI peer programming assistant
105+
- **Auggie CLI (Augment Code)**: AI-powered development environment
105106

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

tools/installer/bin/bmad.js

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ program
4949
.option('-d, --directory <path>', 'Installation directory')
5050
.option(
5151
'-i, --ide <ide...>',
52-
'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)',
52+
'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)',
5353
)
5454
.option(
5555
'-e, --expansion-packs <packs...>',
@@ -406,6 +406,7 @@ async function promptInstallation() {
406406
{ name: 'Qwen Code', value: 'qwen-code' },
407407
{ name: 'Crush', value: 'crush' },
408408
{ name: 'Github Copilot', value: 'github-copilot' },
409+
{ name: 'Auggie CLI (Augment Code)', value: 'auggie-cli' },
409410
{ name: 'Codex CLI', value: 'codex' },
410411
{ name: 'Codex Web', value: 'codex-web' },
411412
],
@@ -476,6 +477,38 @@ async function promptInstallation() {
476477
answers.githubCopilotConfig = { configChoice };
477478
}
478479

480+
// Configure Auggie CLI (Augment Code) immediately if selected
481+
if (ides.includes('auggie-cli')) {
482+
console.log(chalk.cyan('\n📍 Auggie CLI Location Configuration'));
483+
console.log(chalk.dim('Choose where to install BMad agents for Auggie CLI access.\n'));
484+
485+
const { selectedLocations } = await inquirer.prompt([
486+
{
487+
type: 'checkbox',
488+
name: 'selectedLocations',
489+
message: 'Select Auggie CLI command locations:',
490+
choices: [
491+
{
492+
name: 'User Commands (Global): Available across all your projects (user-wide)',
493+
value: 'user',
494+
},
495+
{
496+
name: 'Workspace Commands (Project): Stored in repository, shared with team',
497+
value: 'workspace',
498+
},
499+
],
500+
validate: (selected) => {
501+
if (selected.length === 0) {
502+
return 'Please select at least one location';
503+
}
504+
return true;
505+
},
506+
},
507+
]);
508+
509+
answers.augmentCodeConfig = { selectedLocations };
510+
}
511+
479512
// Ask for web bundles installation
480513
const { includeWebBundles } = await inquirer.prompt([
481514
{

tools/installer/config/install.config.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,25 @@ ide-configurations:
122122
# 3. Simply mention the agent in your prompt (e.g., "As *dev, ...").
123123
# 4. The Qwen Code CLI will automatically have the context for that agent.
124124
125+
auggie-cli:
126+
name: Auggie CLI (Augment Code)
127+
format: multi-location
128+
locations:
129+
user:
130+
name: User Commands (Global)
131+
rule-dir: ~/.augment/commands/bmad/
132+
description: Available across all your projects (user-wide)
133+
workspace:
134+
name: Workspace Commands (Project)
135+
rule-dir: ./.augment/commands/bmad/
136+
description: Stored in your repository and shared with your team
137+
command-suffix: .md
138+
instructions: |
139+
# To use BMad agents in Auggie CLI (Augment Code):
140+
# 1. Type /bmad:agent-name (e.g., "/bmad:dev", "/bmad:pm", "/bmad:architect")
141+
# 2. The agent will adopt that persona for the conversation
142+
# 3. Commands are available based on your selected location(s)
143+
125144
codex:
126145
name: Codex CLI
127146
format: project-memory

tools/installer/lib/ide-setup.js

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ class IdeSetup extends BaseIdeSetup {
7474
case 'qwen-code': {
7575
return this.setupQwenCode(installDir, selectedAgent);
7676
}
77+
case 'auggie-cli': {
78+
return this.setupAuggieCLI(installDir, selectedAgent, spinner, preConfiguredSettings);
79+
}
7780
case 'codex': {
7881
return this.setupCodex(installDir, selectedAgent, { webEnabled: false });
7982
}
@@ -1611,6 +1614,96 @@ tools: ['changes', 'codebase', 'fetch', 'findTestFiles', 'githubRepo', 'problems
16111614
console.log(chalk.dim(''));
16121615
console.log(chalk.dim('You can modify these settings anytime in .vscode/settings.json'));
16131616
}
1617+
1618+
async setupAuggieCLI(installDir, selectedAgent, spinner = null, preConfiguredSettings = null) {
1619+
const os = require('node:os');
1620+
const inquirer = require('inquirer');
1621+
const agents = selectedAgent ? [selectedAgent] : await this.getAllAgentIds(installDir);
1622+
1623+
// Get the IDE configuration to access location options
1624+
const ideConfig = await configLoader.getIdeConfiguration('auggie-cli');
1625+
const locations = ideConfig.locations;
1626+
1627+
// Use pre-configured settings if provided, otherwise prompt
1628+
let selectedLocations;
1629+
if (preConfiguredSettings && preConfiguredSettings.selectedLocations) {
1630+
selectedLocations = preConfiguredSettings.selectedLocations;
1631+
console.log(
1632+
chalk.dim(
1633+
`Using pre-configured Auggie CLI (Augment Code) locations: ${selectedLocations.join(', ')}`,
1634+
),
1635+
);
1636+
} else {
1637+
// Pause spinner during location selection to avoid UI conflicts
1638+
let spinnerWasActive = false;
1639+
if (spinner && spinner.isSpinning) {
1640+
spinner.stop();
1641+
spinnerWasActive = true;
1642+
}
1643+
1644+
// Clear any previous output and add spacing to avoid conflicts with loaders
1645+
console.log('\n'.repeat(2));
1646+
console.log(chalk.blue('📍 Auggie CLI Location Configuration'));
1647+
console.log(chalk.dim('Choose where to install BMad agents for Auggie CLI access.'));
1648+
console.log(''); // Add extra spacing
1649+
1650+
const response = await inquirer.prompt([
1651+
{
1652+
type: 'checkbox',
1653+
name: 'selectedLocations',
1654+
message: 'Select Auggie CLI command locations:',
1655+
choices: Object.entries(locations).map(([key, location]) => ({
1656+
name: `${location.name}: ${location.description}`,
1657+
value: key,
1658+
})),
1659+
validate: (selected) => {
1660+
if (selected.length === 0) {
1661+
return 'Please select at least one location';
1662+
}
1663+
return true;
1664+
},
1665+
},
1666+
]);
1667+
selectedLocations = response.selectedLocations;
1668+
1669+
// Restart spinner if it was active before prompts
1670+
if (spinner && spinnerWasActive) {
1671+
spinner.start();
1672+
}
1673+
}
1674+
1675+
// Install to each selected location
1676+
for (const locationKey of selectedLocations) {
1677+
const location = locations[locationKey];
1678+
let commandsDir = location['rule-dir'];
1679+
1680+
// Handle tilde expansion for user directory
1681+
if (commandsDir.startsWith('~/')) {
1682+
commandsDir = path.join(os.homedir(), commandsDir.slice(2));
1683+
} else if (commandsDir.startsWith('./')) {
1684+
commandsDir = path.join(installDir, commandsDir.slice(2));
1685+
}
1686+
1687+
await fileManager.ensureDirectory(commandsDir);
1688+
1689+
for (const agentId of agents) {
1690+
// Find the agent file
1691+
const agentPath = await this.findAgentPath(agentId, installDir);
1692+
1693+
if (agentPath) {
1694+
const agentContent = await fileManager.readFile(agentPath);
1695+
const mdPath = path.join(commandsDir, `${agentId}.md`);
1696+
await fileManager.writeFile(mdPath, agentContent);
1697+
console.log(chalk.green(`✓ Created command: ${agentId}.md in ${location.name}`));
1698+
}
1699+
}
1700+
1701+
console.log(chalk.green(`\n✓ Created Auggie CLI commands in ${commandsDir}`));
1702+
console.log(chalk.dim(` Location: ${location.name} - ${location.description}`));
1703+
}
1704+
1705+
return true;
1706+
}
16141707
}
16151708

16161709
module.exports = new IdeSetup();

tools/installer/lib/installer.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,12 @@ class Installer {
408408
if (ides.length > 0) {
409409
for (const ide of ides) {
410410
spinner.text = `Setting up ${ide} integration...`;
411-
const preConfiguredSettings = ide === 'github-copilot' ? config.githubCopilotConfig : null;
411+
let preConfiguredSettings = null;
412+
if (ide === 'github-copilot') {
413+
preConfiguredSettings = config.githubCopilotConfig;
414+
} else if (ide === 'auggie-cli') {
415+
preConfiguredSettings = config.augmentCodeConfig;
416+
}
412417
await ideSetup.setup(ide, installDir, config.agent, spinner, preConfiguredSettings);
413418
}
414419
}

0 commit comments

Comments
 (0)