2

Nowadays most CMS provide some kind of cli interface, like ./typo3cms or in the case of craft ./craft.

Instead of running ddev exec ./craft do/something, I'd like to add a web command craft that tunnels that do/something, so I can just write ddev craft do/something.

I understand this is nice to have :-)

But can I have it?

Urs
  • 4,984
  • 7
  • 54
  • 116

1 Answers1

3

It's a nice to have that you can, in fact, have right now. Check out the documentation on custom commands: https://ddev.readthedocs.io/en/stable/users/extend/custom-commands/

Your integration would look something like this:

#!/bin/bash

## Description: Run craft inside the web container
## Usage: craft [flags] [args]
## Example: "ddev craft some command"

craft $@
unn
  • 650
  • 4
  • 10