Available Commands

CommandUsage
about
Display basic information about Drupal Console project
  • chain
    Chain command execution
  • drupal chain \ --file="/path/to/file/chain-file.yml"
  • 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
  • shell
    Open a shell providing an interactive REPL (Read–Eval–Print-Loop).
  • server
    Runs PHP built-in web server
  • drupal server
    drupal server 127.0.0.1:8089
    drupal --root=/var/www/drupal8.dev server
  • snippet
    Runs PHP code
  • drupal snippet --file=/path/to/file
    drupal snippet --code=codeToExecute
    drupal snippet --show-code --file=/path/to/file
  • cache:rebuild
    Rebuild and clear all site caches.
  • drupal cr all
    drupal cr discovery
  • cache:tag:invalidate
    Invalidate cache tags.
  • drupal cti routes
    drupal cti node:1 node_list
  • config:delete
    Delete configuration
  • drupal config:delete active all
  • config:diff
    Output configuration items that are different in active configuration compared with a directory.
  • drupal config:diff ../config/path
  • config:edit
    Edit the selected configuration.
  • drupal config:edit system.cron
    drupal config:edit system.cron gedit
  • config:export
    Export current application configuration.
  • drupal config:export \ --directory="path/to/export"
    drupal config:export \ --directory="path/to/export" \ --tar \ --remove-uuid \ --remove-config-hash
  • config:export:content:type
    Export a specific content type and their fields.
  • drupal config:export:content:type page \ --module="demo"
    drupal config:export:content:type page \ --module="demo" \ --optional-config \ --remove-uuid \ --remove-config-hash
  • config:export:entity
    Export a specific config entity and their fields.
  • drupal config:export:entity node_type page \ --module="demo"
    drupal config:export:entity node_type page \ --module="demo" \ --optional-config \ --remove-uuid \ --remove-config-hash
  • config:export:single
    Export a single configuration or a list of configurations as yml file(s).
  • drupal config:export:single \ --name=config.settings.name
    drupal config:export:single \ --name=config.settings.name \ --remove-uuid \ --remove-config-hash
  • config:export:view
    Export a view in YAML format inside a provided module to reuse in other website.
  • drupal config:export:view viewid
    drupal config:export:view viewid \ --module="modulename" \ --optional-config \ --include-module-dependencies \ --remove-uuid \ --remove-config-hash
    drupal config:export:view viewid \ --module="modulename" \ --optional-config \ --include-module-dependencies
  • config:import
    Import configuration to current application.
  • drupal config:import \ --file=/path/to/config/file
    drupal config:import \ --directory=/path/to/config/dir
  • config:import:single
    Import a single configurations or a list of configurations.
  • drupal config:import:single \ --file="/path/to/file/block.block.default_block.yml"
    drupal config:import:single \ --file="block.block.default_block.yml" \ --directory="/path/to/directory"
  • config:override
    Override config value in active configuration.
  • drupal config:override contact.settings flood.limit 10
  • config:validate
    Validate a drupal config against its schema
  • drupal config:validate configuration.name
  • create:comments
    Create dummy comments for your Drupal 8 application.
  • drupal create:comments node-id
    drupal create:comments node-id \ --limit="2" \ --title-words="5" \ --time-range="1"
  • create:nodes
    Create dummy nodes for your Drupal 8 application.
  • drupal create:nodes content-name
    drupal create:nodes content-name \ --limit="5" \ --title-words="5" \ --time-range="1" \ --revision \ --language="und"
  • create:roles
    Create dummy roles for your Drupal 8 application.
  • drupal create:roles
    drupal create:roles
  • create:terms
    Create dummy terms for your Drupal 8 application.
  • drupal create:terms vocabulary
    drupal create:terms tags \ --limit="10" \ --name-words="5"
  • create:users
    Create dummy users for your Drupal 8 application.
  • drupal create:users role
    drupal create:users role \ --limit="5" \ --password="usersnewpassword" \ --time-range="1"
  • create:vocabularies
    Create dummy vocabularies for your Drupal 8 application.
  • drupal create:vocabularies \ --limit="5" \ --name-words="5"
  • cron:execute
    Execute cron implementations by module or execute all crons
  • drupal cron:execute
    drupal cron:execute \ <module>
  • cron:release
    Release cron system lock to run cron again
  • drupal cron:execute
  • database:add
    Add a database to settings.php
  • drupal database:add \ --database=DATABASE \ --username=USERNAME \ --password=PASSWORD
  • database:client
    Launch a DB client if it's available
  • drupal database:client <database>
  • database:connect
    Shows DB connection
  • drupal database:connect \ <key> <target>
  • database:drop
    Drop all tables in a given database.
  • drupal database:drop \ <database>
  • database:dump
    Dump structure and contents of a database
  • drupal database:dump \ <database>
    drupal database:dump \ --gz
  • database:log:clear
    Remove events from DBLog table, filters are available
  • drupal database:log:clear \ <database>
    drupal database:log:clear \ <database> \ --type=TYPE \ --severity=SEVERITY
  • database:log:poll
    Poll the watchdog and print new log entries every x seconds
  • drupal database:log:poll \ 100
  • database:query
    Executes a SQL statement directly as argument
  • drupal database:query 'select * from node limit 0,1'
  • database:restore
    Restore structure and contents of a database.
  • drupal database:restore \ --file='/srv/dump/db.sql'
  • debug:breakpoints
    Displays breakpoints available in application
  • drupal debug:breakpoints bartik
  • debug:cache:context
    Displays current cache context for the application.
  • drupal debug:cache:context
  • debug:chain
    List available chain files.
  • debug:config
    List configuration objects names and single configuration object.
  • drupal debug:config
    drupal debug:config system.site
    drupal debug:config | grep system
    drupal debug:config --show-overridden
  • debug:config:settings
    Displays current key:value on settings file.
  • drupal debug:config:settings
  • debug:config:validate
    Validate a schema implementation before a module is installed.
  • drupal debug:config:validate \ /path/to/file \ /path/to/schema-filepath
  • debug:container
    Displays current services for an application.
  • drupal debug:container views.views_data_helper
  • debug:cron
    List of modules implementing a cron
  • drupal debug:cron
  • debug:database:log
    Displays current log events for the application
  • drupal debug:database:log
    drupal debug:database:log 21228
  • debug:database:table
    Show all tables in a given database.
  • drupal debug:database:table
    drupal debug:database:table node
  • debug:dotenv
    Debug Dotenv debug values.
  • debug:entity
    Debug entities available in the system
  • drupal debug:entity
  • debug:event
    Displays current events
  • drupal debug:event
    drupal debug:event kernel.request
  • debug:features
    List registered features.
  • debug:hook
    commands.debug.hook.description
  • debug:image:styles
    List image styles on the site
  • drupal debug:image:styles
  • debug:libraries
    Displays libraries available in application
  • drupal debug:libraries
    drupal debug:libraries block
    drupal debug:libraries block/drupal.block
  • debug:migrate
    Display current migration available for the application
  • drupal debug:migrate
  • debug:module
    Displays current modules available for application
  • drupal mod --status=installed
    drupal mod --status=installed --type=no-core
  • debug:multisite
    List all multi-sites available in system
  • drupal debug:multisite
  • debug:permission
    Displays all user permissions.
  • drupal debug:permission
  • debug:plugin
    Displays all plugin types.
  • drupal debug:plugin
    drupal debug:plugin block
    drupal debug:plugin block broken
  • debug:queue
    Displays the queues of your application
  • drupal debug:queue
  • debug:rest
    Display current rest resource for the application
  • drupal debug:rest
  • debug:roles
    Displays current roles for the application
  • drupal debug:roles
  • debug:router
    Displays current routes for the application or information for a particular route
  • drupal rod
    drupal rod user.page
    drupal debug:router
    drupal debug:router user.login
    drupal debug:router --pattern=/user/login
  • debug:settings
    List user Drupal Console settings.
  • drupal debug:settings
  • debug:site
    List all known local and remote sites.
  • drupal debug:site
  • debug:state
    Show the current State keys.
  • drupal debug:state
    drupal debug:state install_task
  • debug:theme
    Displays current themes for the application
  • drupal debug:theme
    drupal debug:theme bartik
  • debug:theme:keys
    Displays all theme keys provided by hook_theme functions
  • debug:update
    Displays current updates available for the application
  • drupal debug:update
  • debug:update:composer
    Displays current updates available from the composer file
  • drupal debug:update:composer
  • debug:user
    Displays current users for the application
  • drupal debug:user
  • debug:views
    Displays current views resources for the application
  • drupal debug:views
  • debug:views:plugins
    Displays current views plugins for the application
  • drupal debug:views:plugins
  • devel:dumper
    commands.devel.dumper.messages.change-devel-dumper-plugin
  • docker:init
    Create a docker-compose.yml file
  • dotenv:init
    Add support and required config to work with an .env file
  • entity:delete
    Delete an specific entity
  • drupal entity:delete node 1
  • features:import
    Import module config.
  • field:info
    View information about fields.
  • generate:ajax:command
    Generate & Register a custom ajax command
  • generate:authentication:provider
    Generate an Authentication Provider
  • drupal generate:authentication:provider \ --module="modulename" \ --class="DefaultAuthenticationProvider" \ --provider-id="default_authentication_provider"
  • generate:breakpoint
    Generate breakpoint
  • drupal generate:breakpoint \ --theme="classy" \ --breakpoints='"breakpoint_name":"narrow", "breakpoint_label":"narrow", "breakpoint_media_query":"all and (min-width: 560px) and (max-width: 850px)", "breakpoint_weight":"1", "breakpoint_multipliers":"1x"'
  • generate:cache:context
    Generate a cache context
  • drupal generate:cache:context \ --module="modulename" \ --cache-context="ContextName" \ --class="DefaultCacheContext"
  • generate:command
    Generate commands for the console.
  • drupal generate:command \ --extension="ExtensionName" \ --extension-type="module" \ --class="DefaultCommand" \ --name="CommandName"
  • generate:composer
    Generate a composer.json file
  • drupal generate:composer \ --module="module_name" \ --name="drupal/module_name" \ --type="drupal-module" \ --description="Package description" \ --keywords='Drupal' --keywords='logging' \ --license="GPL-2.0+" \ --homepage="https://www.drupal.org/project/module_name" \ --minimum-stability="stable" \ --authors='"name":"Author name", "email":"author@email.com", "homepage":"http://website.com", "role":"Developer"' \ --support='"channel":"email", "url":"author@email.com"' \ --support='"channel":"source", "url":"http://github.com"' \ --required='"name":"drupal/views", "version":"^1.0"' \ --required='"name":"drupal/token", "version":"^2.0"'
  • generate:controller
    Generate & Register a controller
  • drupal generate:controller \ --module="modulename" \ --class="DefaultController" \ --routes='"title":"ControllerMethod", "name":"modulename.default_controller_hello", "method":"hello", "path":"/modulename/hello/{name}"' \ --test
  • generate:entity:bundle
    Generate a new content type (node / entity bundle)
  • drupal generate:entity:bundle \ --module="modulename" \ --bundle-name="default" \ --bundle-title="default"
  • generate:entity:config
    Generate a new config entity
  • drupal generate:entity:config \ --module="modulename" \ --entity-class="DefaultEntity" \ --entity-name="default_entity" \ --base-path="/admin/structure" \ --label="Default entity"
  • generate:entity:content
    Generate a new content entity
  • drupal generate:entity:content \ --module="modulename" \ --entity-class="DefaultEntity" \ --entity-name="default_entity" \ --base-path="/admin/structure" \ --label="Default entity"
    drupal generate:entity:content \ --module="modulename" \ --entity-class="DefaultEntity" \ --entity-name="default_entity" \ --base-path="/admin/structure" \ --label="Default entity" \ --is-translatable \ --revisionable --has-forms
  • generate:event:subscriber
    Generate an event subscriber
  • drupal generate:event:subscriber \ --module="modulename" \ --name="modulename.default" \ --class="DefaultSubscriber" \ --events='kernel_request'
  • generate:form
    Generate a new "FormBase"
  • drupal generate:form \ --module="modulename" \ --class="DefaultForm" \ --form-id="default_form" \ --config-file \ --path="/modulename/form/default"
    drupal generate:form \ --module="modulename" \ --class="DefaultForm" \ --form-id="default_form" \ --config-file \ --inputs='"name":"inputname", "type":"text_format", "label":"InputName", "options":"", "description":"Just a text input", "maxlength":"", "size":"", "default_value":"", "weight":"0", "fieldset":""' \ --inputs='"name":"email", "type":"email", "label":"Email", "options":"", "description":"Just an email input", "maxlength":"", "size":"", "default_value":"", "weight":"0", "fieldset":""' \ --path="/modulename/form/default"
  • generate:form:alter
    Generate an implementation of hook_form_alter() or hook_form_FORM_ID_alter
  • drupal generate:form:alter \ --module="modulename"
    drupal generate:form:alter \ --module="modulename" \ --inputs='"name":"inputtext", "type":"text_format", "label":"InputText", "options":"", "description":"Just an input text", "maxlength":"", "size":"", "default_value":"", "weight":"0", "fieldset":""' \ --inputs='"name":"email", "type":"email", "label":"Email", "options":"", "description":"Just an email input", "maxlength":"", "size":"", "default_value":"", "weight":"0", "fieldset":""'
  • generate:form:config
    Generate a new "ConfigFormBase"
  • drupal generate:form:config \ --module="modulename" \ --class="DefaultForm" \ --form-id="default_form" \ --config-file \ --path="/modulename/form/default"
    drupal generate:form:config \ --module="modulename" \ --class="DefaultForm" \ --form-id="default_form" \ --config-file \ --inputs='"name":"inputname", "type":"text_format", "label":"InputName", "options":"", "description":"Just a text input", "maxlength":"", "size":"", "default_value":"", "weight":"0", "fieldset":""' \ --inputs='"name":"email", "type":"email", "label":"Email", "options":"", "description":"Just an email input", "maxlength":"", "size":"", "default_value":"", "weight":"0", "fieldset":""' \ --path="/modulename/form/default"
  • generate:help
    Generate an implementation of hook_help()
  • drupal generate:help \ --module="modulename" \ --description="My Awesome Module"
  • generate:jstest
    Generate a JavaScript test.
  • drupal generate:module \ --module="modulename" \ --machine-name="modulename" \ --module-path="/modules/custom" \ --description="My Awesome Module" \ --core="8.x" \ --package="Custom" \ --module-file \ --composer \ --test \ --twigtemplate
  • generate:module
    Generate a module.
  • drupal generate:module \ --module="modulename" \ --machine-name="modulename" \ --module-path="/modules/custom" \ --description="My Awesome Module" \ --core="8.x" \ --package="Custom" \ --module-file \ --composer \ --test \ --twigtemplate
  • generate:module:file
    Generate a .module file
  • drupal generate:module:file \ --module="modulename"
  • generate:permissions
    Generate module permissions
  • generate:plugin:block
    Generate a plugin block
  • drupal generate:plugin:block \ --module="modulename" \ --class="DefaultBlock" \ --label="Default block" \ --plugin-id="default_block" \ --theme-region="header" \ --inputs='"name":"inputtext", "type":"text_format", "label":"InputText", "options":"", "description":"Just an input text", "maxlength":"", "size":"", "default_value":"", "weight":"0", "fieldset":""'
  • generate:plugin:ckeditorbutton
    Generate CKEditor button plugin.
  • drupal generate:plugin:ckeditorbutton \ --module="modulename" \ --class="DefaultCKEditorButton" \ --label="Default ckeditor button" \ --plugin-id="default_ckeditor_button" \ --buttons='name":"Default ckeditor button", "label":"Default ckeditor button", "icon":"modules/custom/modulename/js/plugins/default_ckeditor_button/images/icon.png"' \ --buttons='name":"My ckeditor button", "label":"My ckeditor button", "icon":"modules/custom/modulename/js/plugins/my_ckeditor_button/images/icon.png"' \ --no-interaction drupal generate:plugin:ckeditorbutton \ --module="modulename" \ --class="DefaultCKEditorButton" \ --label="Default ckeditor button" \ --plugin-id="default ckeditor button" \ --button-name="Default ckeditor button" \ --button-icon-path="modules/custom/modulename/js/plugins/default ckeditor button/images/icon.png"
  • generate:plugin:condition
    Generate a plugin condition.
  • drupal generate:plugin:condition \ --module="modulename" \ --class="ExampleCondition" \ --label="Example condition" \ --plugin-id="example_condition" \ --context-definition-id="entity:node" \ --context-definition-label="node" \ --context-definition-required
    drupal generate:plugin:condition \ --module="modulename" \ --class="ExampleCondition" \ --label="Example condition" \ --plugin-id="example_condition" \ --context-definition-id="language" \ --context-definition-label="Language" \ --context-definition-required
    drupal generate:plugin:condition \ --module="modulename" \ --class="ExampleCondition" \ --label="Example condition" \ --plugin-id="example_condition" \ --context-definition-id="entity:user_role" \ --context-definition-label="user_role" \ --context-definition-required
  • generate:plugin:field
    Generate field type, widget and formatter plugins.
  • drupal generate:plugin:field \ --module="modulename" \ --type-class="ExampleFieldType" \ --type-label="Example field type" \ --type-plugin-id="example_field_type" \ --type-description="My Field Type" \ --formatter-class="ExampleFormatterType" \ --formatter-label="Example formatter type" \ --formatter-plugin-id="example_formatter_type" \ --widget-class="ExampleWidgetType" \ --widget-label="Example widget type" \ --widget-plugin-id="example_widget_type" \ --field-type="example_field_type" \ --default-widget="example_widget_type" \ --default-formatter="example_formatter_type"
  • generate:plugin:fieldformatter
    Generate field formatter plugin.
  • drupal generate:plugin:fieldformatter \ --module="modulename" \ --class="ExampleFieldFormatter" \ --label="Example field formatter" \ --plugin-id="example_field_formatter" \ --field-type="text"
  • generate:plugin:fieldtype
    Generate field type plugin.
  • drupal generate:plugin:fieldtype \ --module="modulename" \ --class="ExampleFieldType" \ --label="Example field type" \ --plugin-id="example_field_type" \ --description="My Field Type"
    drupal generate:plugin:fieldtype \ --module="modulename" \ --class="ExampleFieldType" \ --label="Example field type" \ --plugin-id="example_field_type" \ --description="My Field Type" \ --default-widget="DefaultWidget" \ --default-formatter="DefaultFormatter"
  • generate:plugin:fieldwidget
    Generate field widget plugin.
  • drupal generate:plugin:fieldwidget \ --module="modulename" \ --class="ExampleFieldWidget" \ --label="Example field widget" \ --plugin-id="example_field_widget" \ --field-type="text"
  • generate:plugin:imageeffect
    Generate image effect plugin.
  • drupal generate:plugin:imageeffect \ --module="modulename" \ --class="DefaultImageEffect" \ --label="Default image effect" \ --plugin-id="default_image_effect" \ --description="My Image Effect"
  • generate:plugin:imageformatter
    Generate image formatter plugin.
  • drupal generate:plugin:imageformatter \ --module="modulename" \ --class="ExampleImageFormatter" \ --label="Example image formatter" \ --plugin-id="example_image_formatter"
  • generate:plugin:mail
    Generate a plugin mail
  • drupal generate:plugin:mail \ --module="modulename" \ --class="HtmlFormatterMail" \ --label="Html formatter mail" \ --plugin-id="html_formatter_mail"
  • generate:plugin:migrate:dataparser
    Generate a migrate data parser
  • drupal generate:plugin:migrate:source \ --module="modulename" \ --class="PluginClassName" \ --plugin-id="plugin_class_name" \ --plugin-title="Data parser"
  • generate:plugin:migrate:process
    Generate a migrate process plugin
  • drupal generate:plugin:migrate:process \ --module="modulename" \ --class="MigrationProcess" \ --plugin-id="migrationprocess"
  • generate:plugin:migrate:source
    Generate a migrate source plugin
  • drupal generate:plugin:migrate:source \ --module="modulename" \ --class="PluginClassName" \ --plugin-id="plugin_class_name" \ --table="DefaultTableName" \ --alias="D"
    drupal generate:plugin:migrate:source \ --module="modulename" \ --class="DefaultPluginClass" \ --plugin-id="default_plugin_class" \ --table="users" \ --alias="u" \ --fields='"id":"id", "description":"the user id"' \ --fields='"id":"username", "description":"the username"' \ --fields='"id":"password", "description":"the user password"' \ --fields='"id":"email", "description":"the user email"'
  • generate:plugin:queue
    Drupal Console Queueworker generator.
  • drupal generate:plugin:queue \ --module="modulename" \ --class="PluginClassName" \ --plugin-id="plugin_class_name" \ --cron-time="30" \ --label="Example QueueWorker"
  • generate:plugin:rest:resource
    Generate plugin rest resource
  • drupal generate:plugin:rest:resource \ --module="modulename" \ --class="DefaultRestResource" \ --plugin-id="default_rest_resource" \ --plugin-label="Default rest resource" \ --plugin-url="http://rest.resources.example.com" \ --plugin-states='GET'
  • generate:plugin:rules:action
    Generate a plugin rule action
  • drupal generate:plugin:rules:action \ --module="modulename" \ --class="DefaultAction" \ --label="Default Action" \ --plugin-id="default_action" \ --category="Action category" \ --context='"name":"user", "type":"entity:user", "label":"Context label", "description":"Context description"'
    drupal generate:plugin:rules:action \ --module="modulename" \ --class="DefaultAction" \ --label="Default Action" \ --plugin-id="default_action" \ --category="Action category" \ --context='"entity":"node", "type":"entity", "label":"Context label", "description":"Context description"'
  • generate:plugin:rules:dataprocessor
    Generate a plugin rule dataprocessor
  • drupal generate:plugin:rules:dataprocessor \ --module="modulename" \ --class="DefaultDataprocessor" \ --label="Default dataprocessor" \ --plugin-id="default_dataprocessor" \
  • generate:plugin:skeleton
    Generate an implementation of a skeleton plugin
  • drupal generate:plugin:skeleton \ --module="modulename" \ --plugin-id="link_relation_type" \ --class="DefaultLinkRelationType"
  • generate:plugin:type:annotation
    Generate a plugin type with annotation discovery
  • drupal generate:plugin:type:annotation \ --module="modulename" \ --class="ExamplePlugin" \ --machine-name="example_plugin" \ --label="Example plugin"
  • generate:plugin:type:yaml
    Generate a plugin type with Yaml discovery
  • drupal generate:plugin:type:yaml \ --module="modulename" \ --class="ExamplePlugin" \ --plugin-name="example_plugin" \ --plugin-file-name="example.plugin"
  • generate:plugin:validationconstraint
    Generate a validation constraint plugin.
  • drupal generate:plugin:validationconstraint \ --module="modulename" \ --class="ExampleConstraint" \ --label="Example validation constraint" \ -plugin-id="example_validation_constraint" \ --hook \ --field-id="field_exmaple_id" \ --bundle="entity_example_bundle" \ --no-interaction
  • generate:plugin:views:field
    Generate a custom plugin view field.
  • drupal generate:plugin:views:field \ --module="modulename" \ --class="CustomViewsField" \ --title="Custom views field" \ --description="My awesome custom views field plugin."
  • generate:post:update
    Generate an implementation of hook_post_update_NAME()
  • drupal generate:post:update \ --module="modulename" \ --post-update-name="PostUpdateName"
  • generate:profile
    Generate a profile.
  • drupal generate:profile \ --profile="NewProfileName" \ --machine-name="newprofilename" \ --description="My Useful Profile" \ --core="8.x" \ --dependencies="modulename"
  • generate:routesubscriber
    Generate a RouteSubscriber
  • drupal generate:routesubscriber \ --module="modulename" \ --name="modulename.route_subscriber" \ --class="RouteSubscriber"
  • generate:service
    Generate service
  • drupal generate:service \ --module="modulename" \ --name="modulename.default" \ --class="DefaultService" \ --path-service="/modules/custom/modulename/src/"
    drupal generate:service \ --module="modulename" \ --name="modulename.default" \ --class="DefaultService" \ --interface \ --interface-name="InterfaceName" \ --path-service="/modules/custom/modulename/src/"
  • generate:site:alias
    Generates a site alias.
  • drupal generate:site:alias \ --name="demo" \ --environment="dev" \ --type="ssh" \ --composer-root="/path/to/remote/project" \ --site-uri="default" \ --host="hostName/domain" \ --user="userName" \ --port="port" \ --drupal-console-binary="drupal" \ --extra-options="-tt" \ --directory="/Users/hjuarez/drupalSq/console/"
  • generate:theme
    Generate a theme.
  • drupal generate:theme \ --theme="AnotherTheme" \ --machine-name="anothertheme" \ --theme-path="themes/custom" \ --description="My Awesome theme" \ --core="8.x" \ --package="PackageName" \ --global-library="global-styling" \ --base-theme="false"
    drupal generate:theme \ --theme="MyTheme" \ --machine-name="mytheme" \ --theme-path="themes/custom" \ --description="My Awesome theme" \ --core="8.x" \ --package="MyThemePackage" \ --global-library="global-styling" \ --base-theme="stable" \ --regions='"region_name":"Content", "region_machine_name":"content"' \ --regions='"region_name":"Panel", "region_machine_name":"panel"' \ --breakpoints='"breakpoint_name":"narrow", "breakpoint_label":"narrow", "breakpoint_media_query":"all and (min-width: 560px) and (max-width: 850px)", "breakpoint_weight":"1", "breakpoint_multipliers":"1x"'
  • generate:twig:extension
    Generate a Twig extension.
  • drupal generate:twig:extension \ --module="modulename" \ --name="modulename.twig.extension" \ --class="DefaultTwigExtension"
  • generate:update
    Generate an implementation of hook_update_N()
  • drupal generate:update \ --module="modulename" \ --update-n="8001"
  • image:styles:flush
    Execute flush function by image style or execute all flush images styles
  • drupal image:styles:flush large
    drupal image:styles:flush thumbnail
  • 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
    Install dependencies module in the application
  • drupal module:dependency:install modulename
  • module:download
    Download module or modules in application
  • drupal module:download modulename \ --path="modules/contrib"
  • module:install
    Install module or modules in the application
  • drupal module:install modulename
  • module:path
    Returns the relative path to the module (or absolute path)
  • drupal module:path modulename
  • module:uninstall
    Uninstall module or modules in the application
  • drupal module:uninstall modulename
  • module:update
    Update core, module or modules in the application
  • drupal module:update modulename \ --composer
  • multisite:new
    Sets up the files for a new multisite install.
  • drupal multisite:new newsite http://newsite.com
  • multisite:update
    Update the files for a multisite installed.
  • drupal multisite:update
  • node:access:rebuild
    Rebuild node access permissions.
  • drupal node:access:rebuild --batch
  • 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
  • role:delete
    Delete roles for the application
  • drupal role:delete moderator
  • role:new
    Create roles for the application
  • drupal role:new moderator moderator
  • router:rebuild
    Rebuild routes for the application
  • drupal router:rebuild
  • settings:set
    Change a specific setting value in DrupalConsole config file
  • drupal settings:set application.language es
  • site:import:local
    Import/Configure an existing local Drupal project
  • drupal site:import:local SiteName /private/var/www/vhost/anexusit/drupal8.dev/web
  • site:install
    Install a Drupal project
  • drupal site:install standard \ --langcode="en" \ --db-type="mysql" \ --db-host="127.0.0.1" \ --db-name="drupal8" \ --db-user="u53rn4m3" \ --db-pass="dbp455" \ --db-port="3306" \ --site-name="Drupal 8" \ --site-mail="admin@example.com" \ --account-name="admin" \ --account-mail="admin@example.com" \ --account-pass="p455w0rd"
    drupal site:install standard mysql://dbUser:dbPass@dbHost/dbName \ --langcode="en" \ --site-name="Drupal 8" \ --site-mail="admin@example.com" \ --account-name="admin" \ --account-mail="admin@example.com" \ --account-pass="p455w0rd"
  • site:maintenance
    Switch site into maintenance mode
  • drupal site:maintenance on
    drupal site:maintenance off
  • site:mode
    Switch system performance configuration
  • drupal site:mode prod
    drupal site:mode dev
  • site:new
    Download a new Drupal project
  • site:statistics
    Show the current statistics of website.
  • site:status
    View current Drupal Installation status
  • drupal site:status \ --format="table"
  • state:delete
    Delete State
  • drupal state:delete comment.maintain_entity_statistics
  • state:override
    Override a State key.
  • drupal state:override comment.node_comment_statistics_scale "!!float 1"
  • taxonomy:term:delete
    Delete taxonomy terms from a vocabulary
  • drupal taxonomy:term:delete tags
  • theme:download
    Download theme in application
  • drupal theme:download Alina 7.x-1.2
  • theme:install
    Install theme or themes in the application
  • drupal theme:install mytheme
  • theme:path
    Returns the relative path to the theme (or absolute path)
  • drupal theme:path mytheme
  • theme:uninstall
    Uninstall theme or themes in the application
  • drupal theme:uninstall mytheme
  • update:entities
    Applying Entity Updates
  • drupal update:entities
  • update:execute
    Execute a specific Update N function in a module, or execute all
  • drupal update:execute
    drupal update:execute system
  • user:create
    Create users for the application
  • drupal user:create john p455w0rd \ --roles='authenticated' \ --email="john@anexusit.com" \ --status="1"
    drupal user:create doe p455w0rd \ --roles='administrator' \ --email="doe@anexusit.com" \ --status="1"
  • user:delete
    Delete users for the application
  • drupal user:delete \ --user="2"
    drupal user:delete \ --user="jmolivas"
    drupal user:delete \ --role="authenticated"
  • user:login:clear:attempts
    Clear failed login attempts for an account.
  • user:login:url
    Returns a one-time user login url.
  • drupal user:login:url 10
    drupal user:login:url jmolivas
  • user:password:hash
    Generate a hash from a plaintext password.
  • drupal user:password:hash p455w0rd
  • user:password:reset
    Reset password for a specific user.
  • drupal user:password:reset 2 p455w0rd
    drupal user:password:reset jmolivas p455w0rd
  • user:role
    Adds/removes a role for a given user
  • drupal user:role add admin administrator
    drupal user:role remove admin administrator
  • user:unblock
    Unblock a specific user.
  • drupal user:unblock 2
    drupal user:unblock johndoe
  • views:disable
    Disable a View
  • drupal views:disable content
    drupal views:disable frontpage
  • views:enable
    Enable a View
  • drupal views:enable content
    drupal views:enable frontpage