Simple yet powerful framework for building command-line apps.
MIT License
Bot releases are hidden (Show)
Published by egoist almost 6 years ago
Many breaking changes, so it's a new major release. But you don't need to upgrade to v6 if it's unnecessary for you :P
i.e. it works like commander.js now:
const cli = require('cac')()
cli.command('build <entry> [...more]')
.option('--target [target]', 'Build target', { default: 'web' })
.action((entry, more, options) => {
console.log(entry, more, options)
})
cli.parse()
node cli.js build --minimize
# equals to
node cli.js --minimize build
13kB in total, compiled file is about 400 SLOC, only one single tiny dependency.
Check out README
--help
and --version
are not added by default.