const {Command, flags} = require('@oclif/command') <%_ const klass = _.upperFirst(_.camelCase(name.split(':').slice(-1).join(':') + ':command')) _%> class <%- klass %> extends Command { async run() { const {flags} = this.parse(<%- klass %>) const name = flags.name || 'world' this.log(`hello ${name} from <%- path.replace(/\\/g, '\\\\') %>`) } } <%- klass %>.description = `Describe the command here ... Extra documentation goes here ` <%- klass %>.flags = { <%_ if (type === 'single') { _%> // add --version flag to show CLI version version: flags.version({char: 'v'}), // add --help flag to show CLI version help: flags.help({char: 'h'}), <%_ } _%> name: flags.string({char: 'n', description: 'name to print'}), } module.exports = <%- klass %>