I want the st2 key load CLI command to bulk load StackStorm datastore key-value pairs from a JSON or YAML file. The command should be invoked as st2 key load FILE, with an optional -c/--convert flag before the file path.
The file may contain either one key-value object or a list of key-value objects. Each object must provide name and value, and may also include scope, user, encrypted, secret, and ttl; for each item, the CLI should create or update that datastore key through the normal key API and print a table containing name, value, secret, scope, user, and ttl unless JSON or YAML output is requested.
If an item's value is already a string, load it as-is. If value is a non-string such as an object, array, boolean, integer, or float, st2 key load --convert FILE should JSON-encode that value before saving it; without --convert, the command should fail with a non-zero exit and explain that non-string values must be converted or written as strings in the file.
For a concrete example, loading a JSON file containing { "name": "kv_name", "value": "super cool value", "scope": "system" } should exit 0 and send a datastore update for kv_name with that string value. Loading a file containing [ { "name": "first", "value": "one" }, { "name": "second", "value": "two", "secret": true, "ttl": 100 } ] should update both keys and exit 0. An empty YAML file should not error; it should exit 0 and produce the standard empty-result output. Missing files, unsupported file extensions, missing required fields, or non-string values without --convert should exit non-zero.