Tanguv0.35.0
CLI, terminal & markup9 exports
Raw Markdown

/cli

Declarative command-line argument and subcommand router DSL (action, query, cmd, scope, mount) with automatic help output.

(use /cli)

Functions & symbols#

action#

function
(action ...args)

Declares a mutating CLI action route with handler and options.

ParameterTypeOptionalDescription
argsAnyoptional—
Returns:Any

cmd#

function
(cmd ...args)

Declares a general CLI subcommand route.

ParameterTypeOptionalDescription
argsAnyoptional—
Returns:Any

echo-help#

function
(echo-help router-arg target-path)

Prints help information for available CLI commands.

ParameterTypeOptionalDescription
router-argAnyrequired—
target-pathAnyrequired—
Returns:Any

format-help#

function
(format-help router-arg target-path)

Formats help information for available CLI commands as a string.

ParameterTypeOptionalDescription
router-argAnyrequired—
target-pathAnyrequired—
Returns:Any

mount#

function
(mount ...args)

Mounts a child CLI router at the given command segment.

ParameterTypeOptionalDescription
argsAnyoptional—
Returns:Any

query#

function
(query ...args)

Declares a read-only CLI query route with handler and options.

ParameterTypeOptionalDescription
argsAnyoptional—
Returns:Any

router#

function
(router ...route-defs)

Constructs a CLI Router with grouped queries and actions.

ParameterTypeOptionalDescription
route-defsAnyoptional—
Returns:Any

run#

function
(run cli-router args)

Resolves and executes CLI router.

ParameterTypeOptionalDescription
cli-routerAnyrequired—
argsAnyrequired—
Returns:Any

scope#

function
(scope ...args)

Groups nested CLI routes under a common prefix or shared options.

ParameterTypeOptionalDescription
argsAnyoptional—
Returns:Any