move cli to separate file