@maestro-ai/cli 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,10 @@
1
+ ---
2
+ description: Adapter for GitHub Copilot
3
+ target_path: .github/copilot-instructions.md
4
+ ---
5
+
6
+ # GitHub Copilot Adapter
7
+
8
+ Este adaptador formata as regras para o GitHub Copilot.
9
+
10
+ O conteúdo de `RULES.md` será inserido automaticamente pelo CLI.
@@ -0,0 +1,10 @@
1
+ ---
2
+ description: Adapter for Cursor IDE
3
+ target_path: .cursorrules
4
+ ---
5
+
6
+ # Cursor Adapter
7
+
8
+ Este adaptador formata as regras para o Cursor IDE.
9
+
10
+ O conteúdo de `RULES.md` será inserido automaticamente pelo CLI.
@@ -0,0 +1,13 @@
1
+ ---
2
+ trigger: always_on
3
+ system: maestro
4
+ version: 1.0.0
5
+ description: Adapter for Gemini/Antigravity IDE
6
+ target_path: .gemini/GEMINI.md
7
+ ---
8
+
9
+ # Gemini Adapter
10
+
11
+ Este adaptador adiciona o frontmatter específico para Gemini/Antigravity.
12
+
13
+ O conteúdo de `RULES.md` será inserido automaticamente pelo CLI.
@@ -0,0 +1,10 @@
1
+ ---
2
+ description: Adapter for Windsurf IDE
3
+ target_path: .windsurfrules
4
+ ---
5
+
6
+ # Windsurf Adapter
7
+
8
+ Este adaptador formata as regras para o Windsurf IDE.
9
+
10
+ O conteúdo de `RULES.md` será inserido automaticamente pelo CLI.
@@ -1,6 +1,7 @@
1
1
  interface InitOptions {
2
2
  force?: boolean;
3
3
  minimal?: boolean;
4
+ ide?: 'gemini' | 'cursor' | 'copilot' | 'windsurf' | 'all';
4
5
  }
5
6
  export declare function init(options?: InitOptions): Promise<void>;
6
7
  export {};
@@ -5,6 +5,24 @@ import fse from 'fs-extra';
5
5
  import chalk from 'chalk';
6
6
  import ora from 'ora';
7
7
  const __dirname = dirname(fileURLToPath(import.meta.url));
