Command-Line Tools

The multiphasepy package provides a comprehensive suite of command-line tools for CFD workflow management, data processing, and quality assurance. All tools follow the naming convention mpy<function> and provide --help for detailed usage information.

Available Tools

Autocompletion

The command line interface (CLI) of this packages is generated by Click. Click supports tab completion for Bash, Zsh, and Fish.

To enable auto-completion for bash for any of the CLI tools:

_<TOOL>_COMPLETE=bash_source <tool> > ~/.config/bash/.<tool>-complete.bash
echo 'source ~/.config/bash/.<tool>-complete.bash' >> ~/.bashrc

Replace <tool> with the command name (e.g., mpydocker) and <TOOL> with the uppercase version (e.g., MPYDOCKER).

After installation, open a new terminal or reload your shell configuration source ~/.bashrc.

Verbosity and Logging Options

All tools support option to control the verbosity of the tool and to write logging information to stdout or in a log file. Depending on the log level more or less information is given to the user. All tools use the logging package from python:

  • --loglevel LEVEL - Increase verbosity level. Available log levels (from highest to lowest) are DEBUG, INFO, WARNING, ERROR.

  • --nocolor - Disable colorful output for logging information

  • --quiet - Disable any logging to stdout (allows only logging to log file)

  • --logfile LOGFILE - Direct logging output to a log file

  • --prefix PREFIX - Add prefix to log file

  • --suffix SUFFIX - Add suffix to log file

  • --append - Append to existing log

  • --overwrite - Overwrite existing log