cleanup, docs

This commit is contained in:
root
2026-06-16 12:21:31 +00:00
parent dff1959341
commit ea08d5f28b
296 changed files with 1571 additions and 1940 deletions
+4 -17
View File
@@ -1,10 +1,8 @@
:title
cli_input
:sig
DValue cli_input(Request& context)
:see
>ob
>1_CLI
>json_decode
>DValue
@@ -22,20 +20,9 @@ Later sources override earlier ones, so a JSON body can override a query or form
If the JSON body is a scalar or array instead of an object, the decoded value is stored under `input["_"]`.
```cpp
CLI(Request& context)
{
DValue input = cli_input(context);
String action = first(input["action"].to_string(), "help");
if(action == "echo")
print(input["message"].to_string(), "\n");
}
```
Convenience script usage:
```sh
scripts/uce-cli /tests/cli.uce action=echo message=hello
scripts/uce-cli --json '{"action":"echo","message":"hello"}' /tests/cli.uce
```
:example
print("cli_input example\n");