Problem/Motivation
Site builders and technical administrators often use drush for some tasks and the GUI for others. This is partly because some commands are used often and/or are easy to remember, while for others it might be faster to just click a button on an admin page rather then finding whether there's a drush command and what its syntax is. New drush commands might go unnoticed.
With the new CLI entry point in Core #3453474: CLI entry point in Drupal Core, we can tell users about these commands in the GUI; making the switch to using them easier.
We could do this by providing a block that's displayed in the help region of the admin theme; below the help text that might already be provided by a module.
This block should only contain the relevant dr command for the action that can be performed on that page; for example dr system:cron on /admin/config/system/cron.
- The information provided for each command when you run
dr listwould be sufficient for that, so it does not require additional text. But there would probably need to be a list of which command to associate with which route(s). - There might be admin pages where more then one command needs to be exposed.
- Contrib modules should also be able to expose their commands in this way.
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
This would display a new block that should be displayed by default for the role "Administrator".
Introduced terminology
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | maintenance_mode.jpg | 176.65 KB | rkoller |
| #8 | cli-command-in-block.png | 64.72 KB | ifrik |
Comments
Comment #2
dwwThanks for the suggestion. Moving the parent to the initiative meta, not the phase 1 implementation issue.
Comment #3
dwwWonder if we can/should extend the
AsCommandattribute to have a parameter for the route where the help text should appear? It seems natural when defining the command to put the route info directly there. We don't want a hard-coded list somewhere in core, since that makes it impossible for contrib to extend this for its own commands.Comment #4
kingdutchThe Symfony
ListCommandis used by Symfony to list all available commands.It's execute implementation is
If I dig into that then there are
MarkdownDescriptorandReStructuredTextDescriptorimplementations. Those seem like good basis to convert to HTML.In theory having
DrupalApplicationand passing it to the helper should get you all the description output you need.There's one complexity which is making sure DrupalApplication has performed its command discovery.
DrupalApplicationcurrently adds its commands from discovery only when it's being bootstrapped. However the bootstrap also assumes it's bootstrapping Drupal, that doesn't need to happen in a UI request because we already bootstrapped Drupal elsewhere.If you have patience then blocking this issue on some of the child issues from #2282779: [meta] DrupalKernel has too many responsibilities that I'm working on would solve that. Particularly moving the bootstrap and settings from DrupalKernel into the runtime. If you don't have patience then making the
bootstrapcode resilient to being in a bootstrapped Drupal environment and/or splitting up the command discovery from that would be a problem to overcome.Comment #5
dwwAlthough I previously replied with some encouragement and possible suggestions, the more I ponder this issue, the less I think it should be implemented (at least in Core). 😅
So my suggestion would be that if folks are interested in this, it should start as a contrib module. There's no reason this has to be in Core itself. If it's a contrib project, the author(s) can iterate much more quickly than Core. Once someone works out some of the UI problems, see if this is viable and useful, and folks are installing it on real sites and getting real value, we can always move that code into Core at a later date. But for now, I'd either call this issue targeting Core "Postponed" or "Won't fix"...
Thanks/apologies,
-Derek
Comment #6
moshe weitzman commentedWe have agreement between the subsystem maintainers (dww and I).
Comment #8
ifrikI agree with those 5 points that were raised, but those are addressing a functionality that I didn't propose, but maybe I wasn't clear enough.
I would just like to see individual relevant commands shown as information in the UI.
The commands should not be run in the UI or triggered from it at all.
There is no need to list all command on one long page - we got that as "drush list" already.
What I envision is a block like the help block, something like this:

