cli refactoring: console