| 5 | import { version } from '../package.json'; |
| 6 | |
| 7 | function main() { |
| 8 | void yargs(hideBin(process.argv)) |
| 9 | .completion() |
| 10 | .commandDir('commands', { |
| 11 | extensions: ['js', 'ts'], |
| 12 | }) |
| 13 | .demandCommand(1, 'Need at least one command to execute') |
| 14 | .recommendCommands() |
| 15 | .strict() |
| 16 | .option('debug', { |
| 17 | describe: 'Run with debug logging', |
| 18 | type: 'boolean', |
| 19 | default: false, |
| 20 | }) |
| 21 | .version('version', 'Show version number', version) |
| 22 | .scriptName('valdi') |
| 23 | .wrap(yargs.terminalWidth()) |
| 24 | .help().argv; |
| 25 | } |
| 26 | |
| 27 | main(); |