Moosh – the Moodle Shell
Moosh stands for Moodle Shell and is a command-line tool that allows you to perform the most common Moodle tasks.
Before you can make use of Moosh, you have to install it (see Chapter 8, Understanding Moodle Plugins). Once installed, you will have a vast number of commands (at the time of writing, over 150!) at your disposal.
The general syntax of Moosh is as follows:
moosh <-params> <command> <options>
To give you an idea of the types of things you can do with Moosh, here are a few examples:
moosh user-create test
: Creates a user with the usernametest
.moosh user-create test{1..10}
: Creates 10 users. This type of enumeration can be used with many Moosh commands.moosh user-create --email [email protected] --city "Heidelberg" --country DE --firstname "Alex" --lastname "Büchner" packt
: All user profile values are supported; this is just a sample.moosh info-plugins...