cli: Command-line interface for translating and formatting documents with myform#

The module deliberately depends only on the standard library and imports the translator inside the conversion function. This keeps myform --help and argument errors fast, while the actual reader, writer, configuration, and optional assist machinery load only after input validation.

Document text always uses stdout (or the explicit output file). Diagnostics and conversion reports always use stderr, so the command is safe in pipelines.

Command-line interface for translating and formatting documents with myform.

The module deliberately depends only on the standard library and imports the translator inside the conversion function. This keeps myform --help and argument errors fast, while the actual reader, writer, configuration, and optional assist machinery load only after input validation.

Document text always uses stdout (or the explicit output file). Diagnostics and conversion reports always use stderr, so the command is safe in pipelines.

class myform.cli.ExitCode(*values)#

Stable process exit codes for the command-line interface.

myform.cli.main(*vargs: str) → int#

Run the command-line interface and return a process exit code.