cli/user refactor