I don't know how this works technically, but I would expect something that specifies for a command if it should be displayed on a route and on which one.
Quoting from Slack:
Comment #9
moshe weitzman commentedOK, reopening, retitling, and affiliating with the help component. This needs some refinement for UX, and then technical details should be relatively easy to work out.
Comment #10
mradcliffeI was thinking, rather over thinking this, with an interface to expose routes for commands to display help on, but adding to
hook_helpwould be much easier and already does that.We would want to remember to make this a check/suggestion for command authoring in core.
Comment #11
rkollerUsability review
We discussed this issue for the first time at #3592819: Drupal Usability Meeting 2026-06-26. The link to the recording: https://www.youtube.com/watch?v=AVUZmx8Fwm8. The attendees at the usability meeting were @rkoller, and @worldlinemine.
We discussed this issue for a second time with a bigger group at #3608083: Drupal Usability Meeting 2026-07-10. The link to the recording: https://www.youtube.com/watch?v=qnUirvZ9VmE. The attendees at the usability meeting were @benjifisher, @rkoller, @simohell, and @worldlinemine.
In general, the group was in line with the idea proposed in this issue. It solves the underlying germinal problem summarized by the following statement by @worldlinemine: "You don't even know what you don't know". So to whom would a feature like that provide any benefit?
But on the other hand, as soon as such a block would be available to users with, for example, the
Administratorrole as suggested in the issue summary, that information could turn into a perceived clutter/noise sooner than later.So on one hand, it would be helpful to make such an informational block available via (a) certain role(s), but on the other hand, it is currently impossible to adjust the visibility within that given group of people on a per user basis catering to the different individual needs and preferences. And finally, looking at the initial mockup in #8, there are a few details to denote (*the following is not intended as a critique about the mockup it was a very helpful primer to spark the discussion).
CLIis not necessarily familiar to everyone; to some people, CLI might be just a sort of cryptic abstract acronym. In consequence, also, not everyone knows what to do with that kind of information and where to actually apply it.drand it is also not necessarily clear to everyone that the word in parenthesesmsetis just an alias and shorthand formaint:set.In consequence, the group had a clear consensus about the following recommendations:
Administratoras suggested in the issue summary, but site builders and administrators are then still able to adjust the visibility of that block to the general needs of their user base and role structure later on.admin/structure/block) right after/underneath theHelpblock - semantically that would be the most obvious and straight forward choice. Again, site builders and administrators are still able to adjust the position within the page to their own needs later on.Content wise, the goal should be that the content is easily recognize- and skim-able. We came up with the following iteration on the mockup based on the page for the maintenance mode (*it was simply chopped together in the source mode of the ckeditor body field of a content block - in general the entire block would require design input).

Within the title we've provided an explanation for the abbreviation
CLIand added where to use the commands within the blocks description/help text - ideally it should be just the title, but that would probably require the glossary functionality outlined in point 3. In contrast to the screenshot each set of command and description should be in a single line and we would recommend using thedlelement for wrapping the entire list of available commands; the commands should then be wrapped indtelements, and the descriptions wrapped inddelements.admin/help. It should provide a list of all the commands (and their descriptions) fordrthat are currently available in Drupal core. That way there wouldn't be any need for the user to leave the admin UI in search for information about how to accomplish certain tasks within the CLI - everything is available either in the context of the current page or is within reach on the help page. Point 2 is clearly out of the scope for the current issue and would require a dedicated follow-up issue.Administratorrole, that information rather sooner than later could turn into being perceived as clutter. From our point of view the solution would be the introduction of a user based visibility setting where the user is able to decide if the context sensitive block should be either:We are well aware that the introduction of that kind of functionality and the amount of work necessary to implement it, just for the sake of a context sensitive Drupal CLI block, would be sort of overeager and unjustified. But we had the broader picture in mind, and that pattern would provide the opportunity that it could be utilized in at least two more relevant contexts:
CLIalready illustrated one fundamental problem in the daily usage of Drupal: there are many terms for all the different abstract concepts it harbors, some from the general tech domain likeCLI, but also many very specific to Drupal, aka Drupalisms that make the onboarding for even tech-savvy folks anything but flawless. One of the artifacts we've agreed on in the context of the Drupalism working group a few months ago, the group is on hiatus for a while now, was to create a glossary for all the terms used in the context of Drupal. That would provide the opportunity to add a user-based setting for glossary terms, they could be either disabled or when enabled, if a term is contained in the glossary it could be wrapped in adtelement and the corresponding definition wrapped in addelement and it could accessed for example in a popover. Same as adding the list of available commands for Drupal CLI, the glossary could be added to a dedicated section onadmin/helpas well.Each of the three scenarios would benefit from having the described user-based setting, but each of the scenarios would require at least a dedicated follow-up issue - same as point 2, all the aspects of point 3 are completely out of the scope for this issue.
If you want more feedback from the usability team, a good way to reach out is in the #ux channel in Slack.