const KNOWN_COMMANDS = /* @__PURE__ */ new Set([
  "mcp",
  "warmup",
  "serve",
  "health",
  "doctor",
  "auth",
  "plugin",
  "shell",
  "init",
  "config",
  "dashboard",
  "uninstall",
  "setup",
  "status",
  "backfill",
  "verify"
]);
const HELP_ALIASES = /* @__PURE__ */ new Set(["--help", "-h", "help"]);
const VERSION_ALIASES = /* @__PURE__ */ new Set(["--version", "-V", "version"]);
function parseCommand(argv) {
  const first = argv[0];
  if (!first) {
    return { command: "mcp", args: [] };
  }
  if (HELP_ALIASES.has(first)) {
    return { command: "help", args: [] };
  }
  if (VERSION_ALIASES.has(first)) {
    return { command: "version", args: [] };
  }
  if (KNOWN_COMMANDS.has(first)) {
    return { command: first, args: argv.slice(1) };
  }
  return { command: "unknown", args: [first] };
}
export {
  parseCommand
};
//# sourceMappingURL=index.js.map