Suggestions appear as you type. Use the up and down arrows to choose one and Enter to open it.

This page's audience our own tag's counts — open to see them
–Visits
–Page views
–Clicks to vendors
–Time on page
–Reading now
Clicks to vendors, by tool
  • –
Top countries
  • –
Devices
  • –

– · visits, page views and clicks counted by our own tag, which counts more than our checked analytics; every figure rounded down · how we count

composer-git-hooks review

Free#13 of 26 in Git Hooks Management Tools

A cross-platform, Composer-centered way to define and maintain Git hooks.

6.9/10Editor score
composer-git-hooks6.9 Visit site

Reviewed by iTechGuides Editors · Editorial team · Updated Oct 2026

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.

composer-git-hooks pros and cons

  • 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

composer-git-hooks fact sheet, pricing and score →

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