divide into cli and non-cli