Node

Commander Library

Namenpm packagelink
commandercommanderLink
pnpm install --save-dev commander

Using a Flag

const program = new Command()
program
  .name("verify_content")
  .description("Verify content against schemas")
  .option("--watch", "Watch schemas and content for changes")
  .action((options) => {
    if (options.watch) {
      // Add your watch logic here
    } else {
      verifySchemas()
    }
  })
  .parse(process.argv)