Move cli startup logic in inc/cli_init.php