legion-cli

CLI argument parser and command builder for legionhjyu. Define flags, subcommands, and help text in a few lines.

v1.0.0 MIT @legionhjyu Updated NaNy ago
Install
legion pkg install legion-cli

legion-cli

Argument parsing and CLI builder for legionhjyu.

Install

legion pkg install legion-cli

Usage

summon "legion-cli" release cli

forge app <- cli.new("mytool", "My command-line tool") app.version("1.0.0")

app.command("build") { .description("Build the project") .flag("--output", "-o", "Output directory", "dist") .flag("--watch", "-w", "Watch for changes", false) .action(|flags| { shout("Building to " + flags.output) }) }

app.run(args())