apply API changes to cli.js too