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

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

huttopia/console-bundle
=======================

Add some nice features to symfony/console

1.3.3(6y ago)862.9k5MITPHPPHP &gt;=7.1.2

Since May 5Pushed 3y ago3 watchersCompare

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

READMEChangelog (10)Dependencies (2)Versions (13)Used By (0)

[![version](https://camo.githubusercontent.com/a4db7aa277cf3d0ef2e8154ba3a6c98ac1dc60e82d642d572f567e3255d1db1d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d312e332e332d677265656e2e737667)](https://github.com/huttopia/console-bundle)[![symfony](https://camo.githubusercontent.com/e007b54f8799973a4dd29c545534ce404438e7fe3a1884fea216dbcf915ceaf5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f73796d666f6e792f6672616d65776f726b62756e646c652d253545322e33253230253743253743253230253545332e30253230253743253743253230253545342e30253230253743253743253230253545352e302d626c75652e737667)](https://symfony.com)[![symfony](https://camo.githubusercontent.com/0dbcc513d27bc49e17646a3c7239331418d56b52474cc8fbdc0b3ae8a4de092c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f73796d666f6e792f636f6e736f6c652d253545322e33253230253743253743253230253545332e30253230253743253743253230253545342e30253230253743253743253230253545352e302d626c75652e737667)](https://symfony.com)[![Lines](https://camo.githubusercontent.com/a217a8020d8955bbfe8bfbc785e6eafd95473c8fdac0231588692193c5c93129/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f64652532306c696e65732d3937332d677265656e2e737667)](https://camo.githubusercontent.com/a217a8020d8955bbfe8bfbc785e6eafd95473c8fdac0231588692193c5c93129/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f64652532306c696e65732d3937332d677265656e2e737667)[![Total Downloads](https://camo.githubusercontent.com/4d3ca64f897f6e41da54186ed13884ad8c975a89d714bc7214e360d9c726d84f/68747470733a2f2f706f7365722e707567782e6f72672f687574746f7069612f636f6e736f6c652d62756e646c652f646f776e6c6f616473)](https://camo.githubusercontent.com/4d3ca64f897f6e41da54186ed13884ad8c975a89d714bc7214e360d9c726d84f/68747470733a2f2f706f7365722e707567782e6f72672f687574746f7069612f636f6e736f6c652d62756e646c652f646f776e6c6f616473)

ConsoleBundle
=============

[](#consolebundle)

Allow to exclude some commands.

For example, if you don't want to have *doctrine:schema:update* command in *prod* env: now you can :).

Add configuration to *doctrine:schema:update* to get queries for more than one database per connection.

[Changelog](changelog.md)

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

[](#installation)

```
composer require huttopia/console-bundle ^1.3
```

Replace parts of `bin/console`:

```
# Replace use Symfony\Bundle\FrameworkBundle\Console\Application; by this one
use Huttopia\ConsoleBundle\Application;

# Add this line before $input = new ArgvInput();
$allCommands = \Huttopia\ConsoleBundle\CommandOption\AllCommandsOption::parseAllCommandsOption($argv);
$input = new ArgvInput();

# Replace Application creation (it should be the last 2 lines of your bin/console)
// $application = new Application($kernel);
// $application->run($input);
(new Application($kernel))
    ->setAllCommands($allCommands)
    ->run($input);
```

Symfony &lt;= 3
---------------

[](#symfony--3)

```
# app/AppKernel.php
class AppKernel
{
    public function registerBundles()
    {
        $bundles = [
            new \Huttopia\ConsoleBundle\ConsoleBundle()
        ];
    }
}
```

Symfony &gt;= 4
---------------

[](#symfony--4)

```
# config/bundles.php
return [
    Huttopia\ConsoleBundle\ConsoleBundle::class => ['all' => true]
];
```

Exclude commands
================

[](#exclude-commands)

```
# Symfony = 4: config/packages/console_bundle.yaml
console:
    excluded:
        - 'foo:bar:baz'
        - 'bar:foo:baz'
```

Hide parts of command list
==========================

[](#hide-parts-of-command-list)

When you call `bin/console` or `bin/console list`, you see the list of commands.

Output is cut in 4 parts:

- Symfony version, environment and debug mode state
- Help for usage syntax
- Help for options available with all commands
- Commands list

You can configure at what verbosity level each part will be shown.

Verbosity level could be `0`, `1` (`-v`), `2` (`-vv`) or `3` (`-vvv`).

```
# Symfony = 4: config/packages/console_bundle.yaml
console:
    list:
        symfonyVersionVerbosityLevel: 1
        usageVerbosityLevel: 1
        optionsVerbosityLevel: 1
        availableCommandsVerbosityLevel: 0
```

Colorise some commands
======================

[](#colorise-some-commands)

When you call `bin/console` or `bin/console list`, you see the list of commands.

You can change the color of each part of the command name and description:

```
console:
    list:
        output:
            # See https://symfony.com/doc/current/console/coloring.html
            styles:
                foo:
                    foreground: cyan # 1st parameter of new OutputFormatterStyle()
                    background: green # 2nd parameter of new OutputFormatterStyle()
                    options: [bold, underscore] # 3rd parameter of new OutputFormatterStyle()
            commands:
                generate:benchmark: "%%s%%s%%s" # 1st %s is command name, 2nd is spaces between name and description and 3rd is the description
            highlights: # Shortcut for "%%s%%s%%s" who will write command name and description in cyan instead of green and white
                - 'cache:clear'

```

doctrine:schema:update for more than one database
=================================================

[](#doctrineschemaupdate-for-more-than-one-database)

*doctrine:schema:update* has a major problem for us: only one database per connection is managed.

In our projects, we have more than one database per connection, so *doctrine:schema:update* don't show queries for all our databases.

*UpdateDatabaseSchemaCommand* replace *doctrine:schema:update* and call old *doctrine:schema:update* for all configured databases!

Configuration
-------------

[](#configuration)

```
# Symfony = 4: config/packages/console_bundle.yaml
console:
    databases:
        - database_name_1
        - database_name_2
```

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 96.3% 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 ~118 days

Recently: every ~3 days

Total

10

Last Release

2237d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4fc8590c16dc26e7e8248ae77dcae6ea1d3475331b0f0359f3dbd6535d4806d1?d=identicon)[huttopia](/maintainers/huttopia)

---

Top Contributors

[![steevanb](https://avatars.githubusercontent.com/u/5063383?v=4)](https://github.com/steevanb "steevanb (26 commits)")[![ZeMarine](https://avatars.githubusercontent.com/u/158932?v=4)](https://github.com/ZeMarine "ZeMarine (1 commits)")

---

Tags

consoledoctrine2phpphp7php71symfonysymfony-console

### Embed Badge

![Health badge](/badges/huttopia-console-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/huttopia-console-bundle/health.svg)](https://phpackages.com/packages/huttopia-console-bundle)
```

###  Alternatives

[matthiasnoback/symfony-console-form

Use Symfony forms for Console command input

368264.8k8](/packages/matthiasnoback-symfony-console-form)[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)