8
+ const IDE_CONFIGS = {
9
+ gemini: {
10
+ path: '.gemini/GEMINI.md',
11
+ header: '---\ntrigger: always_on\nsystem: maestro\nversion: 1.0.0\n---\n\n'
12
+ },
13
+ cursor: {
14
+ path: '.cursorrules',
15
+ header: ''
16
+ },
17
+ copilot: {
18
+ path: '.github/copilot-instructions.md',
19
+ header: ''
20
+ },
21
+ windsurf: {
22
+ path: '.windsurfrules',
23
+ header: ''
24
+ }
25
+ };
8
26
  export async function init(options = {}) {
9
27
  const cwd = process.cwd();
10
28
  const spinner = ora();
@@ -58,11 +76,29 @@ export async function init(options = {}) {
58
76
  await fse.copy(workflowsSrc, workflowsDest, { overwrite: options.force });
59
77
  }
60
78
  spinner.succeed('Workflows copiados para .agent/workflows/');
61
- // 5. Gerar GEMINI.md
62
- spinner.start('Gerando GEMINI.md...');
63
- const geminiContent = generateGeminiMd();
64
- await fse.writeFile(join(cwd, 'GEMINI.md'), geminiContent);
65
- spinner.succeed('GEMINI.md gerado');
79
+ // 5. Gerar arquivos de regras por IDE
80
+ const targetIdes = options.ide === 'all'
81
+ ? Object.keys(IDE_CONFIGS)
82
+ : [options.ide || 'gemini'];
83
+ spinner.start(`Gerando regras para IDE(s): ${targetIdes.join(', ')}...`);
84
+ // Ler RULES.md base
85
+ const rulesPath = join(contentSource, 'rules', 'RULES.md');
86
+ let rulesContent = '';
87
+ if (await fse.pathExists(rulesPath)) {
88
+ rulesContent = await fse.readFile(rulesPath, 'utf-8');
89
+ }
90
+ else {
91
+ rulesContent = generateDefaultRules();
92
+ }
93
+ // Gerar arquivo para cada IDE alvo
94
+ for (const ide of targetIdes) {
95
+ const config = IDE_CONFIGS[ide];
96
+ const targetPath = join(cwd, config.path);
97
+ await fse.ensureDir(dirname(targetPath));
98
+ const content = config.header + rulesContent;
99
+ await fse.writeFile(targetPath, content);
100
+ }
101
+ spinner.succeed(`Regras geradas para: ${targetIdes.join(', ')}`);
66
102
  // Resumo
67
103
  console.log(chalk.green.bold('\n✅ Maestro inicializado com sucesso!\n'));
68
104
  console.log(chalk.dim('Estrutura criada:'));
@@ -79,7 +115,9 @@ export async function init(options = {}) {
79
115
  console.log(chalk.dim(' .agent/'));
80
116
  console.log(chalk.dim(' ├── skills/'));
81
117
  console.log(chalk.dim(' └── workflows/'));
82
- console.log(chalk.dim(' GEMINI.md'));
118
+ for (const ide of targetIdes) {
119
+ console.log(chalk.dim(` ${IDE_CONFIGS[ide].path}`));
120
+ }
83
121
  console.log(chalk.blue('\n📋 Próximos passos:'));
84
122
  console.log(' 1. Configure o MCP na sua IDE:');
85
123
  console.log(chalk.gray(' "mcpServers": { "maestro": { "serverUrl": "https://maestro.deluna.dev.br/mcp" } }'));
@@ -92,16 +130,10 @@ export async function init(options = {}) {
92
130
  process.exit(1);
93
131
  }
94
132
  }
95
- function generateGeminiMd() {
96
- return `---
97
- trigger: always_on
98
- system: maestro
99
- version: 1.0.0
100
- ---
101
-
102
- # Maestro - Desenvolvimento Assistido por IA
133
+ function generateDefaultRules() {
134
+ return `# MCP Maestro Development Kit - AI Rules
103
135
 
104
- > Este projeto utiliza o sistema Maestro para desenvolvimento estruturado.
136
+ > Este arquivo define como a IA deve se comportar ao trabalhar com o sistema MCP Maestro.
105
137
 
106
138
  ## Configuração MCP
107
139
 
package/dist/index.js CHANGED
@@ -6,12 +6,20 @@ const program = new Command();
6
6
  program
7
7
  .name('maestro')
8
8
  .description('CLI para inicializar projetos com Maestro - Desenvolvimento assistido por IA')
9
- .version('1.0.0');
9
+ .version('1.0.0')
10
+ .option('-f, --force', 'Sobrescreve arquivos existentes')
11
+ .option('--minimal', 'Instala apenas workflows e rules')
12
+ .option('--ide <ide>', 'IDE alvo: gemini, cursor, copilot, windsurf, all (default: all)', 'all')
13
+ .action(async (options) => {
14
+ // Comportamento padrão: executa init quando chamado sem subcomando
15
+ await init(options);
16
+ });
10
17
  program
11
18
  .command('init')
12
19
  .description('Inicializa Maestro no projeto atual')
13
20
  .option('-f, --force', 'Sobrescreve arquivos existentes')
14
- .option('--minimal', 'Instala apenas workflows e GEMINI.md')
21
+ .option('--minimal', 'Instala apenas workflows e rules')
22
+ .option('--ide <ide>', 'IDE alvo: gemini, cursor, copilot, windsurf, all (default: all)', 'all')
15
23
  .action(init);
16
24
  program
17
25
  .command('update')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maestro-ai/cli",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "CLI para inicializar projetos com Maestro - Desenvolvimento assistido por IA",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",