Select Moodle version:

Other: moosh

Moosh stands for MOOdle SHell. It is a commandline tool that will allow you to perform most common Moodle tasks. It's inspired by Drush - a similar tool for Drupal.
Maintained by: Picture of Tomasz Muras Tomasz Muras
for Moodle
1.9, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6

Moosh is a tool that exposes some common Moodle functionality to the commandline.

You install moosh outside of the Moodle directory, it can be anywhere really. Then simply make moosh.php (or symlink named like moosh) available somewhere in $PATH.

To run moosh, change the directory into your installed Moodle's instance and run one of the commands. To get the list of all available commands only run moosh.php (or just moosh if you've symlinked it like this) or read the documentation and examples.

Moosh is meant to work nicely with Linux features like bash/zsh expansion. For example, to create 10 users, you just type:

% moosh user-create username{1..10}

 

Contributors

Picture of Tomasz Muras
Tomasz Muras (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Bill Steele
    Mon, Jun 3, 2013, 8:54 PM
    Hi Tomasz

    There does not appear to be a course-reset function available. Is this something that could potentially be added? We are attempting to rollover all our modules from this academic year into next year and the approach that would best suit us would be to backup - restore - reset

    Bill
  • Picture of Tomasz Muras
    Thu, Jun 20, 2013, 4:35 AM
    course-reset added in moosh 0.9
  • My picture
    Thanks for this lovely plug-in, Tomasz. I have a production site running in Windows Sever 2008-IIS7, is there a way of making it work with Windows Server?
    Regards,
  • Picture of Tomasz Muras
    Wed, Jul 10, 2013, 11:23 PM
    Hi Aaricia,

    I've actually heard of people running it under Windows. I'm simply not testing it under Windows at all and building it with Linux in mind, however there is nothing major that should stop it working under Windows - did you actually try it?

    You should simply test it under your windows environment and send me any fixes/patches required to make it work there (if necessary).
  • Picture of Kyriakos Terzopoulos
    Tue, Sep 24, 2013, 4:00 AM
    YOU RULE!
  • Picture of David Bezemer
    Tue, Sep 24, 2013, 5:43 AM
    this is a great extension Thomasz, do you think it would be possible to extend the course section with the import from course functionality? That way its super easy to clone a course, without having to make a backup and restore. (alternatively course_clone would be even more awesome!)
  • Picture of Howard Miller
    Fri, Feb 28, 2014, 8:02 PM
    It only seems to work when logged in as root. I assume I am missing some permissions. The command runs but doesn't find any commands. What are the permissions for 'moosh'?
Please login to post comments