refactor an image_cli_base class