laconic-registry-cli/src/index.ts
2023-03-27 17:35:47 +05:30

29 lines
572 B
TypeScript

import yargs from 'yargs/yargs';
import { hideBin } from 'yargs/helpers';
yargs(hideBin(process.argv))
.options({
verbose: {
description: 'Verbose output',
demand: false,
default: false,
type: 'boolean',
alias: 'v'
},
config: {
alias: 'c',
default: 'config.yml',
describe: 'Config file path.',
type: 'string'
},
output: {
alias: 'o',
describe: 'Gives output in json format when specified.',
type: 'string'
}
})
.commandDir('cmds')
.demandCommand()
.help()
.argv;