Update Cli to handle the main process