Omnist logo Omnist Tutorial Step 14 of 15

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 json
Output
{"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:

CommandDoes what
omnist formatreformat OML (compact ↔ indented)
omnist convertread one format, write another
omnist checksimulate a write, report adjustments, without writing
omnist inferdraft a schema from example documents
omnist validatevalidate a document against a schema
omnist schema formatreformat OSD (compact ↔ indented)
omnist schema normalizecanonical minimal form
omnist schema prunedrop unreachable/unsatisfiable structure
omnist schema is-emptydoes this schema accept any document at all?
omnist schema lintdiagnose structural problems, without mutating
omnist schema extractminimal subschema for a kept label set
omnist schema compatible-withcan readers of B still read A's documents?
omnist schema equivalentsame documents, different shape?

Learn more