A command line application framework based on Laravel.

v5.0.12 2015-07-16 09:46 UTC

README

Build Status Latest Stable Version Total Downloads Latest Unstable Version License

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.