1.3.1 2016-04-09 01:47 UTC

This package is auto-updated.

Last update: 2020-07-14 22:02:51 UTC


use this to build your own console command for your Phalcon applications.


Let's create a simple console


use Clarity\Console\Brood;

class SampleConsole extends Brood
    protected $alias = 'sample';
    protected $description = 'Just a sample class to test console';

    public function slash()

Save the file as SampleConsole.php


Let's bootstrap the application on how we could probably create the executor.

#!/usr/bin/env php

$consoles = [

use Symfony\Component\Console\Application;
$app = new Application(
    'Brood (c) Daison Cariño',

# let's check if the call came from CLI
if ( php_sapi_name() === 'cli' ) {

    # iterate the consoles array
    foreach ($consoles as $console) {
        $app->add(new $console);


Save the above code as console or any you want, while slayer is brood.

Run it to your console:

php console