1. Go to this page and download the library: Download getkirby/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/ */
$cli->success('This is text in a nice green box');
$cli->error('This is red text for errors');
$cli->bold('This is some bold text');
// this will create a line break
$cli->br();
return [
'description' => 'Hello world',
'args' => [
'name' => [
'description' => 'The name for the greeting',
'
return [
'description' => 'Hello world',
'command' => static function ($cli): void {
$name = $cli->prompt('Please enter a name:');
$cli->success('Hello ' . $name . '!');
}
];
return [
'description' => 'Hello world',
'args' => [
'name' => [
'description' => 'The name for the greeting',
]
],
'command' => static function ($cli): void {
$name = $cli->argOrPrompt('name', 'Please enter a name:');
$cli->success('Hello ' . $name . '!');
}
];
return [
'description' => 'Downloads the starterkit and the plainkit',
'command' => static function ($cli): void {
$cli->command('install:kit', 'starterkit');
$cli->command('install:kit', 'plainkit');
$cli->success('Starterkit and plainkit have been installed');
}
];
composer global
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.