MODX Shell

Development

Extending MODX Shell

MODX Shell has been thought to be fairly easily extended.

Shell allows :

  1. your components to ship some commands
  2. you to build your own set of commands, as library

For components

Your components could also bring their own commands.
Those commands would only be available when you are manipulating a modX instance where your component is installed.

Read more on shipping components commands

For libraries

You could build some additional commands on your own.
Those commands would be available everywhere (for any instance -- unless you namely require a particular instance).
The requirements would be to ship a post-autoload-dump (see Composer scripts) to register your extra commands in MODX Shell.

Read more on building commands libraries

Available base commands to extend

Name Description
BaseCmd A base command which does not require a MODX instance
ProcessorCmd A base command to use a MODX processor (requires a MODX instance)
ListProcessor A Base command to use a MODX "list" processor, display the output in a table
GetProcessor A Base command to use a MODX "get" processor, display the output in a table

Read more on base commands to implement