Available Commands

Drupal Console provides 183 commands across 32 namespaces.

Global

Command Usage
about Displays basic information about Drupal Console project
chain Chain command execution
check System requirement checker
composerize Converts Drupal codebase to composer.
exec Execute an external command.
help Displays help for a command
init Copy configuration files.
list Lists all available commands
server Runs PHP built-in web server
shell Open a shell providing an interactive REPL (Read–Eval–Print-Loop).
snippet Runs PHP code

cache

Command Usage
cache:rebuild Rebuild and clear all site caches.
cache:tag:invalidate Invalidate cache tags.

config

Command Usage
config:delete Delete configuration
config:diff Output configuration items that are different in active configuration compared with a directory.
config:edit Change a configuration object with a text editor.
config:export Export current application configuration.
config:export:content:type Export a specific content type and their fields.
config:export:entity Export a specific config entity and their fields.
config:export:single Export a single configuration or a list of configurations as yml file(s).
config:export:view Export a view in YAML format inside a provided module to reuse in another website.
config:import Import configuration to current application.
config:import:single Import a single configuration or a list of configurations.
config:override Override config value in active configuration.
config:validate Validate a drupal config against its schema

create

Command Usage
create:comments Create dummy comments for your Drupal 8 application.
create:nodes Create dummy nodes for your Drupal 8 application.
create:roles Create dummy roles for your Drupal 8 application.
create:terms Create dummy terms for your Drupal 8 application.
create:users Create dummy users for your Drupal 8 application.
create:vocabularies Create dummy vocabularies for your Drupal 8 application.

cron

Command Usage
cron:execute Execute cron implementations by module or execute all crons
cron:release Release cron system lock to run cron again

database

Command Usage
database:add Add a database to settings.php
database:client Launch a DB client if it's available
database:connect Shows DB connection
database:drop Drop all tables in a given database.
database:dump Dump structure and contents of a database
database:log:clear Remove events from DBLog table, filters are available
database:log:poll Poll the watchdog and print new log entries every x seconds
database:query Executes a SQL statement directly as argument
database:restore Restore structure and contents of a database.

debug

Command Usage
debug:breakpoints Displays breakpoints available in application
debug:cache:context Displays current cache context for the application.
debug:chain List available chain files.
debug:config List configuration objects names and single configuration object.
debug:config:settings Displays current key:value on settings file.
debug:config:validate Validate a schema implementation before a module is installed.
debug:container Displays current services for an application.
debug:cron List of modules implementing a cron
debug:database:log Displays current log events for the application
debug:database:table Show all tables in a given database.
debug:dotenv Debug Dotenv debug values.
debug:entity Debug entities available in the system
debug:event Displays current events
debug:features List registered features.
debug:hook commands.debug.hook.description
debug:image:styles List image styles on the site
debug:libraries Displays libraries available in application
debug:migrate Display current migration available for the application
debug:module Displays current modules available for application
debug:multisite List all multi-sites available in system
debug:permission Displays all user permissions.
debug:plugin Displays all plugin types.
debug:queue Displays the queues of your application
debug:rest Display current rest resource for the application
debug:roles Displays current roles for the application
debug:router Displays current routes for the application or information for a particular route
debug:settings List user Drupal Console settings.
debug:site List all known local and remote sites.
debug:state Show the current State keys.
debug:theme Displays current themes for the application
debug:theme:keys Displays all theme keys provided by hook_theme functions
debug:update Displays current updates available for the application
debug:update:composer Displays current updates available from the composer file
debug:user Displays current users for the application
debug:views Displays current views resources for the application
debug:views:plugins Displays current views plugins for the application

devel

Command Usage
devel:dumper commands.devel.dumper.messages.change-devel-dumper-plugin

docker

Command Usage
docker:init Create a docker-compose.yml file

dotenv

Command Usage
dotenv:init Add support and required config to work with an .env file

entity

Command Usage
entity:delete Delete a specific entity

features

Command Usage
features:import Import module config.

field

Command Usage
field:info View information about fields.

generate

