# Command line The package installs a `qecx` command, also run as `python -m qecx`. It prints a summary of a QECX file, shows one part of it in detail, or validates it: ```bash qecx steane_7_1_3.qecx # summary of the whole file qecx steane_7_1_3.qecx --section registers # one section in detail qecx steane_7_1_3.qecx --gate cx # a logical gate's operand groups and variants qecx steane_7_1_3.qecx --variant logical_gates.cx.transversal qecx steane_7_1_3.qecx --matrix H_X # a binary matrix from the code section qecx steane_7_1_3.qecx --validate # validation findings ``` The display options `--section`, `--variant`, `--gate`, `--matrix` and `--validate` exclude each other. With none of them, `qecx` prints the summary. The command loads the file without validating it, so an invalid file can still be inspected. `--validate` prints every finding with its rule ID and exits with status 1 when any finding is an error; warnings alone exit with status 0. A file that cannot be loaded, and a `--variant`, `--gate` or `--matrix` that names something the file does not declare, also exit with status 1. Circuits are drawn as text, and `--no-circuit` leaves them out. The command is available with the core install. With the `viewer` extra, its output is formatted with color and syntax highlighting (see [Installation](installation.md)). To try the command on one of the example QECX files distributed with the package, get its path from `qecx.examples`: ```bash qecx "$(python -c 'from qecx import examples; print(examples.path("steane_7_1_3.qecx"))')" ``` Alternatively, download one of the [example QECX files](examples.md#example-files) from the package's source repository and run: ```bash qecx "/path/to/steane_7_1_3.qecx" ``` ## Options This reference is generated from the command's argument parser. % No defaults, as in --help: the help texts state the defaults that matter. ```{argparse} :module: qecx.__main__ :func: build_parser :prog: qecx :nodefault: ```