#!/usr/bin/env node

/**
 * fluig-skills — Menu interativo de gerenciamento de skills Fluig
 * Instala/remove skills para Claude Code, Codex CLI, GitHub Copilot e Cursor
 *
 * Uso:
 *   npx @future-station/fluig-mcp skills
 *   fluig-skills  (se instalado globalmente)
 */

const RESET = "\x1b[0m";
const YELLOW = "\x1b[33m";
const RED = "\x1b[31m";
const BOLD = "\x1b[1m";

function print(msg) {
  process.stderr.write(msg + "\n");
}

async function main() {
  const { runSkillsMenu } = require("../lib/wizard/steps/skills");
  await runSkillsMenu();
}

main().catch((err) => {
  if (err.name === "ExitPromptError") {
    print(`\n  ${YELLOW}Cancelado.${RESET}\n`);
    process.exit(0);
  }
  print(`${RED}${BOLD}Erro: ${err.message}${RESET}`);
  process.exit(1);
});
