UCE Docs / cli_arg

Signature

String cli_arg(Request& context, String key, String default_value = "")

Reads one value from the merged cli_input(context) parameter tree.

If the key is missing, or the resolved value is empty, default_value is returned.

For commands that need multiple values or typed reads, prefer calling cli_input(context) once and reading the returned DValue directly.

Example

String name = cli_arg(context, "name", "world");
print("hello ", name, "\n");
Output
hello world