code: public static function getAllCommands(): array
      {
          /* Get All Commands */
          $commands = [];
          foreach (get_declared_classes() as $class) {
              if (is_subclass_of($class, 'Senhung\CLI\Command')) {
                  $commandObject = new $class;
                  $command = $commandObject->getCommand();
                  $commands[$command] = $class;
              }
          }
  
          return $commands;
      }
docs: Get all registered commands
  
  @return array