Drupal 11.4 ships a native CLI: meet dr

Drupal 11.4 introduces dr, an extensible command line interface built right into core.

It marks the beginning of a long goodbye to Drush as a required dependency. 

Here is what it does today, and what is coming.

Drupal CLI

For as long as most of us have been building Drupal sites, one of the first things you did after composer create-project was install Drush. Core technically had a CLI script of its own, but it was a handful of hardcoded commands you could not extend. Every real command line workflow ran through contrib.

Drupal 11.4 changes that. It ships a new native CLI, available at ./vendor/bin/dr, and this one is built to be extended.

What is dr?

The new CLI is a proper Symfony Console application living in Drupal core. It was built by a team that included the Drush maintainers themselves, which tells you a lot about where this is heading: this is not a competitor to Drush, it is its designated successor.

The initial command set in 11.4 is deliberately small:

  • Rebuild caches
  • Run cron
  • Generate a one-time login link for a user
  • The commands the old core script already had, like site install, quick-start and recipe operations

Not much yet, but the interesting part is not the commands. It is the foundation underneath.

Any module can now ship commands

This is the real news. With dr, any module can register its own console commands using Symfony's #[AsCommand] attribute, and core discovers them automatically:

use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;

#[AsCommand(name: 'mymodule:do-thing')]
class DoThingCommand extends Command {
  // ...
}

No Drush dependency, no separate integration layer. If your module is enabled, its commands show up in dr. And because modern Drush understands the same Symfony command classes, you can write one command that works in both worlds. There is official documentation on making existing Drush commands compatible.

What about Drush?

Drush is not going anywhere soon, but the transition has officially started. The "CLI in Core" initiative has a phased roadmap:

  1. Drupal 11.4: the extensible foundation, shipped now
  2. Drupal 12.0: essential commands like database updates, module and theme install/uninstall, and config import/export
  3. The Drupal 12 cycle (around 2027): porting proven Drush commands into core
  4. Later: translatable commands

One thing the initiative is explicit about: drush/drush will never become a core dependency. Commands get reimplemented in core, not pulled in wholesale.

What should you do today?

Honestly? Keep using Drush. The dr command covers a sliver of what Drush does, and your deployment scripts have no reason to change yet.

But if you are writing a new custom CLI command for a project, write it as a Symfony #[AsCommand] class starting today. That is the pattern both dr and Drush 13+ understand, and it means your command survives the transition without a rewrite.

The bigger picture: Drupal keeps absorbing the essentials that used to require contrib, the same way it did with Views, media, and layout building. A first-class CLI in core is long overdue, and 11.4 finally lays the groundwork.

I'm building the best Drupal site template out there

Drop your email and you'll hear when Webhaven ships something new, and you'll get the launch deal before anyone else. No spam, ever.

You might also be interested in