drupal
CLI for Drupal code generation and site management
TLDR
SYNOPSIS
drupal command [options] [arguments]
DESCRIPTION
Drupal Console is a CLI tool for generating boilerplate code, interacting with, and debugging Drupal 8+ applications. Built on the Symfony Console component, it accelerates development through code generation and provides utilities for common administrative tasks.
The generate commands create scaffolding for modules, plugins, controllers, forms, and other Drupal components following best practices. Interactive prompts guide through configuration options.
Drupal Console also provides debugging tools, cache management, configuration import/export, and database operations from the command line.
PARAMETERS
COMMAND
Drupal Console command to execute.generate:module
Generate module scaffolding.generate:controller
Generate controller class.cache:rebuild
Clear all caches.module:install NAME
Install and enable module.site:status
Show site information.update:execute
Run database updates.--help
Display help information.
CONFIGURATION
~/.console/config.yml
User-level configuration for Drupal Console, including default options and preferences.drupal.yml
Project-specific configuration file in Drupal root, defining module paths and custom settings.
CAVEATS
Requires Drupal 8+ installation. Must be run from the Drupal root directory. Some commands require database access. The project is no longer actively maintained; Drush has adopted many of its features and is the recommended CLI tool for modern Drupal development.
HISTORY
Drupal Console was created as a code generation and developer tool for Drupal 8, released around 2015. It was inspired by Symfony Console and brought modern CLI development practices to Drupal.
