$ npm install @artus-cli/artus-cli
artus-cli
aims to provide a modern command-line-apps framework.
import { DefineCommand, Option, Command } from '@artus-cli/artus-cli';
@DefineCommand({
command: 'dev',
description: 'Run the development server',
alias: [ 'd' ],
})
export class DevCommand extends Command {
@Option({
alias: 'p',
default: 3000,
description: 'server port',
})
port: number;
async run() {
console.info('port: %s', this.port);
}
}
Run it with:
$ my-cli dev --port 8080
© 2010 - cnpmjs.org x YWFE | Home | YWFE