githooks conf:init¶
Generate the configuration file githooks.php.
Synopsis¶
Interactive mode (default)¶
When run interactively, conf:init detects QA tools installed in vendor/bin/ and guides you through the setup:
- Shows detected tools and asks which to include.
- Asks for source directories (comma-separated, default
src). - Asks which hook events to configure (
pre-commit,pre-push, both, or none). - Generates a tailored
githooks.phpwith the selected tools, paths, and hooks.
Non-interactive mode¶
With --no-interaction (or -n), copies a template file with examples of all supported job types.
Options¶
| Option | Description |
|---|---|
-n, --no-interaction |
Copy template instead of interactive setup. |
--legacy |
Generate v2 format (deprecated). |
See also¶
- Getting Started: Your First Config
githooks conf:check— validate the generated file.