feat: rename agent-install parameters for clarity
- Change --path → --source (much clearer purpose) - Change --target → --destination (more intuitive) - Update all code references and documentation - Add advanced parameter examples to installation guide - Keep short aliases: -s for --source, -t for --destination Parameters are now much more self-explanatory: - --source: where to find the agent YAML - --destination: where to install the compiled agent
This commit is contained in:
parent
905f9ca346
commit
05cbc6ccb8
|
|
@ -37,20 +37,20 @@ Options:
|
||||||
|
|
||||||
## Installing from Custom Locations
|
## Installing from Custom Locations
|
||||||
|
|
||||||
Use the `-p` / `--path` option to install agents from any location:
|
Use the `-s` / `--source` option to install agents from any location:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Install agent from a custom folder (expert agent with sidecar)
|
# Install agent from a custom folder (expert agent with sidecar)
|
||||||
bmad agent-install -p path/to/my-agent
|
bmad agent-install -s path/to/my-agent
|
||||||
|
|
||||||
# Install a specific .agent.yaml file (simple agent)
|
# Install a specific .agent.yaml file (simple agent)
|
||||||
bmad agent-install -p path/to/my-agent.agent.yaml
|
bmad agent-install -s path/to/my-agent.agent.yaml
|
||||||
|
|
||||||
# Install with defaults (skip all prompts)
|
# Install with defaults (skip all prompts)
|
||||||
bmad agent-install -p path/to/my-agent -d
|
bmad agent-install -s path/to/my-agent -d
|
||||||
|
|
||||||
# Install to a specific target project
|
# Install to a specific destination project
|
||||||
bmad agent-install -p path/to/my-agent -t /path/to/target/project
|
bmad agent-install -s path/to/my-agent --destination /path/to/destination/project
|
||||||
```
|
```
|
||||||
|
|
||||||
This is useful when:
|
This is useful when:
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,22 @@ npx bmad-method agent-install # Works anywhere without cloning
|
||||||
- `bmad install` → "Compile Agents" (rebuild all agents)
|
- `bmad install` → "Compile Agents" (rebuild all agents)
|
||||||
- `bmad install` → "Quick Update" (during upgrades)
|
- `bmad install` → "Quick Update" (during upgrades)
|
||||||
|
|
||||||
|
**Advanced Parameters**:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Install specific agent file
|
||||||
|
npx bmad-method agent-install --source ./my-agent.agent.yaml
|
||||||
|
|
||||||
|
# Use default configuration (no prompts)
|
||||||
|
npx bmad-method agent-install --defaults
|
||||||
|
|
||||||
|
# Install to specific destination
|
||||||
|
npx bmad-method agent-install --destination ./my-project
|
||||||
|
|
||||||
|
# Combine parameters
|
||||||
|
npx bmad-method agent-install --source ./my-agent.agent.yaml --defaults --destination ./my-project
|
||||||
|
```
|
||||||
|
|
||||||
**When to use which**:
|
**When to use which**:
|
||||||
|
|
||||||
- **Option 1**: Best for new agents or when you want custom persona names
|
- **Option 1**: Best for new agents or when you want custom persona names
|
||||||
|
|
|
||||||
|
|
@ -22,9 +22,9 @@ module.exports = {
|
||||||
command: 'agent-install',
|
command: 'agent-install',
|
||||||
description: 'Install and compile BMAD agents with personalization',
|
description: 'Install and compile BMAD agents with personalization',
|
||||||
options: [
|
options: [
|
||||||
['-p, --path <path>', 'Path to specific agent YAML file or folder'],
|
['-s, --source <path>', 'Path to specific agent YAML file or folder'],
|
||||||
['-d, --defaults', 'Use default values without prompting'],
|
['-d, --defaults', 'Use default values without prompting'],
|
||||||
['-t, --target <path>', 'Target installation directory (default: .bmad/agents)'],
|
['-t, --destination <path>', 'Target installation directory (default: current project BMAD installation)'],
|
||||||
],
|
],
|
||||||
action: async (options) => {
|
action: async (options) => {
|
||||||
try {
|
try {
|
||||||
|
|
@ -43,9 +43,9 @@ module.exports = {
|
||||||
|
|
||||||
let selectedAgent = null;
|
let selectedAgent = null;
|
||||||
|
|
||||||
// If path provided, use it directly
|
// If source provided, use it directly
|
||||||
if (options.path) {
|
if (options.source) {
|
||||||
const providedPath = path.resolve(options.path);
|
const providedPath = path.resolve(options.source);
|
||||||
|
|
||||||
if (!fs.existsSync(providedPath)) {
|
if (!fs.existsSync(providedPath)) {
|
||||||
console.log(chalk.red(`Path not found: ${providedPath}`));
|
console.log(chalk.red(`Path not found: ${providedPath}`));
|
||||||
|
|
@ -192,11 +192,11 @@ module.exports = {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Determine target directory
|
// Determine target directory
|
||||||
let targetDir = options.target ? path.resolve(options.target) : null;
|
let targetDir = options.destination ? path.resolve(options.destination) : null;
|
||||||
|
|
||||||
// If no target specified, prompt for it
|
// If no target specified, prompt for it
|
||||||
if (targetDir) {
|
if (targetDir) {
|
||||||
// If target provided via --target, check if it's a project root and adjust
|
// If target provided via --destination, check if it's a project root and adjust
|
||||||
const otherProject = detectBmadProject(targetDir);
|
const otherProject = detectBmadProject(targetDir);
|
||||||
if (otherProject && !targetDir.includes('agents')) {
|
if (otherProject && !targetDir.includes('agents')) {
|
||||||
// User specified project root, redirect to custom agents folder
|
// User specified project root, redirect to custom agents folder
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue