Update CLI to work with new API