# captainhook-git/captainhook

CaptainHook is a very flexible git hook manager for software developers that makes sharing git hooks with your team a breeze.

Repository: https://github.com/captainhook-git/captainhook
Canonical: https://ross.abutalabs.com/products/captainhook
Homepage: http://captainhook.info
Language: PHP
License: MIT
License Family: permissive
Topics: php, git, git-hooks, hacktoberfest, automation, code-quality
Last push: 2026-03-25T21:46:58+00:00

## Health v2 (maintenance only)
Score: 80/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 74, release rhythm 76, longevity 100
- inputs: {"age_days": 3680, "days_push": 161, "days_rel": 161, "gap_med": 5, "n_releases_24m": 36}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1115, forks 88 (observed 2026-08-28T04:03:38.346981+00:00)

## What it is
CaptainHook is a flexible git hook manager for PHP developers that lets teams configure git hook actions in a JSON file. It supports built-in validators, custom PHP classes, and CLI commands to enforce code quality and commit standards.

## Use cases
- validate commit messages before committing
- run unit tests before pushing to git
- enforce coding standards on commit
- share git hooks across a team
- install composer dependencies after pulling changes
- prevent commits that break tests

## When to choose
- your team uses PHP and wants configurable, shareable git hooks
- you need to enforce commit message formats or pre-push test runs
- you want hooks defined declaratively in a JSON config

## When to avoid
- you need a language-agnostic hook manager (consider the Go version or husky)
- your project is not using git
- you only need a single simple hook script

## Facets
- artifact type: cli-tool
- maturity: active
- function: developer-tools, cli, code-review, testing, workflow-automation
- domain: developer-tools, version-control
- platform: php, cli, cross-platform
- tags: git-hooks, pre-commit, commit-validation, code-quality, php, automation, command-line

## Member repositories
- captainhook-git/captainhook (main) score 80

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:38.346981+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:42:09.901163+00:00, confidence not recorded.
  - readme: https://github.com/captainhook-git/captainhook (fetched 2026-08-28T04:03:38.346981+00:00, sha d8634e3a48be)
  - homepage: http://captainhook.info (fetched 2026-08-29T12:45:54.777023+00:00, sha 25c629306038)
- Data as of 2026-08-30T08:39:29.467469+00:00.
