import type { Command } from "commander";
import { loadConfig } from "../../config/config.js";
import { registerPluginCliCommands } from "../../plugins/cli.js";
import { registerChannelsCli } from "../channels-cli.js";
import { registerCronCli } from "../cron-cli.js";
import { registerDaemonCli } from "../daemon-cli.js";
import { registerDnsCli } from "../dns-cli.js";
import { registerDirectoryCli } from "../directory-cli.js";
import { registerDocsCli } from "../docs-cli.js";
import { registerGatewayCli } from "../gateway-cli.js";
import { registerHooksCli } from "../hooks-cli.js";
import { registerLogsCli } from "../logs-cli.js";
import { registerMemoryCli } from "../memory-cli.js";
import { registerModelsCli } from "../models-cli.js";
import { registerNodesCli } from "../nodes-cli.js";
import { registerPairingCli } from "../pairing-cli.js";
import { registerPluginsCli } from "../plugins-cli.js";
import { registerSandboxCli } from "../sandbox-cli.js";
import { registerSecurityCli } from "../security-cli.js";
import { registerSkillsCli } from "../skills-cli.js";
import { registerTuiCli } from "../tui-cli.js";
import { registerUpdateCli } from "../update-cli.js";

export function registerSubCliCommands(program: Command) {
  registerDaemonCli(program);
  registerGatewayCli(program);
  registerLogsCli(program);
  registerMemoryCli(program);
  registerModelsCli(program);
  registerNodesCli(program);
  registerSandboxCli(program);
  registerTuiCli(program);
  registerCronCli(program);
  registerDnsCli(program);
  registerDocsCli(program);
  registerHooksCli(program);
  registerPairingCli(program);
  registerPluginsCli(program);
  registerChannelsCli(program);
  registerDirectoryCli(program);
  registerSecurityCli(program);
  registerSkillsCli(program);
  registerUpdateCli(program);
  registerPluginCliCommands(program, loadConfig());
}
