Class Cli

java.lang.Object
dev.omnist.cli.Cli

public final class Cli extends Object
Implements every omnist CLI command: format, validate, convert, schema (with its normalize/prune/extract/ compatible-with/equivalent/is-empty/lint subcommands), and infer. See docs/02-cli-reference.md for the full command reference with worked examples. This class carries all testable CLI logic; CliMain is just the JVM entry point that calls run(java.lang.String[], java.io.PrintStream, java.io.PrintStream, java.io.InputStream) and exits with its status code.
  • Method Details

    • run

      public static int run(String[] args, PrintStream out, PrintStream err, InputStream in)
      Parses and executes a single CLI invocation.
      Parameters:
      args - command-line arguments, exactly as passed to main
      out - stream for normal command output
      err - stream for error and usage messages
      in - stream read for - (stdin) input arguments
      Returns:
      the process exit code: 0 on success, 1 for a usage or processing error, 2 for specific commands' documented "failed check" outcome (e.g. validate on a non-conforming document)