Added documentation on cli

This commit is contained in:
Kevin FEDYNA
2025-01-22 14:24:55 +01:00
parent 8a5461827e
commit 75a9591f6a
8 changed files with 175 additions and 94 deletions
+14
View File
@@ -0,0 +1,14 @@
import { parseArgs, ParseOptions } from "@std/cli/parse-args";
import { runCommand } from "$root/toolbox/cli/command.ts";
import { CLI } from "$root/toolbox/cli/help.ts";
/**
* Runs the CLI.
* @param cli The CLI configuration object.
* @param argSpec The Parse options for args.
*/
export function main(cli: CLI, argSpec: ParseOptions) {
const argv = parseArgs(Deno.args, argSpec);
const { command, args } = runCommand(argv._, cli);
command(...args.map((element) => element.toString()));
}