PHPackages                             kasundon/lib-console - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. kasundon/lib-console

ActiveLibrary[CLI &amp; Console](/categories/cli)

kasundon/lib-console
====================

0.0.6(10y ago)018PHP

Since May 24Pushed 10y ago2 watchersCompare

[ Source](https://github.com/KasunDon/lib-console)[ Packagist](https://packagist.org/packages/kasundon/lib-console)[ RSS](/packages/kasundon-lib-console/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)DependenciesVersions (4)Used By (0)

Lib-Console
===========

[](#lib-console)

Simple PHP CLI Framework

\#Installation There are two ways to use lib-console.

\####1. Using Composer composer.json file

```
{
    "require": {
        "kasundon/lib-console": "~0.0.6"
    }
}
```

```
php composer.phar install
```

\####2. Using PHAR Archive (console.phar) Fist of all, Download latest `console.phar`.

```
curl -O https://github.com/KasunDon/lib-console/raw/master/build/console.phar
```

\####Get help for `console.phar`

```
php console.phar -help
```

Setup Default Command file path
===============================

[](#setup-default-command-file-path)

place `console.json` file to your current working directory. Leave emtpty `file_path` in order to use current working directory.

```
{
    "file_path": "commands/"
}
```

Writing Commands
================

[](#writing-commands)

Simply implement `Command` Interface on to your custom command class.

\####If using `console.phar` - Dont forget to require\_once follwoing statement before implements from `Command` Interface.

```
require_once 'phar://console.phar/Command.php';
```

\###Standard Custom Command

```
