# BrainMaestro/composer-git-hooks

Easily manage git hooks in your composer config

Repository: https://github.com/BrainMaestro/composer-git-hooks
Canonical: https://ross.abutalabs.com/products/composer-git-hooks
Language: PHP
License: MIT
License Family: permissive
Topics: composer, composer-package, command-line, command-line-tool, git, githook, php, php7, git-hooks, composer-event
Last push: 2024-06-22T09:18:12+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 3467, "days_push": 802, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1085, forks 89 (observed 2026-08-28T04:03:32.184562+00:00)

## What it is
A Composer package that lets PHP projects define and manage git hooks directly in composer.. It installs a `cghooks` binary that adds, updates, removes, and tests hooks so the whole team shares a consistent hook setup.

## Use cases
- manage git hooks in composer.
- share pre-commit hooks across a PHP team
- run php-cs-fixer and phpunit on pre-push
- enforce commit message format with commit-msg hook
- install git hooks globally for all repositories
- add custom git hooks like git-flow hooks

## When to choose
- your project already uses Composer and you want hooks versioned in composer.
- you want consistent git hooks for every team member with minimal setup
- you want one global set of hooks across all local repositories

## When to avoid
- you use a non-PHP project without Composer
- you need advanced hook management like per-branch or dynamic hooks
- you prefer modern alternatives like Husky-style tools or lefthook

## Facets
- artifact type: cli-tool
- maturity: maintenance
- function: cli, developer-tools, configuration-management, ci-cd
- domain: developer-tools, version-control
- platform: cli, php, cross-platform
- tags: git-hooks, composer, composer-plugin, php, pre-commit, workflow-automation, command-line, automation

## Member repositories
- BrainMaestro/composer-git-hooks (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:32.184562+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:49:40.487676+00:00, confidence not recorded.
  - readme: https://github.com/BrainMaestro/composer-git-hooks (fetched 2026-08-28T04:03:32.184562+00:00, sha 0e68b8dff4da)
- Data as of 2026-08-30T08:39:29.467469+00:00.
