cli: refactor comand name helper