Documentation
¶
Overview ¶
Command ontos is the byte-first inspector for ontos values: bytes in, evidence out. It is one of three peer implementations (go · rs · ts) of the v1 CLI contract in docs/spec/ontos-cli.md; all three emit byte-identical machine output for identical input (the differential-harness protocol).
It implements the four v1 commands — `decode`, `inspect`, `read`, and `canon` — over the full argument / --format / dispatch surface, plus `--from-json` authoring input (scaffolded in ontos-internal#18; commands in ontos-internal#19–ontos-internal#21; `--from-json` in ontos-internal#17).
ontos <command> [--format human|json] [--from-json <json|->] [<hex>]
Input is canonical ontos-codec-v1 bytes as a positional hex string, or read from stdin when the argument is "-" or omitted (surrounding whitespace stripped). Alternatively --from-json supplies the value as the authoring notation ({"atom":"<hex>"} | {"tuple":[ … ]}) — the inverse of the json value rendering — built directly into a Value (canonical by construction); it is mutually exclusive with a positional <hex>. json output is compact, keys in contract order, hex lowercase, one object per line ending in "\n", carrying only the stable fields — no free-text message. Human-readable diagnostics go to stderr.