added an ApiCLI so that we can test API inside that.