PHPackages                             webestit/githooks - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [DevOps &amp; Deployment](/categories/devops)
4. /
5. webestit/githooks

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

webestit/githooks
=================

Repository-Managed Git Hooks: language-agnostic, POSIX-compliant

v1.0.1(4mo ago)16MITShell

Since Jan 6Pushed 4mo agoCompare

[ Source](https://github.com/webestit/githooks)[ Packagist](https://packagist.org/packages/webestit/githooks)[ Docs](https://github.com/webestit/githooks)[ RSS](/packages/webestit-githooks/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

[![License: MIT License](https://camo.githubusercontent.com/82482628ef226b43c2a95ba5bea860c7a0f6aba79640be1a12254f468fc541ba/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d6d69742d626c75652e737667)](https://camo.githubusercontent.com/82482628ef226b43c2a95ba5bea860c7a0f6aba79640be1a12254f468fc541ba/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d6d69742d626c75652e737667)[![Latest Stable Version](https://camo.githubusercontent.com/89e6657496c9ad763e9357d7b5580edf795ed2aefecd12e323a74e2b231ab0df/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f77656265737469742f676974686f6f6b732e737667)](https://camo.githubusercontent.com/89e6657496c9ad763e9357d7b5580edf795ed2aefecd12e323a74e2b231ab0df/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f77656265737469742f676974686f6f6b732e737667)[![Total Downloads](https://camo.githubusercontent.com/cec5d2667a9a204e52f3214b5a7be1896e51a28887205cfc7229431aac3058cd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f77656265737469742f676974686f6f6b732e737667)](https://camo.githubusercontent.com/cec5d2667a9a204e52f3214b5a7be1896e51a28887205cfc7229431aac3058cd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f77656265737469742f676974686f6f6b732e737667)[![GitHub issues](https://camo.githubusercontent.com/1c0f0e01cb206a0ceb0a31daf370d472bea0100fad2b640fea321ba754a96d5b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f77656265737469742f676974686f6f6b732e737667)](https://camo.githubusercontent.com/1c0f0e01cb206a0ceb0a31daf370d472bea0100fad2b640fea321ba754a96d5b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f77656265737469742f676974686f6f6b732e737667)[![GitHub forks](https://camo.githubusercontent.com/7bdea37837ec70d86cdaf3ea038667dfddfd6e91a6d65389b879d47da1e84671/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f77656265737469742f676974686f6f6b732e7376673f7374796c653d736f6369616c)](https://camo.githubusercontent.com/7bdea37837ec70d86cdaf3ea038667dfddfd6e91a6d65389b879d47da1e84671/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f77656265737469742f676974686f6f6b732e7376673f7374796c653d736f6369616c)[![GitHub stars](https://camo.githubusercontent.com/d0ca73a508013d9205555939fce8abf2025a72eff2cc05a9ec5cf4603cc40fde/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f77656265737469742f676974686f6f6b732e7376673f7374796c653d736f6369616c)](https://camo.githubusercontent.com/d0ca73a508013d9205555939fce8abf2025a72eff2cc05a9ec5cf4603cc40fde/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f77656265737469742f676974686f6f6b732e7376673f7374796c653d736f6369616c)

🪝 Repository-Managed Git Hooks
==============================

[](#-repository-managed-git-hooks)

This package allows you to manage Git hooks centrally within your repository. It's language-agnostic and only requires Git and a POSIX-compliant shell (like `sh`, `bash`, `dash`, or `zsh`).

🚀 Installation
--------------

[](#-installation)

1. Add post-install/update scripts to your composer.json
    (so the package automatically configures git hooks):

    ```
    {
        "scripts": {
            "post-install-cmd": [
               "@composer exec githooks install"
            ],
            "post-update-cmd": [
               "@composer exec githooks install"
            ]
        }
    }
    ```
2. Install the package:

    ```
    composer require webestit/githooks
    ```

The package will automatically:

1. Configure `core.hooksPath` to point to its own `hooks` directory.
2. Create a `.githooks` directory in your project root with subdirectories for common hooks.

ℹ️ How it works
---------------

[](#ℹ️-how-it-works)

- The package sets Git's `core.hooksPath` to its directory which contains [all Git hooks](https://git-scm.com/docs/githooks).
- Every Git hook executes all executable scripts found in your project's `.githooks//` directory.
- Scripts are executed in **alphabetical order** (e.g., `01-check.sh`, `02-test.sh`).

➕ Adding hooks to your project
------------------------------

[](#-adding-hooks-to-your-project)

1. Go to the `.githooks//` directory in your project root.
2. Add your shell script: ```
    # Example: .githooks/pre-commit/01-lint.sh
    #!/bin/sh
    echo "Running linter..."
    # your logic here
    ```
3. Make it executable: ```
    chmod +x .githooks/pre-commit/01-lint.sh
    ```

💡 Examples
----------

[](#-examples)

You can find example hooks in the package's `examples` directory. Feel free to copy and adapt them to your project's `.githooks/` folder.

⚠️ Bypassing hooks temporarily
------------------------------

[](#️-bypassing-hooks-temporarily)

You can bypass hooks using `--no-verify`:

```
git commit --no-verify
```

⚠️ Disabling repository hooks
-----------------------------

[](#️-disabling-repository-hooks)

To stop using these managed hooks and return to Git defaults:

```
git config --unset core.hooksPath
```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance76

Regular maintenance activity

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

132d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9bbe5ef6a5fd8097943495dcc9726405c7003cb144f09de75989038f95de2865?d=identicon)[yurii-zadryhun](/maintainers/yurii-zadryhun)

---

Top Contributors

[![yurii-zadryhun](https://avatars.githubusercontent.com/u/30027592?v=4)](https://github.com/yurii-zadryhun "yurii-zadryhun (13 commits)")

---

Tags

devgithookscideveloper-toolsconventional-commitspre-commitpre-pushcommit-msggit-hooksgithookshusky

### Embed Badge

![Health badge](/badges/webestit-githooks/health.svg)

```
[![Health](https://phpackages.com/badges/webestit-githooks/health.svg)](https://phpackages.com/packages/webestit-githooks)
```

###  Alternatives

[captainhook/captainhook

PHP git hook manager

1.1k6.8M370](/packages/captainhook-captainhook)[ramsey/conventional-commits

A PHP library for creating and validating commit messages according to the Conventional Commits specification. Includes a CaptainHook action!

1931.2M122](/packages/ramsey-conventional-commits)[projektgopher/whisky

A simple CLI tool for managing a project's git hooks across multiple members.

241281.3k20](/packages/projektgopher-whisky)[igorsgm/laravel-git-hooks

🪝• Efficiently manage Git hooks in Laravel projects. Enhance code quality, save time on reviews, and prevent bugs from entering your repository.

2931.7k1](/packages/igorsgm-laravel-git-hooks)[bernardosilva/git-hooks-php

Composer git-hook package with hooks for your php projects.

2516.7k1](/packages/bernardosilva-git-hooks-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
