Drupal Console Cheat sheet

Drupalconsole

Drupal Console version 1.0.0-rc25

=============================

Usage:
  command [options] [arguments]

Options:
  -h, --help             Display this help message
  -q, --quiet            Do not output any message
  -V, --version          Display this application version
      --ansi             Force ANSI output
      --no-ansi          Disable ANSI output
  -n, --no-interaction   Do not ask any interactive question
  -e, --env[=ENV]        The Environment name [default: "prod"]
      --root[=ROOT]      Define the Drupal root to be used in command execution
      --debug            application.options.debug
      --learning         Generate a verbose code output
  -c, --generate-chain   Shows command options and arguments as yaml output to be used in chain command
  -i, --generate-inline  Shows command options and arguments as inline command
  -d, --generate-doc     Shows command options and arguments as markdown
  -t, --target[=TARGET]  Site name you want to interact with (for local or remote sites)
  -l, --uri=URI          URI of the Drupal site to use (for multi-site environments or when running on an alternate port)
  -y, --yes              Skip confirmation and proceed
  -v|vv|vvv, --verbose   Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Available commands:
  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
  server                                  Runs PHP built-in web server
  shell                                   Open a shell providing an interactive REPL (Read–Eval–Print-Loop).
  
 cache
 -----
  cache:rebuild (cr)                      Rebuild and clear all site caches.
 
 config
 -----
  config:delete (cd)                      Delete configuration
  config:diff (cdi)                       Output configuration items that are different in active configuration compared with a directory.
  config:edit (ced,cdit)                  Change a configuration object with a text editor.
  config:export (ce)                      Export current application configuration.
  config:export:content:type (cect)       Export a specific content type and their fields.
  config:export:single (ces)              Export a single configuration or a list of configurations as yml file(s).
  config:export:view (cev)                Export a view in YAML format inside a provided module to reuse in other website.
  config:import (ci)                      Import configuration to current application.
  config:import:single (cis)              Import a single configuration or a list of configurations.
  config:override (co)                    Override config value in active configuration.
  config:validate (cv)                    Validate a drupal config against its schema
  
 create
 ------
  create:comments (crc)                   Create dummy comments for your Drupal 8 application.
  create:nodes (crn)                      Create dummy nodes for your Drupal 8 application.
  create:terms (crt)                      Create dummy terms for your Drupal 8 application.
  create:users (cru)                      Create dummy users for your Drupal 8 application.
  create:vocabularies (crv)               Create dummy vocabularies for your Drupal 8 application.
 
 cron
 ------
  cron:execute (croe,cre)                 Execute cron implementations by module or execute all crons
  cron:release (cror,crr)                 Release cron system lock to run cron again
 database
  database:add (dba)                      Add a database to settings.php
  database:client (dbc)                   Launch a DB client if it's available
  database:connect (dbco)                 Shows DB connection
  database:drop (dbd)                     Drop all tables in a given database.
  database:dump (dbdu)                    Dump structure and contents of a database
  database:log:clear (dblc,dbc)           Remove events from DBLog table, filters are available
  database:log:poll (dblp)                Poll the watchdog and print new log entries every x seconds
  database:query (dbq)                    Executes a SQL statement directly as argument
  database:restore (dbr)                  Restore structure and contents of a database.
 
 debug
 ------
  debug:breakpoints (dbre)                Displays breakpoints available in application
  debug:cache:context (dcc)               Displays current cache context for the application.
  debug:chain (dch)                       List available chain files.
  debug:config (dc)                       List configuration objects names and single configuration object.
  debug:config:settings (dcs)             Displays current key:value on settings file.
  debug:config:validate (dcv)             Validate a schema implementation before a module is installed.
  debug:container (dco,cod)               Displays current services for an application.
  debug:cron (dcr)                        List of modules implementing a cron
  debug:database:log (dbb)                Displays current log events for the application
  debug:database:table (ddt)              Show all tables in a given database.
  debug:entity (de)                       Debug entities available in the system
  debug:event (dev)                       Displays current events 
  debug:image:styles (dis)                List image styles on the site
  debug:libraries (dl)                    Displays libraries available in application
  debug:migrate (mid)                     Display current migration available for the application
  debug:module (dm,mod)                   Displays current modules available for application
  debug:multisite (dmu,msd)               List all multisites available in system
  debug:permission (dp)                   Displays all user permissions.
  debug:plugin (dpl)                      Displays all plugin types.
  debug:queue (dq)                        Displays the queues of your application
  debug:rest (rede)                       Display current rest resource for the application
  debug:router (dr,rod)                   Displays current routes for the application or information for a particular route
  debug:settings (dse)                    List user Drupal Console settings.
  debug:site (dsi)                        List all known local and remote sites.
  debug:state (dst)                       Show the current State keys.
  debug:theme (dt,tde)                    Displays current themes for the application
  debug:update (du,upd)                   Displays current updates available for the application
  debug:user (dus)                        Displays current users for the application
  debug:views (vde)                       Displays current views resources for the application
  debug:views:plugins (dvp)               Displays current views plugins for the application
 
 devel
 ------
  devel:dumper (dd)                       Change the devel dumper plugin
 
 develop
 ------
  develop:contribute                      Download Drupal + Drupal Console to contribute.
 
 dotenv
 ------
  dotenv:debug                            Debug Dotenv debug values.
  dotenv:init                             Dotenv initializer.
 
 entity
 ------ 
  entity:delete (ed)                      Delete an specific entity
 
 field
 ------
  field:info (fii)                        View information about fields.
 
 generate
 -------
  generate:authentication:provider (gap)  Generate an Authentication Provider
  generate:breakpoint (gb)                Generate breakpoint
  generate:cache:context (gcc)            Generate a cache context
  generate:command (gco)                  Generate commands for the console.
  generate:controller (gcon)              Generate & Register a controller
  generate:entity:bundle (geb)            Generate a new content type (node / entity bundle)
  generate:entity:config (gec)            Generate a new config entity
  generate:entity:content (geco)          Generate a new content entity
  generate:event:subscriber (ges)         Generate an event subscriber
  generate:form (gf)                      Generate a new "%s"
  generate:form:alter (gfa)               Generate an implementation of hook_form_alter() or hook_form_FORM_ID_alter
  generate:form:config (gf)               commands.generate.form.description
  generate:help (gh)                      Generate an implementation of hook_help()
  generate:module (gm)                    Generate a module.
  generate:module:file (gmf)              Generate a .module file
  generate:permissions (gp)               commands.generate.permission.description
  generate:plugin:block (gpb)             Generate a plugin block
  generate:plugin:ckeditorbutton (gpc)    Generate CKEditor button plugin.
  generate:plugin:condition (gpco)        Generate a plugin condition.
  generate:plugin:field (gpf)             Generate field type, widget and formatter plugins.
  generate:plugin:fieldformatter (gpff)   Generate field formatter plugin.
  generate:plugin:fieldtype (gpft)        Generate field type plugin.
  generate:plugin:fieldwidget (gpfw)      Generate field widget plugin.
  generate:plugin:imageeffect (gpie)      Generate image effect plugin.
  generate:plugin:imageformatter (gpif)   Generate image formatter plugin.
  generate:plugin:mail (gpm)              Generate a plugin mail
  generate:plugin:migrate:process (gpmp)  Generate a migrate process plugin
  generate:plugin:migrate:source (gpms)    Generate a migrate source plugin
  generate:plugin:rest:resource (gprr)         Generate plugin rest resource
  generate:plugin:rulesaction (gpra)            Generate a plugin rule action
  generate:plugin:skeleton (gps)                 Generate an implementation of a skeleton plugin
  generate:plugin:type:annotation (gpta)     Generate a plugin type with annotation discovery
  generate:plugin:type:yaml (gpty)              Generate a plugin type with Yaml discovery
  generate:plugin:views:field (gpvf)             Generate a custom plugin view field.
  generate:post:update (gpu)                      commands.generate.post:update.description
  generate:profile (gpr)                                Generate a profile.
  generate:routesubscriber (gr)                  Generate a RouteSubscriber
  generate:service (gs)                               Generate service
  generate:theme (gt)                                 Generate a theme.
  generate:twig:extension (gte)                  Generate a Twig extension.
  generate:update (gu)                              Generate an implementation of hook_update_N()
 
 image
 ------
  image:styles:flush (isf)                Execute flush function by image style or execute all flush images styles
  
 migrate
 -------
  migrate:execute (mie)                   Execute a migration available for application
  migrate:rollback (mir)                  Rollback one or multiple migrations
  migrate:setup (mis)                     Load and create the relevant migrations for a provided legacy database
 
 module
 --------
  module:dependency:install (modi)        commands.module.install.dependencies.description
  module:download (mod)                   Download module or modules in application
  module:install (moi)                    Install module or modules in the application
  module:path (mop)                       Returns the relative path to the module (or absolute path)
  module:uninstall (mou)                  Uninstall module or modules in the application
  module:update (moup)                    Update core, module or modules in the application
  
 multisite
 --------
  multisite:new (mun,sn)                  Sets up the files for a new multisite install.
 
 node
 -------
  node:access:rebuild (nar)               Rebuild node access permissions.
 
 queue
 ------
  queue:run (qr)                          Process the selected queue.
 
 quick
 ------
  quick:start                             Download, install and serve a new Drupal project
 
 rest
 ------
  rest:disable (red)                      Disable a rest resource for the application
  rest:enable (ree)                       Enable a rest resource for the application
 
 router
 ------
  router:rebuild (rr,ror)                 Rebuild routes for the application
 
 settings
 ------
  settings:set                            Change a specific setting value in DrupalConsole config file
 
 site
 ------
  site:import:local (sil)                 Import/Configure an existing local Drupal project
  site:install (si)                       Install a Drupal project
  site:maintenance (sma)                  Switch site into maintenance mode
  site:mode (smo)                         Switch system performance configuration
  site:new                                Download a new Drupal project
  site:statistics (sst)                   Show the current statistics of website.
  site:status (ss)                        View current Drupal Installation status
 
 state
 ------
  state:delete (std)                      Delete State
  state:override (sto)                    Override a State key.
 
 taxonomy
 -----
  taxonomy:term:delete (ttd)              Delete taxonomy terms from a vocabulary
 
 theme
 -----
  theme:download (thd)                    Download theme in application
  theme:install (thi)                     Install theme or themes in the application
  theme:path (thp)                        Returns the relative path to the theme (or absolute path)
  theme:uninstall (thu)                   Uninstall theme or themes in the application
 
 update
 ------
  update:command:data                     Update gitbook
  update:entities (upe)                   Applying Entity Updates
  update:execute (upex)                   Execute a specific Update N function in a module, or execute all
  update:gitbook                          Update gitbook
 
 user
 -------
  user:create (uc)                        Create users for the application
  user:delete (ud)                        Delete users for the application
  user:login:clear:attempts (ulca,uslca)  Clear failed login attempts for an account.
  user:login:url (ulu,usli)               Returns a one-time user login url.
  user:password:hash (uph,usph)           Generate a hash from a plaintext password.
  user:password:reset (upr,upsr)          Reset password for a specific user.
  user:role (ur)                          Adds/removes a role for a given user
 
 views
 ------
  views:disable (vd,vdi)                  Disable a View
  views:enable (ve)                       Enable a View
 
 webprofiler
 ------
  webprofiler:benchmark                   Benchmark an url.
  webprofiler:export                      Exports Webprofiler profile/s to file.
  webprofiler:list                        Lists Webprofiler profiles.

Add new comment

The content of this field is kept private and will not be shown publicly.

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.