Does Drupal Console (that is available for Drupal 8) aim to totally or partially replace Drush?
Drupal console is a Drupal CLI tool, from the-ground-up, that leverages Symfony CLI components and modern PHP OOP design practices. Drush is a venerable Drupal CLI tool that has been around since Drupal 4.7, thus built with an older design practice. However, since Drush 9 it's been rearchitected to use the Symfony components as well.
There is overlap based on both projects being a general purpose Drupal administration CLI tool. Drush has more features, due to its age, but Drupal Console has some new features due to its more modern design.
In a commercial software world, there would be some profit motive to merge/buy-mind-share/etc. However, in the open source world they both stand as their own independent projects, with its maintainers motivated for other reasons than to build the one true Drupal CLI tool to bind them all (tm).
It might help to read Ten things you need to know about Drupal Console coming from Ray Saltini of FFW (the company supporting the lead developer Jesus Olivas of Drupal Console), & Drush and the Drupal Console with Drupal 8 from Greg Anderson (one of the maintainers of Drush).
To explicitly answer the question, maybe. If you're wondering which should I use?, the answer is maybe both for the time being. Perhaps Drupal Console will eclipse Drush, but right now both have useful feature sets for administering your Drupal site.
Sean Hamlin - 10 things I learnt building in Drupal 8
- Drupal Console is awesome
Every time you need to generate a custom module, or a new block in a custom module, you can quickly and easily use Drupal Console to produce the code scaffolding for you. This quite easily makes the job of a developer a lot less stressful, and allows you to focus on actually writing code that delivers functionality.
Sounds like DC does things that Drush can't.
Now to answer your question, IDK if their objective is to replace Drush, but it's definitely looking like a Drush substitute. To me this is like Display Suite Vs Panels.
I'm facing the fact of I should write Drush Commands or Drupal Console Commands, but in my case I need to maintain the same module in Drupal 8 and Drupal 7.
As you know we don't have Drupal Console in Drupal 7, so in this case if I create Drupal Console Commands I don't will have this commands available in my Drupal 7 module. But if I use Drush Commands I will have quickly the same commands in Drupal 8 and Drupal doing a few changes related to the API.
So, I don't think that Drupal Console will replace for the moment Drush, but maybe in the future we will need to write some post like:
"How to migrate my Drush Commands to Drupal Console Commands?" :-D
This question is a good one.
- Drupal Console is build on top of Symfony and POO.
- Drush up to 8 (included) not .
- Drush 9 is build on top on top of Symfony and POO.
In other way :
- Drupal Console use Command dir on your website installation
- Drush use Commands dir on your website installation
I think, and it's my own opinion, work on 2 differents console tools is a less of time. Drush is more know into the community. So maybe great console command will be forked to Drush and just Drush will survive.