1. Go to this page and download the library: Download andreypostal/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/ */
andreypostal / cli example snippets
$app = new App(
appName: 'MyApp',
description: 'My app has a cool description',
cmd: 'php cmd',
params: [],
commands: [
new Command(
key: 'run',
description: 'This action will run soon',
service: [
'handler' => static function(Context $context): void {
App::console('It is so easy!!!');
},
],
),
],
);
$app->run($argv);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.