@ruyfranca/myskills 1.0.26 → 1.0.27
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.
- package/index.js +53 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -257,10 +257,62 @@ program
|
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
259
|
|
|
260
|
+
// Instalar workflows globalmente para aparecerem no / do Antigravity
|
|
261
|
+
if (updateAll || options.workflows) {
|
|
262
|
+
const homeDir = process.env.HOME || process.env.USERPROFILE || '';
|
|
263
|
+
const globalWorkflowsDir = path.join(homeDir, '.gemini', 'antigravity', 'global_workflows');
|
|
264
|
+
const workflowsSrc = path.join(srcRoot, '.agent', 'workflows');
|
|
265
|
+
|
|
266
|
+
if (await fs.pathExists(workflowsSrc)) {
|
|
267
|
+
try {
|
|
268
|
+
await fs.ensureDir(globalWorkflowsDir);
|
|
269
|
+
const files = await fs.readdir(workflowsSrc);
|
|
270
|
+
let copied = 0;
|
|
271
|
+
for (const file of files) {
|
|
272
|
+
if (file.endsWith('.md')) {
|
|
273
|
+
await fs.copy(path.join(workflowsSrc, file), path.join(globalWorkflowsDir, file), { overwrite: true });
|
|
274
|
+
copied++;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
console.log(chalk.green(` ✅ global_workflows: ${copied} workflow(s) instalados em ~/.gemini/antigravity/global_workflows/`));
|
|
278
|
+
} catch (err) {
|
|
279
|
+
console.log(chalk.yellow(` ⚠️ global_workflows: ${err.message}`));
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
260
284
|
console.log(chalk.cyan.bold('\n✨ Atualização concluída!\n'));
|
|
261
|
-
console.log(chalk.gray('💡 Dica: reinicie o Antigravity para
|
|
285
|
+
console.log(chalk.gray('💡 Dica: reinicie o Antigravity para que o / exiba os workflows.\n'));
|
|
286
|
+
});
|
|
287
|
+
|
|
288
|
+
program
|
|
289
|
+
.command('install-global')
|
|
290
|
+
.description('Instala os workflows globalmente para aparecerem no / em qualquer projeto do Antigravity')
|
|
291
|
+
.action(async () => {
|
|
292
|
+
const homeDir = process.env.HOME || process.env.USERPROFILE || '';
|
|
293
|
+
const globalWorkflowsDir = path.join(homeDir, '.gemini', 'antigravity', 'global_workflows');
|
|
294
|
+
const workflowsSrc = path.join(__dirname, '.agent', 'workflows');
|
|
295
|
+
|
|
296
|
+
console.log(chalk.cyan('\n🌐 Instalando workflows globalmente...\n'));
|
|
297
|
+
|
|
298
|
+
try {
|
|
299
|
+
await fs.ensureDir(globalWorkflowsDir);
|
|
300
|
+
const files = await fs.readdir(workflowsSrc);
|
|
301
|
+
let copied = 0;
|
|
302
|
+
for (const file of files) {
|
|
303
|
+
if (file.endsWith('.md')) {
|
|
304
|
+
await fs.copy(path.join(workflowsSrc, file), path.join(globalWorkflowsDir, file), { overwrite: true });
|
|
305
|
+
copied++;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
console.log(chalk.green(` ✅ ${copied} workflows instalados em ${globalWorkflowsDir}`));
|
|
309
|
+
console.log(chalk.cyan.bold('\n✨ Feito! Reinicie o Antigravity e use / para ver os workflows.\n'));
|
|
310
|
+
} catch (err) {
|
|
311
|
+
console.error(chalk.red(` ❌ Erro: ${err.message}`));
|
|
312
|
+
}
|
|
262
313
|
});
|
|
263
314
|
|
|
264
315
|
|
|
316
|
+
|
|
265
317
|
program.parse();
|
|
266
318
|
|