Composer-Plugin handling your git-hooks

Fund package maintenance!

Installs: 349

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 3

Type:composer-plugin 2019-08-16 17:28 UTC

This package is auto-updated.

Last update: 2023-01-17 01:10:07 UTC


This is a composer-plugin that installs CaptainHook and the corresponding git hooks. For more information visit its Website.

Latest Stable Version Minimum PHP Version Downloads License


As this is a composer-plugin the preferred method is to use composer for installation.

$ composer require --dev captainhook/plugin-composer

Everything else will happen automagically.


You can set a custom name for your hook configuration and a custom path to your .git directory if it is not located in the same directory as your composer.json file. Just add these values to your composer.json in the extra section first.

  "extra": {
    "captainhook-config": "hooks.json",
    "captainhook-git-dir": "../.git"

If you want to see the installation in action have a look at this short installation video.

Install demo

A word of warning

It is still possible to commit without invoking the hooks. So make sure you run appropriate backend-sanity checks on your code!