PHP code example of wordcoolframework / cool-cli

1. Go to this page and download the library: Download wordcoolframework/cool-cli library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

wordcoolframework / cool-cli example snippets


composer 

namespace Command;

final class GreetCommand {
    public string $commandName = 'greet';
    public string $description = 'Prints a greeting message';

    public static function handle(?string $name = 'World') : void {
        echo "Hello, $name!\n";
    }
}


return [
    "CommandNamespace"  => "\\Command",
    "CommandDirectory"  => "/command",
];
shell
php cool greet
php cool greet John