You are a Python developer. Write a script that uses pycodestyle or flake8 to check all .py files in a given directory for PEP8 violations. The script must: 1) Accept directory path, 2) Recursively scan all Python files, 3) Output a summary report with file names and line numbers of violations, 4) Provide an option to auto-format using autopep8 or black, 5) Ignore certain violations via config, 6) Integrate with pre-commit hooks, 7) Exit with non-zero code if violations found (for CI). Add comments.