What is the Drupal Console?

The Drupal Console is a suite of tools that you run on a command line interface (CLI) to generate boilerplate code and interact with a Drupal 8 installation.

This project takes the Symfony Console component and makes it available on Drupal 8.

The Drupal Console is another cool addition to the Proudly Found Elsewhere school of thought as it leverages the Symfony Console component to handle the CLI part.

A little history

Let’s move back in time to September 2013 at DrupalCamp Costa Rica, where this project was conceived. While David Flores and I were talking with Larry Garfield about Drupal 8. The introduction of Symfony Components had recently happened and at some point, Larry mentioned someone should bring the Symfony Console to Drupal 8.

That was the aha! moment. David and I had been discussing the same topic before, but had been procrastinating until that day when we decided to actually start working on the project.

During the first year of development the project it's been changing from a Drupal 8 module generator to a robust CLI tool for Drupal 8.

The project have commands that interact with the service container. This allows us to do administration task not related to code generation.

Why should you use it?

Managing the increasing complexity of Drupal 8 can be a daunting task for anyone, are you prepared for it?

The Drupal Console is a suite of tools to help you manage that complexity. 

What can you do with it?

  • Generate the code and files required by a Drupal 8 module:

    Drupal Console provides a number of commands for creating module scaffolding and boilerplate code. For any command, you will be asked a series of questions about what you want to generate. 

    Files are generated on the proper directory and inside these files, the proper code is generated for you. Classes area created adding namespaces, uses and also extends and implements keywords when required and adding services using Dependency Injection on class generation.
     

  • Interact with your Drupal installation:

    Drupal Console allows you to interact with your Drupal installation rebulding cache, rebuilding route system, listing/updating/exporting configurations.
     

  • Learning Drupal 8:
    Learn Drupal 8 by generate code using the "--learning" option.

Where can you find the project?

Do you like to know more about Drupal Console join enzo Eduardo García and myself at our DrupalCon Los Angeles session "Speeding up Drupal 8 development using Drupal Console", Thursday, May 14th, 1pm, Room 502B - Lullabot.