2017 © Pedro Peláez
 

library console

PHP Simple Library to Create Command Line Interface Application

image

rakit/console

PHP Simple Library to Create Command Line Interface Application

  • Friday, March 9, 2018
  • by emsifa
  • Repository
  • 1 Watchers
  • 0 Stars
  • 29 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 7 % Grown

The README.md

Rakit Console

Rakit Console is simple PHP library to create Command Line Interface (CLI) Application. This library strongly inspired by Laravel Artisan Console., (*1)

Features

  • Closure command. You don't need to create class for simple command.
  • Built-in command list.
  • Auto help handler for each commands.
  • Easy command signature.
  • Password input.
  • Simple Coloring.

Installation

Just run this composer command:, (*2)

composer require rakit/console

Quickstart

1. Create App

Create a file named cli (without extension)., (*3)

<?php

use Rakit\Console\App;

require('vendor/autoload.php');

// 1. Initialize app
$app = new App;

// 2. Register commands
$app->command('hello {name}', 'Say hello to someone', function($name) {
    $this->writeln("Hello {$name}");
});

// 3. Run app
$app->run();

2. Running Command

Open terminal/cmd, go to your app directory, run this command:, (*4)

php cli hello "John Doe"

3. Command List

You can see available commands by typing this:, (*5)

php cli list

4. Show Help

You can show help by putting --help or -h for each command. For example:, (*6)

php cli hello --help

The Versions

09/03 2018

dev-master

9999999-dev

PHP Simple Library to Create Command Line Interface Application

  Sources   Download

MIT

by Muhammad Syifa

09/03 2018

v0.1.3

0.1.3.0

PHP Simple Library to Create Command Line Interface Application

  Sources   Download

MIT

by Muhammad Syifa

17/02 2018

v0.1.2

0.1.2.0

PHP Simple Library to Create Command Line Interface Application

  Sources   Download

MIT

by Muhammad Syifa

31/01 2018

v0.1.1

0.1.1.0

PHP Simple Library to Create Command Line Interface Application

  Sources   Download

MIT

by Muhammad Syifa

30/01 2018

v0.1.0

0.1.0.0

PHP Simple Library to Create Command Line Interface Application

  Sources   Download

MIT

by Muhammad Syifa

20/05 2017

v0.0.2

0.0.2.0

PHP Simple Library to Create Command Line Interface Application

  Sources   Download

MIT

by Muhammad Syifa

22/02 2017

v0.0.1

0.0.1.0

PHP Simple Library to Create Command Line Interface Application

  Sources   Download

MIT

by Muhammad Syifa