1. Go to this page and download the library: Download chrisenytc/livcommander 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/ */
chrisenytc / livcommander example snippets
#!/usr/bin/env php
use Commander\LivCommander;
//Create new instance of LivCommander
$livia = new LivCommander();
//Create a command option
$livia->setOption('option_name', 'description', array(
array('name' => 'commandname', 'command' => 'command"')
));
//Start LivCommander with stdinput
$livia->bootstrap($argv);
$livia->setAppName('LivCommander');
$livia->setMessagePath(__DIR__.'/messages');
$livia->getAppName();
$livia->getMessagePath();
$livia->log('Hello World', 'info');
$response = $livia->ask('Whats your name?');
$response = $livia->confirm('Do you like The Vampire Diaries?');