Skip to content

Latest commit

 

History

History
21 lines (15 loc) · 396 Bytes

File metadata and controls

21 lines (15 loc) · 396 Bytes

CLI Base

The most basic CLI and Command system for internal cli apps.

Create commands and let Cli manages main program flow;

const cli = Cli.new([
  Command.new("hello", async name => {
    console.log(`hello ${name}`);
  }, [ question.text("name") ])
]);

await cli.run();

You can make use of command line arguments as well;

npm start -- hello --name John