Start by installing Whisky as a dev dependency:
composer require --dev projektgopher/whisky
./vendor/bin/whisky install
This creates a whisky.json file and symlinks hooks into .git/hooks/. The default setup includes pre-commit (for linting) and pre-push (for tests). For first-time use, verify your hooks are active by checking .git/hooks/, then run a simple git commit to confirm hooks fire as expected.
whisky.json as arrays of shell commands. Use relative paths or Composer scripts (e.g., "./vendor/bin/pint --dirty", "php artisan test").commit-msg that receive arguments, reference $1, $2, etc., escaped in double quotes: "npx -- commitlint --edit \"$1\"".whisky update to composer.json’s post-install-cmd and post-update-cmd to auto-sync hooks on dependency changes.scripts/ directory (e.g., ./scripts/check-changesets.sh) and reference them directly. Ensure chmod +x is applied.git hook run pre-commit to validate hook behavior without making dummy commits.whisky uninstall -n to remove global hooks while preserving whisky.json."disabled": [] in whisky.json for temporary opt-outs (e.g., during feature branches), but avoid committing disables permanently.whisky.json uses forward slashes (/) in paths for portability.git commit --no-verify where supported; for non---no-verify actions (e.g., git merge --continue), run ./vendor/bin/whisky skip-once. Add a shell alias for brevity.whisky validate to catch syntax errors in whisky.json before committing—especially important after editing manually.whisky.json commands; prefer static references to executable scripts to avoid injection or quoting errors.How can I help you explore Laravel packages today?