registerCustomCommand method

void registerCustomCommand(
  1. KhademCommand command
)

Programmatic API for external projects to register custom commands. This is the recommended way for external projects to add commands.

Implementation

void registerCustomCommand(KhademCommand command) {
  // Avoid duplicates by command name.
  if (_customCommands.any((c) => c.name == command.name)) return;
  _customCommands.add(command);
  logger.info('✅ Registered custom command: ${command.name}');
}