--- /dev/null
+<?php
+require_once( __DIR__ . "/../init.php");
+
+if ($argc == 1){
+ $command = "all";
+} else {
+ $command = $argv[1];
+}
+
+$alloController = new AlloController();
+
+$possible_commands = $alloController->getSynchronizeCommand();
+
+if (! in_array($command,$possible_commands)){
+ echo "Usage : {$argv[0]} [".implode("|",$possible_commands)."]\n";
+ exit;
+}
+
+try {
+ $alloController->sugarSynchronize($command);
+} catch (Exception $e){
+ echo $e->getMessage();
+ echo "Synchronisation: KO\n";
+ exit;
+}
+echo "Synchronisation: OK\n";