src/Service.php
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;
    }
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;
    }
Get all registered commands

@return array