Refactor cli for manila