PHPackages                             yannoff/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. yannoff/console

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

yannoff/console
===============

A simple, lightweight console implementation for command-line PHP applications.

2.3.2(5mo ago)24.3k12MITPHPPHP &gt;=5.5CI passing

Since Jun 10Pushed 2mo agoCompare

[ Source](https://github.com/yannoff/console)[ Packagist](https://packagist.org/packages/yannoff/console)[ Docs](https://github.com/yannoff/console)[ RSS](/packages/yannoff-console/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (10)DependenciesVersions (31)Used By (2)

yannoff/console
===============

[](#yannoffconsole)

A simple, lightweight console implementation for command-line PHP applications.

[![Latest Stable Version](https://camo.githubusercontent.com/c9c5f0e4433f27f50927da7b661685927f6b94465b66398535d8cbe6caeb9458/68747470733a2f2f706f7365722e707567782e6f72672f79616e6e6f66662f636f6e736f6c652f762f737461626c65)](https://packagist.org/packages/yannoff/console)[![Total Downloads](https://camo.githubusercontent.com/3404ba6acb761077e26eca77f6dcde7c60f8d17fb37e7a79faf2dc77040e6c35/68747470733a2f2f706f7365722e707567782e6f72672f79616e6e6f66662f636f6e736f6c652f646f776e6c6f616473)](https://packagist.org/packages/yannoff/console)[![License](https://camo.githubusercontent.com/c8d6af0422d03fc4afd79d82828e7215f12433d7a95d54d24f7e38768824201c/68747470733a2f2f706f7365722e707567782e6f72672f79616e6e6f66662f636f6e736f6c652f6c6963656e7365)](https://packagist.org/packages/yannoff/console)

Why are we here ?
-----------------

[](#why-are-we-here-)

This library was conceived as an alternative to the [symfony/console](https://github.com/symfony/console) component.

Truth is, the symfony component may be good for rapid-application-development or for a proof-of-concept, but on the other hand doesn't seem to be the best option for most use-cases, since only a few among the plenty of available features are necessary.

So here came the need for the [yannoff/console](https://github.com/yannoff/console) component.

Yet the idea was not to [reinvent the wheel](https://sourcemaking.com/antipatterns/reinvent-the-wheel), but merely to provide a simpler, lighter (in size &amp; resource) and more POSIX-compliant implementation for PHP command-line applications.

Installation
------------

[](#installation)

Via [composer](https://getcomposer.org/):

```
$ composer require yannoff/console
```

Usage
-----

[](#usage)

### API Reference

[](#api-reference)

A detailed API Reference can be found in the [documentation section](doc/api/index.md).

### Example

[](#example)

Here is a *Hello World* command example:

First the application script, the script that will be invoked using `php bin/app.php`

```
#!/usr/bin/env php
