composer-git-hooks
composer-git-hooks: A cross-platform, Composer-centered way to define and maintain Git hooks. Ranked #13 of 26 in Git Hooks Management Tools by our editors (6.9/10); pricing: Free plan; best for composer-centric PHP repositories.
At a glance
- Editor score6.9 / 10
- PricingFree plan
- Best forComposer-centric PHP repositories
- Free planYes
- Paid fromFree
- Hook stagesAll
- Facts checked20 Oct 2026
Where it wins
- Composer lifecycle integration with project or global hook management
- cghooks commands add, update, remove, list, and test hooks
- Cross-platform support with lock tracking and custom hook options
Where it doesn't
- Designed primarily for PHP projects using Composer
- Self-hosted deployment with community support only
- Global management depends on Git core.hooksPath configuration
Our verdict on composer-git-hooks
composer-git-hooks is an open-source command-line tool for PHP projects that want Git hook definitions maintained through composer.json. Teams configure commands in Composer's extra.hooks section, install the package as a development dependency or globally, and manage hooks with the cghooks binary. It supports Windows, macOS, and Linux, making it suited to solo developers and small to mid-market teams that already organize project tooling around Composer and Git.
The package is distributed as an MIT-licensed Composer package with a free plan and no paid tiers. Setup centers on adding hook definitions to composer.json and installing the package through Composer. cghooks commands cover adding, updating, removing, listing, and testing hooks, while lock-file tracking records installed hooks. Composer lifecycle event integration can connect hook management to existing package workflows. Teams can also configure stop-on-failure behavior for command sequences and choose a Windows Bash compatibility option.
Its strongest fit is a Composer-centric repository that needs shared configuration, all Git hook stages, and both project-specific and global management. Git core.hooksPath support enables global control, while custom hooks extend beyond predefined commands. The trade-off is scope: the tool is intended for PHP projects and its ecosystem centers on Composer and Git, so repositories using other package managers or broader, language-agnostic developer-platform tooling may need an alternative. Deployment is self-hosted, and support is community-based, which suits teams comfortable maintaining their own development tooling.
Your product? Our editors can test composer-git-hooks in depth and publish a review, labelled as paid · from $99/mo →
composer-git-hooks pricing
composer-git-hooks fact sheet
| Free plan | Yes |
|---|---|
| Paid from | Free |
| Hook stages | All |
| Shared configuration | Yes |
| Monorepo support | Not verified |
| CI execution | Not verified |
| Package manager integration | Yes |
| Platform support | Cross-platform |
| Deployment | Self-hosted |
| Platforms | Windows, macOS, Linux |
| Support | Community |
| Built for | Solo, Small business, Mid-market (editorial estimate) |
| Integrations | 2 integrations: Composer, Git |
| Pricing | Free plan |
| Website | github.com |
| Facts checked | 20 Oct 2026 |
composer-git-hooks integrations
composer-git-hooks lists 2 integrations on its own site.
- Composer
- Git
Alternatives to composer-git-hooks
- hkAn open-source, CI-ready hook manager with broad lifecycle and monorepo coverage.8.9
- pre-commitA free, cross-platform framework for standardizing hooks across languages, repositories, and CI.8.8
- HuskyA free, cross-platform Git-hook manager with coverage for every client-side hook.7.9
See all composer-git-hooks alternatives →
Used composer-git-hooks? Be the first to review it
The editor score above is our own research. What this page doesn't have yet is a reader's view — what you used composer-git-hooks for, what worked and what didn't. No stars are seeded and no review is paid for; an editor reads every one before it appears.
Write a reviewTwo minutes · verified accounts only · read by an editor before it appears
Featured on iTechGuides
composer-git-hooks is listed in our Git Hooks Management Tools directory. Add the badge to your site — it links back to this page.
<a href="https://www.itechguides.com/products/composer-git-hooks/"><img src="https://www.itechguides.com/best/badge/composer-git-hooks.svg" alt="Featured on iTechGuides" width="230" height="46"></a>
Reviewed by iTechGuides Editors · Editorial team · Updated Oct 2026
Advertiser disclosure: iTechGuides is reader-supported. Vendors can pay for top positions in our rankings and for a place on other products' pages, and we may earn a commission when you click some links. Bought places stand at the number bought; this page and our disclosure say so. Paying vendors may get a fuller, more detailed review from our editors, and that review can change their score. How we rank.
Last updated · How we research and update