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

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

mouf/utils.console
==================

A console for the Mouf PHP framework.

v1.0.6(3y ago)0111.3k↓50%34MITPHPPHP ^8.0

Since May 19Pushed 3y ago13 watchersCompare

[ Source](https://github.com/thecodingmachine/utils.console)[ Packagist](https://packagist.org/packages/mouf/utils.console)[ Docs](http://mouf-php.com/packages/mouf/utils.console)[ RSS](/packages/mouf-utilsconsole/feed)WikiDiscussions 1.0 Synced 1mo ago

READMEChangelog (3)Dependencies (2)Versions (8)Used By (4)

[![Latest Stable Version](https://camo.githubusercontent.com/2ac4c21fda02a5f9bd5befbd72a042f9a29931265545f22e65d0091cc5884419/68747470733a2f2f706f7365722e707567782e6f72672f6d6f75662f7574696c732e636f6e736f6c652f762f737461626c652e737667)](https://packagist.org/packages/mouf/utils.console)[![Latest Unstable Version](https://camo.githubusercontent.com/7564168e17f3e9c3d99d0dfaa1ae3169b5623e013474dc1200fcfaefe4d53fbd/68747470733a2f2f706f7365722e707567782e6f72672f6d6f75662f7574696c732e636f6e736f6c652f762f756e737461626c652e737667)](https://packagist.org/packages/mouf/utils.console)[![License](https://camo.githubusercontent.com/298d87c2b4203c7fe68dd51b5b261d613d79186f3a4a5f8bd8ed9c87dcad39ce/68747470733a2f2f706f7365722e707567782e6f72672f6d6f75662f7574696c732e636f6e736f6c652f6c6963656e73652e737667)](https://packagist.org/packages/mouf/utils.console)

Console for Mouf PHP framework
==============================

[](#console-for-mouf-php-framework)

This is a simple [Symfony 2 based console](http://symfony.com/doc/current/components/console/introduction.html) for the [Mouf PHP framework](http://mouf-php.com).

Why?
----

[](#why)

Mouf is a graphical framework, so most of the development is done in the UI. However, it can sometimes be useful to have a command line interface, to use in deploy scripts or on remote servers... This package provides this command-line.

How does it work?
-----------------

[](#how-does-it-work)

Simply include this package in your `composer.json` requirements:

```
{
    "require": {
        "mouf/utils.console": "~1.0"
    }
}
```

The command line will be accessible from `vendor/bin/mouf_console`

Adding your own command
-----------------------

[](#adding-your-own-command)

In order to add a new command to the list of available commands, you must [create a new class extending the `Command` class](http://symfony.com/doc/current/components/console/introduction.html#creating-a-basic-command).

Then, you should create an instance of the class in Mouf user interface.

Finally, the console application is represented by the `console` instance in Mouf. Edit this instance, and drag'n'drop your command in the list of known commands:

[![The console instance](doc/images/console_instance.png)](doc/images/console_instance.png)

Package developers
------------------

[](#package-developers)

Most of what you need to know is detailed in [Symfony's doc](http://symfony.com/doc/current/components/console/introduction.html).

In order to create a new command and register it automatically when you package is installed, you should:

- create [an install script for your package](http://mouf-php.com/packages/mouf/mouf/doc/install_process.md)
- create an instance of the command in this installation script
- register this command using `ConsoleUtils::registerCommand($command)`

Here is a sample script you could put in your install script:

```
use Mouf\Actions\InstallUtils;
use Mouf\Console\ConsoleUtils;
use Mouf\MoufManager;

...
// Let's create an instance of "ConsoleUtils"
$consoleUtils = new ConsoleUtils($moufManager);

// We declare our instance of the Symfony command as a Mouf instance
$dbalRunSqlCommand = InstallUtils::getOrCreateInstance('dbalRunSqlCommand', 'Doctrine\\DBAL\\Tools\\Console\\Command\\RunSqlCommand', $moufManager);

// We register that instance descriptor using "ConsoleUtils"
$consoleUtils->registerCommand($dbalRunSqlCommand);
```

Notice how `$dbalRunSqlCommand` is a descriptor of the 'dbalRunSqlCommand' instance and not the instance itself.

If you need a particular "helperSet", you can register it using `ConsoleUtils::registerHelperSet($helperSet)`

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community24

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 70% 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

Every ~393 days

Recently: every ~590 days

Total

8

Last Release

1264d ago

PHP version history (2 changes)v1.0.0PHP &gt;=5.3.0

v1.0.6PHP ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1104771?v=4)[mouf](/maintainers/mouf)[@Mouf](https://github.com/Mouf)

---

Top Contributors

[![moufmouf](https://avatars.githubusercontent.com/u/1290952?v=4)](https://github.com/moufmouf "moufmouf (14 commits)")[![dsavina](https://avatars.githubusercontent.com/u/22031211?v=4)](https://github.com/dsavina "dsavina (2 commits)")[![Cach54](https://avatars.githubusercontent.com/u/2151265?v=4)](https://github.com/Cach54 "Cach54 (1 commits)")[![homersimpsons](https://avatars.githubusercontent.com/u/16977446?v=4)](https://github.com/homersimpsons "homersimpsons (1 commits)")[![nguyenk](https://avatars.githubusercontent.com/u/2227554?v=4)](https://github.com/nguyenk "nguyenk (1 commits)")[![xhuberty](https://avatars.githubusercontent.com/u/8350192?v=4)](https://github.com/xhuberty "xhuberty (1 commits)")

---

Tags

consolemouf

### Embed Badge

![Health badge](/badges/mouf-utilsconsole/health.svg)

```
[![Health](https://phpackages.com/badges/mouf-utilsconsole/health.svg)](https://phpackages.com/packages/mouf-utilsconsole)
```

###  Alternatives

[psy/psysh

An interactive shell for modern PHP.

9.8k545.6M719](/packages/psy-psysh)[laminas/laminas-cli

Command-line interface for Laminas projects

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

Drupal Console Core

13514.7M12](/packages/drupal-console-core)[matthiasnoback/symfony-console-form

Use Symfony forms for Console command input

368264.8k8](/packages/matthiasnoback-symfony-console-form)[coresphere/console-bundle

This bundle allows you accessing the symfony2 console via your browser

146337.3k5](/packages/coresphere-console-bundle)[shel/neos-terminal

Neos CMS Ui terminal for running Eel expressions and other commands

1441.3k](/packages/shel-neos-terminal)

PHPackages © 2026

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