The drush-cli
command adds a few environment settings to our terminal session so we can issue Drush commands even faster. Among other things, it adds the following features after being executed:
Execute all Drush commands against a specific site.
Change directory to the root, modules, or files directories of a site.
List files within a directory of a site.
Execute commands without having to type
drush
at the start.
We will first enter on the Drush CLI and test a few commands. Then we will explain how to add Drush CLI configuration to our default terminal profile.
Starting a Drush CLI is as easy as executing the following command:
$ drush core-cli
Entering the drush cli. Use CONTROL-D to exit.
Type 'help' for help.
drush>
Now we will load one of our site aliases and execute a few commands such as changing directory, listing files and clearing the cache:
drush> use @drupal.local
@drupal.local>
@drupal.local> cd %files
cd /home/juampy/projects/drupal...