Command Line

Command Line#

PyVista ships a command-line interface (CLI) for plotting, comparing, converting, and validating mesh files, as well as generating environment reports, without requiring Python code. The CLI is enabled with a standard PyVista installation, e.g.:

pip install pyvista

The CLI can be invoked either with the pyvista command or as a Python module. For example,

pyvista --help

is equivalent to

python -m pyvista --help

Show the output from pyvista --help to show all available arguments and subcommands.

$ pyvista --help
Usage: pyvista COMMAND

╭─ Commands ───────────────────────────────────────────────────────────────────╮
│ plot         Plot one or more mesh files in an interactive window.           │
│ compare      Compare two or more mesh files side-by-side.                    │
│ convert      Convert one or more mesh files to another format.               │
│ validate     Validate data, points, and cells for one or more mesh files.    │
│ report       Generate a PyVista software environment report.                 │
│ --help (-h)  Display this message and exit.                                  │
│ --version    Display application version.                                    │
╰──────────────────────────────────────────────────────────────────────────────╯

The API for each subcommand is documented below.