move main to cli package