git clone https://github.com/meltingmedia/MODX-Shell.git
cd MODX-Shell && composer install --no-dev
$PATHso you could use
modxcommand from anywhere, by running
ln -s /path/to/bin/modx ~/bin/modx
Then, you should be able to run
modx from anywhere.
modx command with no parameter, you will get the list of available commands.
Those commands could change if there is a modX instance configured or not.
If you use bash, you might be interested in commands auto completion
A configuration basically consist of a name and a path.
You could list your configured instances using the command
When being in a folder (or sub-folder) matching an existing configuration, you will notice a
> in front of the configuration name.
To add a new entry in your configuration (which is basically just a .ini file), you can make use of the command
modx config:add :
Usage: config:add name [path] [erase] Arguments: name Your instance name path Your instance base path, defaults to current dir (default: "/current/path") erase Whether or not override existing configuration (default: false)
config.core.php is found at the root path you set in your configuration, and a valid MODX configuration is set (basically a
MODX_CORE_PATH constant defining a valide modX core folder, as well as a
MODX_CONFIG_KEY), you will be able to use the configured modX instance.
Your configuration file is stored within your