Command line is treated the same way a controller is. Which means all controller actions can be executed from command line.
The syntax for running a command line is:
cd HATHOORA_ROOT/docroot
php index.php -e ENVIRONMENT -r http://DOMAIN/PATH
However one disadvantage of this approach is that all of commands are now accessible from the web. In order to make a controller action strictly accessible from command line one could do something like this:
class cliController extends \hathoora\controller\controller
{
public function job()
{
$request = $this->getRequest();
if ($request->isCLI())
{
// code for job goes here..
}
}
}