Writing CLI Commands for Drupal 8 using Symfony Components


If you have been developing with Drupal and/or Symfony, chances are you may already know a great alternative to speed up the development process is to use a CLI tool.

During this session, you will learn how to write custom CLI command for Drupal 8 using Drupal Console the new Drupal CLI based on symfony/console, twig and other third party components.


  • Creating commands for modules and themes.
  • Creating chain file [A YAML file that allows you to define several commands to run].
  • Calling a chain file and execute commands.
  • Creating global commands.
  • Creating commands for libraries.
  • Registering chain files as commands.
  • Creating commands for DrupalConsole [How to contribute to DrupalConsole].

Session Track


Experience Level


Drupal Version

When & Where

Wednesday, 27 September, 2017 - 15:45 to 16:45
Lehar 4