kohkimakimoto / luster
A command line application framework based on Laravel.
Requires
- php: >=5.4.0
- illuminate/config: 5.0.*
- illuminate/console: 5.0.*
- illuminate/container: 5.0.*
- illuminate/contracts: 5.0.*
- illuminate/database: 5.0.*
- illuminate/events: 5.0.*
- illuminate/filesystem: 5.0.*
- illuminate/http: 5.0.*
- illuminate/support: 5.0.*
- illuminate/view: 5.0.*
- phpseclib/phpseclib: 0.3.*
- symfony/process: 2.6.*
- vlucas/phpdotenv: ~1.0
Requires (Dev)
- fabpot/php-cs-fixer: @stable
- phpunit/phpunit: 4.*
README
A command line application framework based on Laravel.
Note: Luster 5.0.x is based on Laravel5.0.
Requirements
- PHP5.4 or later
Installation
Create composer.json
for installing via composer..
{
"require": {
"kohkimakimoto/luster": "5.0.*"
}
}
Run composer install command.
composer install
Usage
Getting Started
Run luster init
to create your command line app project files.
php vendor/bin/luster init
Input your cli app name (default: luster)
Input your app name. You will get some directories and files.
Look at bin/[yourappname]
. It is a executable command file to bootstrap the app.
Run this command.
php bin/yourappname
Did you get messages like the following? It is OK. Luster has been installed correctly.
yourappname version 0.1.0
Usage:
command [options] [arguments]
Options:
--help (-h) Display this help message
--quiet (-q) Do not output any message
--verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version (-V) Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
...
Let's start developing your command line app. Open bin/yourappname
file by your text editor.
#!/usr/bin/env php <?php require_once __DIR__ . '/../vendor/autoload.php'; use Kohkimakimoto\Luster\Foundation\Application; $app = new Application("yourappname", "0.1.0"); $app->setBasePath(realpath(__DIR__."/..")); $app->register([ // 'Illuminate\Database\DatabaseServiceProvider', // 'Illuminate\Database\MigrationServiceProvider', // 'Illuminate\Database\SeedServiceProvider', // 'Kohkimakimoto\Luster\Process\ProcessServiceProvider', ]); $app->setAliases([ // 'Process' => 'Kohkimakimoto\Luster\Process\Facades\Process', ]); $app->command([ // 'Kohkimakimoto\Luster\Commands\HelloCommand', ]); $app->run();
Uncomment the line inside of $app->command([...])
method.
$app->command([ 'Kohkimakimoto\Luster\Commands\HelloCommand', ]);
WIP...
Author
Kohki Makimoto kohki.makimoto@gmail.com
License
MIT license.