handle method
Called automatically before executing the command. You can override to do pre-validation or setup.
Implementation
@override
Future<void> handle(List<String> args) async {
logger.info('🚀 Starting Khadem development server...');
_done ??= Completer<void>();
await _startServer();
// Set up file watcher for auto-reload
if (argResults?['watch'] as bool? ?? true) {
_setupFileWatcher();
}
// Set up keyboard commands
_setupStdinListener();
// Keep the command alive
await _done!.future;
}