1. Go to this page and download the library: Download krzysztofzylka/console 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/ */
use Krzysztofzylka\Console\Form;
Form::prompt('Continue?');
Form::prompt('Continue?', ' [y/n]', false, true);
use Krzysztofzylka\Console\Generator\Help;
$overview = new Help();
$overview->addHeader('Commands');
$overview->addHelp('serve', 'Serve the application');
$overview->addHelp('cache:clear', 'Clear cache');
$overview->addHelp('routes:list', 'List routes');
echo $overview->renderOverview();
$help = new Help();
$help->setTitle('Sync command');
$help->setDescription('Synchronize local data with a remote source.');
$help->setUsage('php bin/app sync <workspace> [--env=prod] [--force]');
$help->addCommand('sync', 'Synchronize local data with a remote source.');
$help->addArgument('workspace', 'Workspace identifier.', true);
$help->addOption('--env', 'Environment name.', false, 'prod', false, ['dev', 'stage', 'prod']);
$help->addOption('--force', 'Run command without confirmation.');
$help->addExample('php bin/app sync main --env=prod', 'Synchronize the main workspace in production.');
echo $help->renderCommandHelp();