Command Usage
generate:ajax:command Generate & Register a custom ajax command
generate:authentication:provider Generate an Authentication Provider
generate:breakpoint Generate breakpoint
generate:cache:context Generate a cache context
generate:command Generate commands for the console.
generate:composer Generate a composer.json file
generate:controller Generate & Register a controller
generate:entity:bundle Generate a new content type (node / entity bundle)
generate:entity:config Generate a new config entity
generate:entity:content Generate a new content entity
generate:event:subscriber Generate an event subscriber
generate:form Generate a new "FormBase"
generate:form:alter Generate an implementation of hook_form_alter() or hook_form_FORM_ID_alter
generate:form:config Generate a new "ConfigFormBase"
generate:help Generate an implementation of hook_help()
generate:jstest Generate a JavaScript test.
generate:module Generate a module.
generate:module:file Generate a .module file
generate:permissions Generate module permissions
generate:plugin:block Generate a plugin block
generate:plugin:ckeditorbutton Generate CKEditor button plugin.
generate:plugin:condition Generate a plugin condition.
generate:plugin:field Generate field type, widget and formatter plugins.
generate:plugin:fieldformatter Generate field formatter plugin.
generate:plugin:fieldtype Generate field type plugin.
generate:plugin:fieldwidget Generate field widget plugin.
generate:plugin:imageeffect Generate image effect plugin.
generate:plugin:imageformatter Generate image formatter plugin.
generate:plugin:mail Generate a plugin mail
generate:plugin:migrate:dataparser Generate a migrate data parser
generate:plugin:migrate:process Generate a migrate process plugin
generate:plugin:migrate:source Generate a migrate source plugin
generate:plugin:queue Drupal Console Queueworker generator.
generate:plugin:rest:resource Generate plugin rest resource
generate:plugin:rules:action Generate a plugin rule action
generate:plugin:rules:dataprocessor Generate a plugin rule dataprocessor
generate:plugin:skeleton Generate an implementation of a skeleton plugin
generate:plugin:type:annotation Generate a plugin type with annotation discovery
generate:plugin:type:yaml Generate a plugin type with Yaml discovery
generate:plugin:validationconstraint Generate a validation constraint plugin.
generate:plugin:views:field Generate a custom plugin view field.
generate:post:update Generate an implementation of hook_post_update_NAME()
generate:profile Generate a profile.
generate:routesubscriber Generate a RouteSubscriber
generate:service Generate service
generate:site:alias Generates a site alias.
generate:theme Generate a theme.
generate:twig:extension Generate a Twig extension.
generate:update Generate an implementation of hook_update_N()

image

Command Usage
image:styles:flush Execute flush function by image style or execute all flush images styles

locale

Command Usage
locale:language:add Add languages to be supported by your site
locale:language:delete Delete a language to be supported by your site
locale:translation:status List available translation updates

migrate

Command Usage
migrate:execute Execute a migration available for application
migrate:rollback Rollback one or multiple migrations
migrate:setup Load and create the relevant migrations for a provided legacy database

module

Command Usage
module:dependency:install Install dependencies module in the application
module:download Download module or modules in application
module:install Install module or modules in the application
module:path Returns the relative path to the module (or absolute path)
module:uninstall Uninstall module or modules in the application
module:update Update core, module or modules in the application

multisite

Command Usage
multisite:new Sets up the files for a new multisite install.
multisite:update Update the files for a multisite installed.

node

Command Usage
node:access:rebuild Rebuild node access permissions.

queue

Command Usage
queue:run Process the selected queue.

quick

Command Usage
quick:start Download, install and serve a new Drupal project

rest

Command Usage
rest:disable Disable a rest resource for the application
rest:enable Enable a rest resource for the application

role

Command Usage
role:delete Delete roles for the application
role:new Create roles for the application

router

Command Usage
router:rebuild Rebuild routes for the application

settings

Command Usage
settings:set Change a specific setting value in DrupalConsole config file

site

Command Usage
site:import:local Import/Configure an existing local Drupal project
site:install Install a Drupal project
site:maintenance Switch site into maintenance mode
site:mode Switch system performance configuration
site:new Download a new Drupal project
site:statistics Show the current statistics of website.
site:status View current Drupal Installation status

state

Command Usage
state:delete Delete State
state:override Override a State key.

taxonomy

Command Usage
taxonomy:term:delete Delete taxonomy terms from a vocabulary

theme

Command Usage
theme:download Download theme in application
theme:install Install theme or themes in the application
theme:path Returns the relative path to the theme (or absolute path)
theme:uninstall Uninstall theme or themes in the application

update

Command Usage
update:entities Applying Entity Updates
update:execute Execute a specific Update N function in a module, or execute all

user

Command Usage
user:create Create users for the application
user:delete Delete users from the application
user:login:clear:attempts Clear failed login attempts for an account.
user:login:url Returns a one-time user login url.
user:password:hash Generate a hash from a plaintext password.
user:password:reset Reset password for a specific user.
user:role Adds/removes a role for a given user
user:unblock Unblock a specific user.

views

Command Usage
views:disable Disable a View
views:enable Enable a View