Available Drupal Console Commands

Note: Drupal Console commands must be run from the root of a Drupal 8 installation.

Drupal Console Command Details
about Displays basic information about Drupal Console project
chain Chain command execution
check System requirement checker
exec Execute an external command.
help Displays help for a command
init Copy configuration files.
list Lists all available commands
shell Open a shell providing an interactive REPL (Read–Eval–Print-Loop).
server Runs PHP built-in web server
cache:rebuild Rebuild and clear all site caches.
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: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 other 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:comments Create dummy comments for your Drupal 8 application.
create:nodes Create dummy nodes 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:execute Execute cron implementations by module or execute all crons
cron:release Release cron system lock to run cron again
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: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:entity Debug entities available in the system
debug:event Displays current events
debug:features List registered features.
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 multisites 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: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:test List Test Units available for the application.
debug:theme Displays current themes for the application
debug:update Displays current updates available for the application
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:dumper Change the devel dumper plugin
develop:gitbook Update gitbook
dotenv:debug Debug Dotenv debug values.
dotenv:init Dotenv initializer.
entity:delete Delete an specific entity
extend:example:one Drupal Console extend example
extend:example:two Drupal Console extend example
features:import Import module config.
field:info View information about fields.
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:controller Generate & Register a controller
generate:doc:cheatsheet commands.generate.doc.cheatsheet.description
generate:doc:dash commands.generate.doc.dash.description
generate:doc:data commands.generate.doc.data.description
generate:doc:gitbook commands.generate.doc.gitbook.description
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 "%s"
generate:form:alter Generate an implementation of hook_form_alter() or hook_form_FORM_ID_alter
generate:form:config commands.generate.form.description
generate:help Generate an implementation of hook_help()
generate:module Generate a module.
generate:module:file Generate a .module file
generate:permissions commands.generate.permission.description
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:process Generate a migrate process plugin
generate:plugin:migrate:source Generate a migrate source plugin
generate:plugin:rest:resource Generate plugin rest resource
generate:plugin:rulesaction Generate a plugin rule action
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:views:field Generate a custom plugin view field.
generate:post:update commands.generate.post:update.description
generate:profile Generate a profile.
generate:routesubscriber Generate a RouteSubscriber
generate:service Generate service
generate:theme Generate a theme.
generate:twig:extension Generate a Twig extension.
generate:update Generate an implementation of hook_update_N()
image:styles:flush Execute flush function by image style or execute all flush images styles
locale:language:add Add a language 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: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:dependency:install commands.module.install.dependencies.description
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:new Sets up the files for a new multisite install.
node:access:rebuild Rebuild node access permissions.
queue:run Process the selected queue.
quick:start Download, install and serve a new Drupal project
rest:disable Disable a rest resource for the application
rest:enable Enable a rest resource for the application
router:rebuild Rebuild routes for the application
sample:default commands.sample.default.description
settings:set Change a specific setting value in DrupalConsole config file
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:delete Delete State
state:override Override a State key.
taxonomy:term:delete Delete taxonomy terms from a vocabulary
test:run Run Test unit from tests available for application
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
translation:cleanup commands.translation.cleanup.description
translation:pending commands.translation.pending.description
translation:stats commands.translation.stats.description
translation:sync commands.translation.sync.description
update:entities Applying Entity Updates
update:execute Execute a specific Update N function in a module, or execute all
user:create Create users for the application
user:delete Delete users for 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
views:disable Disable a View
views:enable Enable a View

Available options

Option Details
--help Display this help message
--quiet Suppress all output from the command
--verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output, and 3 for debug
--version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
--no-interaction Do not ask any interactive question
--env The Environment name
--root Define the Drupal root to be used in command execution
--debug application.options.debug
--learning Generate a verbose code output
--generate-chain Shows command options and arguments as yaml output to be used in chain command
--generate-inline Shows command options and arguments as inline command
--generate-doc Shows command options and arguments as markdown
--target Site name you want to interact with (for local or remote sites)
--uri URI of the Drupal site to use (for multi-site environments or when running on an alternate port)
--yes Skip confirmation and proceed

Available arguments

Argument Details
command The command to execute