PHPackages                             noone-silent/phalcon-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. noone-silent/phalcon-console

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

noone-silent/phalcon-console
============================

Phalcon console framework for easier console command management and overview.

v0.1.0(4mo ago)227↓33.3%GPL-3.0-or-laterPHPPHP &gt;= 8.0

Since Dec 14Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/noone-silent/phalcon-console)[ Packagist](https://packagist.org/packages/noone-silent/phalcon-console)[ Docs](https://github.com/noone-silent/phalcon-console)[ RSS](/packages/noone-silent-phalcon-console/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

Phalcon Console
===============

[](#phalcon-console)

The **Phalcon Console** package is a robust command-line interface (CLI) framework designed to simplify the creation and management of console Commands in Phalcon applications. Built with the Phalcon framework ecosystem in mind, this package provides developers with an elegant, attribute-driven approach to defining and executing command-line tasks with minimal boilerplate code.

Core Functionality
------------------

[](#core-functionality)

At its heart, the Phalcon Console package automates the discovery, registration, and execution of console Commands from your application's codebase. Rather than manually maintaining a command registry, the package uses PHP's reflection capabilities to dynamically scan specified directories for command classes, automatically extracting metadata about available Commands and their parameters through attributes and method signatures.

The package implements a command discovery system that scans PHP files in designated locations, parses class definitions to identify Commands, and extracts method-level metadata through the `#[PhalconConsoleCommand]` attribute. This allows developers to define new Commands by simply creating appropriately named classes with decorated methods. No complex configuration is required.

Installation
============

[](#installation)

```
composer require noone-silent/phalcon-console
```

Configuration
=============

[](#configuration)

For the discovery of Commands, add a list of all folders that you wish to scan for PHP-Classes. Modify your project composer.json and add the following configuration, adjusted to your needs. The bootstrap file is needed. There you instantiate the `$di` container used for the `\Phalcon\Cli\Console` class.

```
{
  "extras": {
    "phalcon-console": {
      "bootstrap": "path/to/your/cli/bootstrap.php",
      "locations": [
        ".",
        "src/",
        "app/",
        "cli/"
      ]
    }
  }
}
```

Now add the `#[PhalconConsoleCommand]` attribute to any method you want to be usable as command line command.

```
// Before

use Phalcon\Cli\Task;

class MyCliTask extends Task
{
    public function mainAction(string $date): void
    {
        // Do something
    }

    public function doSomethingAction(int $a, int $b = 2): void
    {
        // Do something
    }
}

// After

use Phalcon\Cli\Task;
use Phalcon\Console\PhalconConsoleCommand;

class MyCliTask extends Task
{
    #[PhalconConsoleCommand]
    public function mainAction(string $date): void
    {
        // Do something
    }
    #[PhalconConsoleCommand]
    public function doSomethingAction(int $a, int $b = 2): void
    {
        // Do something
    }
}
```

In the project root, where your `vendor/` folder is located, you can run now the following script:

```
vendor/bin/phalcon-console
```

The output should have a listing looking like this:

```
mycli:
  mycli:main
  mycli:dosomething  [b:int=2]
```

Here is an example image with a few commands:

[![example output](assets/example-output.jpg)](assets/example-output.jpg)

Parameters that are required are wrapped in ``. Optional parameters are wrapped in `[` and `]`.

Now you can execute a command:

```
vendor/bin/phalcon-console mycli:main date=2025-12-13

# or

vendor/bin/phalcon-console mycli:dosomething a=2 b=3
```

Advanced configuration
======================

[](#advanced-configuration)

There are a few other options you can use. Below is the list with their default values.

```
{
  "extras": {
    "phalcon-console": {
      "locations": [],
      "bootstrap": "",
      "di": "di",
      "colored": true,
      "suffixes": [
        "Action",
        "Command",
        "Controller",
        "Task"
      ]
    }
  }
}
```

With the **locations** option, you define which folders need to be scanned. It uses the project root as a starting point.

The **bootstrap** option is needed, so you can set up your Phalcon application with all services that you need.

If you have named your DI different then `$di`, then you can set the name in the **di** option. Omit the dollar sign. If you named it `$container` then put `container` into the `di` setting.

The option **colored** is used to enable or disable colored output.

If your command has a suffix that you want to remove, you can add it to the **suffixes** option.

Testing
=======

[](#testing)

```
# start docker environment
docker compose up -d
```

```
# jump into the phalcon container
docker compose exec phalcon bash
```

```
# install composer requirements
composer install
```

```
# get a complete list of all available Commands
bin/phalcon-console
```

```
# execute a single command with some arguments
bin/phalcon-console dummy:say name=Phalcon
```

Roadmap
=======

[](#roadmap)

- Caching (if needed)
- Phalcon Module Support

###  Health Score

33

—

LowBetter than 74% of packages

Maintenance78

Regular maintenance activity

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity29

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

146d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1089817?v=4)[n\[oO\]ne](/maintainers/noone-silent)[@noone-silent](https://github.com/noone-silent)

---

Top Contributors

[![noone-silent](https://avatars.githubusercontent.com/u/1089817?v=4)](https://github.com/noone-silent "noone-silent (11 commits)")

---

Tags

cliconsolecommandphalconTasks

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/noone-silent-phalcon-console/health.svg)

```
[![Health](https://phpackages.com/badges/noone-silent-phalcon-console/health.svg)](https://phpackages.com/packages/noone-silent-phalcon-console)
```

###  Alternatives

[helhum/typo3-console

A reliable and powerful command line interface for TYPO3 CMS

2939.0M192](/packages/helhum-typo3-console)[adhocore/cli

Command line interface library for PHP

3501.2M50](/packages/adhocore-cli)[aplus/cli

Aplus Framework CLI Library

2301.7M6](/packages/aplus-cli)[laminas/laminas-cli

Command-line interface for Laminas projects

563.7M54](/packages/laminas-laminas-cli)[inhere/console

php console library, provide console argument parse, console controller/command run, color style, user interactive, information show.

3477.4k12](/packages/inhere-console)[hydreflab/laravel-make-me

Extendable Interactive Make Command for Laravel

371.2k](/packages/hydreflab-laravel-make-me)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
