aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-05-16 07:13:07 +0000
committersigoden <sigoden@gmail.com>2024-05-16 08:25:57 +0000
commit4d0a8232570563e5f40da61cae3ae64e63aed7b5 (patch)
tree5f4cc3799387306d2bca557b0ae27a132e8a650f /README.md
parentd346fe5874967f69adcadf7b3a1195a9d3f5d88e (diff)
downloadllm-functions-docker-4d0a8232570563e5f40da61cae3ae64e63aed7b5.tar.gz
refactor: minor refinement
Diffstat (limited to 'README.md')
-rw-r--r--README.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/README.md b/README.md
index 560c36c..c0995be 100644
--- a/README.md
+++ b/README.md
@@ -71,6 +71,18 @@ main() {
eval "$(argc --argc-eval "$0" "$@")"
```
+The relationship between flags/options and parameters in function declarations is as follows:
+
+```sh
+# @flag --boolean Parameter `{"type": "boolean"}`
+# @option --string Parameter `{"type": "string"}`
+# @option --string-enum[foo|bar] Parameter `{"type": "string", "enum": ["foo", "bar"]}`
+# @option --integer <INT> Parameter `{"type": "integer"}`
+# @option --number <NUM> Parameter `{"type": "number"}`
+# @option --array* <VALUE> Parameter `{"type": "array", "items": {"type":"string"}}`
+# @option --scalar-required! Use `!` to mark a scalar parameter as required.
+# @option --array-required+ Use `+` to mark a array parameter as required
+```
**After creating your function, don't forget to rebuild the function declarations.**