:title
CLI

:sig
function CLI()
function CLI:NAME()

:content
`CLI` defines the local command entrypoint. `bearer-cli /unit.capy` runs it, and `bearer-cli /unit.capy:NAME` runs the named entry point `CLI:NAME` of the same unit, so one unit can offer several commands.

The handler binds `request` implicitly as a `dval`. Read command data from the shared request value; `bearer-cli --get /unit.capy:NAME key=value` delivers the pairs in `request.query`. Use `print` to write command output.

:example capy cli
print(string(request.method), "\n")

:see-group
handlers

:see
type/request
