Does it need to be ran as root?
Downloading m-cli from git to /usr/local fatal: could not create work tree dir '/usr/local/m-cli': Permission denied Failed to clone => https://github.com/rgcr/m-cli.git
Off course it won't be able to access the /usr/local/