const {Command, flags, parse} = require('@anycli/command') const {cli} = require('cli-ux') <%_ const klass = _.upperFirst(_.camelCase(name.split(':').slice(-1).join(':') + ':command')) _%> class <%- klass %> extends Command { async run() { const options = parse(this.argv, <%- klass %>) const name = options.flags.name || 'world' cli.log(`hello ${name} from <%- name %>!`) } } <%- klass %>.flags = { <%_ if (type === 'single') { _%> // add --version flag to show CLI version version: flags.version(), // add --help flag to show CLI version help: flags.help(), <%_ } _%> name: flags.string({char: 'n', description: 'name to print'}), } module.exports = <%- klass %>