command
strata command takes a serialized executor command as JSON and runs it. It is the escape hatch: every operation the engine has, including the ones with no CLI verb of their own, is reachable through it.
strata ./my-db command run --command-json '{"type":"kv_get","key":"Z3JlZXRpbmc="}'helloThe JSON goes in --command-json, or in a file named by --file. There is no positional form.
print, before you run
print validates a command and echoes it back normalized, without opening a database:
strata command print --command-json '{"type":"kv_get","key":"Z3JlZXRpbmc="}'{"key":"greeting","type":"kv_get"}Because it never opens anything, it takes no database and is the cheapest way to check a generated command before letting it near data. It is handled before the database is opened, so unlike run it is not available inside an interactive session.
The shape is flat, and the name uses underscores
Two things differ from what the rest of the documentation might lead you to write.
The type is the operation with an underscore, kv_get, not the catalog identifierkv.get. A dotted name is rejected, and the error lists every accepted variant on one line.
Parameters sit at the top level, not under a data object. {"type":"kv_get","data":{"key":"..."}} fails with unknown field `data`.
strata agents commands is the list of what exists; print is how you check a particular one.
Keys and values are base64
This surface takes KV keys and values as base64, where the CLI verbs take them as text. That is the single thing most likely to cost you an afternoon, because it fails silently when your key happens to be valid base64.
strata ./my-db command run --command-json '{"type":"kv_put","key":"user","value":"YWxpY2U="}'created base64:userThat did not create user. user is itself valid base64, so it was decoded to three bytes that are not text, and the record created has those bytes as its key. The CLI prints such a key back with a base64: prefix, which is the tell.
Encode the key, and it behaves:
KEY=$(printf 'user' | base64)
strata ./my-db command run --command-json "{\"type\":\"kv_put\",\"key\":\"$KEY\",\"value\":\"YWxpY2U=\"}"A key containing a character outside the base64 alphabet fails loudly instead, with invalid base64 bytes. So the dangerous keys are the ordinary-looking ones: user, data,config.
When to use it
Reach for it when an operation has no CLI verb, when you are driving Strata from a language with no SDK and would rather shell out than reimplement a protocol, or when you have a command as data already, from agents commands or a generator.
For anything with a verb, use the verb. It takes text, has flags, and prints output meant for a person.