I am running my Drupal 8 project under Acquia Dev Desktop 2 and just got Composer installed. How can I add the Drupal Console to my project?


You should follow the docs on the official Drupal Console repo on how to install it with Composer. Note that the global launcher is not recommended, it is recommended to add it to your project through Composer.


# Change directory to Drupal site
cd /path/to/drupal8.dev

# Download DrupalConsole
composer require drupal/console:~1.0 \
  --prefer-dist \
  --optimize-autoloader \

Note that the second command is all one command, not four. The \ tells terminal the command is continuing to the next line.

  • > cd /path/to/drupal8.dev "No such file or directory" ? Composer require runs, but I can't get all commands: "In order to list all of the available commands, you should run this against a drupal root directory. " – Frank Giesecke Mar 12 '17 at 18:52
  • 1
    It's wherever your project lives. That path is just an example. – Kevin Mar 12 '17 at 18:53
  • 1
    just curious is Drupal Console always a dev, aka 'require-dev', dependency or just a regular 'require' dependency? – armyofda12mnkeys Jan 5 '18 at 23:26
  • @armyofda12mnkeys I add it as require-dev as I don't want to use it on production. – kiamlaluno Nov 15 '19 at 16:05

In your drupal root folder just run composer require drupal/console, and after that add path_to_your_drupal_installtion\vendor\bin to your system PATH environment variables, and restart your cli. (Windows )...


you can install drupal console using composer

open the command line on windows then go to :

cd /path/to/drupal8.dev

now you can install drupal console :

composer require drupal/console:~1.0 --prefer-dist --optimize-autoloader

after that you installed drupal console you can use it from drupal root directory where composer.json exist as follow:

vendor/bin/drupal <the_command>

you should replace <the_command> with one of the drupal console commands. you can see complete list of the commands here: drupal console commands

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.