Package dev.omnist.cli
Class Cli
java.lang.Object
dev.omnist.cli.Cli
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 Summary
Modifier and TypeMethodDescriptionstatic intrun(String[] args, PrintStream out, PrintStream err, InputStream in) Parses and executes a single CLI invocation.
-
Method Details
-
run
Parses and executes a single CLI invocation.- Parameters:
args- command-line arguments, exactly as passed tomainout- stream for normal command outputerr- stream for error and usage messagesin- stream read for-(stdin) input arguments- Returns:
- the process exit code:
0on success,1for a usage or processing error,2for specific commands' documented "failed check" outcome (e.g.validateon a non-conforming document)
-