# Module /cli

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

```tangu
(use /cli)
```

## Functions & symbols

### action

`(action ...args)`

Declares a mutating CLI action route with handler and options.

| Parameter | Type | Optional | Description |
| :--- | :--- | :--- | :--- |
| `args` | `Any` | yes | — |

### cmd

`(cmd ...args)`

Declares a general CLI subcommand route.

| Parameter | Type | Optional | Description |
| :--- | :--- | :--- | :--- |
| `args` | `Any` | yes | — |

### echo-help

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

Prints help information for available CLI commands.

| Parameter | Type | Optional | Description |
| :--- | :--- | :--- | :--- |
| `router-arg` | `Any` | no | — |
| `target-path` | `Any` | no | — |

### format-help

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

Formats help information for available CLI commands as a string.

| Parameter | Type | Optional | Description |
| :--- | :--- | :--- | :--- |
| `router-arg` | `Any` | no | — |
| `target-path` | `Any` | no | — |

### mount

`(mount ...args)`

Mounts a child CLI router at the given command segment.

| Parameter | Type | Optional | Description |
| :--- | :--- | :--- | :--- |
| `args` | `Any` | yes | — |

### query

`(query ...args)`

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

| Parameter | Type | Optional | Description |
| :--- | :--- | :--- | :--- |
| `args` | `Any` | yes | — |

### router

`(router ...route-defs)`

Constructs a CLI Router with grouped queries and actions.

| Parameter | Type | Optional | Description |
| :--- | :--- | :--- | :--- |
| `route-defs` | `Any` | yes | — |

### run

`(run cli-router args)`

Resolves and executes CLI router.

| Parameter | Type | Optional | Description |
| :--- | :--- | :--- | :--- |
| `cli-router` | `Any` | no | — |
| `args` | `Any` | no | — |

### scope

`(scope ...args)`

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

| Parameter | Type | Optional | Description |
| :--- | :--- | :--- | :--- |
| `args` | `Any` | yes | — |
