startit/eloquentjavascript/my-node-cli/index.js

13 lines
285 B
JavaScript
Raw Normal View History

2024-08-22 12:21:23 +02:00
#!/usr/bin/env node
import { program } from "commander";
program
.version("1.0.0")
.description("My Node cli")
.option("-n, --name <type>", "Add your name")
.action((options) => {
console.log('Hey, ${options.name}!');
});
program.parse(process.argv);