The command line
Every operation above, without writing any code.
Every operation this tutorial has shown as a Python call is also available as a shell command — the omnist CLI wraps the same library, one subcommand per operation:
omnist convert doc.oml --from oml --to jsonOutput
{"name": "Ann"}omnist validate doc.json --from json --schema order.osd(same ok/error-path output as schema.validate above, formatted for a terminal)
omnist schema compatible-with v1.osd v2.osd(the same question as v1.compatible_with(v2) from the schema algebra step, answered without Python)
The full subcommand surface:
| Command | Does what |
|---|---|
omnist format | reformat OML (compact ↔ indented) |
omnist convert | read one format, write another |
omnist check | simulate a write, report adjustments, without writing |
omnist infer | draft a schema from example documents |
omnist validate | validate a document against a schema |
omnist schema format | reformat OSD (compact ↔ indented) |
omnist schema normalize | canonical minimal form |
omnist schema prune | drop unreachable/unsatisfiable structure |
omnist schema is-empty | does this schema accept any document at all? |
omnist schema lint | diagnose structural problems, without mutating |
omnist schema extract | minimal subschema for a kept label set |
omnist schema compatible-with | can readers of B still read A's documents? |
omnist schema equivalent | same documents, different shape? |