lina-infratech-cli
Version:
A CLI tool for Lina Infratech Developers
35 lines (27 loc) • 654 B
text/typescript
import chalk from 'chalk'
import figlet from 'figlet'
import { Command } from 'commander'
import commandLoader from './commands/command.loader'
console.log(
chalk.green(
figlet.textSync('Lina Infratech', {
font: 'Larry 3D 2',
}),
),
)
const bootstrap = () => {
const program = new Command()
program
.name('Lina CLI')
.version(
require('../package.json').version,
'-v, --version',
'Output the current version.',
)
.usage('<command> [options]')
.helpOption('-h, --help', 'Output usage information.')
commandLoader(program)
program.parse(process.argv)
}
bootstrap()