update: separate cli logic