some improvement to cli.js

got it