function runCli
runCli(
argv: readonly string[],
): Promise<number>

Parses argv, runs the requested command, and returns its exit code.

Never terminates the process — src/main.ts owns the single Deno.exit, so every path here is testable.

Parameters

argv: readonly string[]

The raw arguments (e.g. Deno.args)

Filesystem, working directory, clock, and output sinks

Return Type

Promise<number>

0 on success, 1 on a runtime error, 2 on a usage error

Usage

import { runCli } from "cli/src/index.ts";