Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Hook Installer Laravel Package

captainhook/hook-installer

Composer plugin for CaptainHook that automatically installs and updates your local Git hooks after composer install/update, helping ensure your whole team has hooks enabled. Supports custom config/executable paths and optional force/only-enabled settings.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Standardizing Git Hooks Across Teams: Enables consistent pre-commit, pre-push, or other hook execution without manual setup, reducing friction for developers.
  • Developer Onboarding Efficiency: Automates hook activation during composer install, cutting down on repetitive setup steps and reducing onboarding time.
  • Build vs. Buy: Avoids reinventing a wheel for hook management; leverages a lightweight, MIT-licensed solution instead of custom scripting.
  • Security & Compliance: Supports enforcing code quality checks (e.g., static analysis, tests) via hooks, aligning with engineering best practices.
  • Roadmap for CI/CD Integration: Paves the way for tighter local-to-CI parity by ensuring hooks run identically across environments.
  • Use Cases:
    • PHP/Laravel projects requiring pre-commit validation (e.g., PHPStan, Pest tests).
    • Teams adopting CaptainHook for its flexibility (e.g., custom scripts, multi-stage hooks).
    • Projects where Git hooks are critical but developer compliance is inconsistent.

When to Consider This Package

  • Adopt if:

    • Your team uses CaptainHook or is evaluating it for Git hooks.
    • You need automated hook activation tied to dependency management (Composer).
    • Developers frequently forget to enable hooks manually, causing inconsistencies.
    • Your project relies on pre-commit checks (e.g., linting, tests) but lacks enforcement.
    • You’re using PHP 8.0+ and Composer for dependency management.
  • Look elsewhere if:

    • Your team uses Husky (JavaScript/Node.js) or other non-PHP hook tools.
    • You need cross-language hook support (e.g., Python, Ruby).
    • Your project doesn’t use Composer (e.g., pure Laravel Sail, non-PHP stacks).
    • You require advanced hook customization beyond CaptainHook’s scope (e.g., per-branch hooks).
    • Your team prefers manual hook setup or existing CI-only validation.

How to Pitch It (Stakeholders)

For Executives: "This package automates Git hook setup for our PHP/Laravel teams, ensuring everyone runs critical checks (e.g., tests, security scans) before committing—without manual reminders. It integrates seamlessly with Composer, reducing onboarding time and improving code quality consistency. Low-risk (MIT license, minimal overhead), and it aligns with our shift-left testing goals."

For Engineering/DevOps: *"CaptainHook’s hook-installer lets us enforce pre-commit hooks automatically during composer install, eliminating ‘I forgot to enable hooks’ issues. It’s a lightweight Composer plugin that works with our existing CaptainHook setup. Key benefits:

  • Zero manual setup: Hooks activate post-dependency install.
  • Configurable: Supports selective hook enabling (e.g., only pre-commit).
  • PHP-native: No dependency on Node.js or other toolchains.
  • Future-proof: Plays well with Laravel’s ecosystem and CI/CD pipelines. Tradeoff: Requires CaptainHook adoption first, but the payoff is consistent local validation."*

For Developers: "Tired of remembering to run captainhook install? This plugin does it for you after composer install. Just add it to composer.json, and your hooks (e.g., PHPStan, Pest) run automatically. Customize paths or enabled hooks via config—no more ‘works on my machine’ excuses!"

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky