cli/cli: refactors & added --flags flag

splitting out methods not directly dependant on thor into cli/utils