PHPackages                             stevegrunwell/smee - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. stevegrunwell/smee

Abandoned → [https://github.com/BrainMaestro/composer-git-hooks](/?search=https%3A%2F%2Fgithub.com%2FBrainMaestro%2Fcomposer-git-hooks)ArchivedLibrary[Utility &amp; Helpers](/categories/utility)

stevegrunwell/smee
==================

Library for automatically copying git hooks into a project

212[4 issues](https://github.com/stevegrunwell/smee/issues)PHP

Since Sep 20Pushed 8y agoCompare

[ Source](https://github.com/stevegrunwell/smee)[ Packagist](https://packagist.org/packages/stevegrunwell/smee)[ RSS](/packages/stevegrunwell-smee/feed)WikiDiscussions develop Synced yesterday

READMEChangelogDependenciesVersions (2)Used By (0)

Smee
====

[](#smee)

[![Build Status](https://camo.githubusercontent.com/aaef2effd0c302daee0def077058090a97a82ec7efc779fd06ac70cdb360966a/68747470733a2f2f7472617669732d63692e6f72672f73746576656772756e77656c6c2f736d65652e7376673f6272616e63683d646576656c6f70)](https://travis-ci.org/stevegrunwell/smee)[![Code Climate](https://camo.githubusercontent.com/07a79416f59132a65b3420e1a3aab2839db27ee9c93e04886b91f165e48fff81/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f73746576656772756e77656c6c2f736d65652f6261646765732f6770612e737667)](https://codeclimate.com/github/stevegrunwell/smee)[![Test Coverage](https://camo.githubusercontent.com/5ac5406b4b96e9fb08264c9aa8186512e7a517f10062b717aa54b2497fef89f4/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f73746576656772756e77656c6c2f736d65652f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/stevegrunwell/smee/coverage)[![Packagist](https://camo.githubusercontent.com/95410fdf2e218df6936ef2216a371b3979e0f864df06660b7fdae45d445be3de/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73746576656772756e77656c6c2f736d65652e737667)](https://packagist.org/packages/stevegrunwell/smee)

Smee is a Composer package designed to make it easier to share [Git hooks](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks) with a project.

Why Git hooks?
--------------

[](#why-git-hooks)

[Git hooks](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks) are a useful way to automatically perform actions at different points throughout the Git lifecycle. These actions could include verifying coding standards, running unit tests, enforcing commit message formats, and more.

The *downside* to Git hooks is that they're not distributed with the Git repository, meaning it's difficult to ensure that all developers on a project are using the same hooks.

Smee aims to change that, by introducing the `.githooks` directory and providing an easy way to automatically install the hooks on `composer install`.

Installation
------------

[](#installation)

Smee should be added to your projects via [Composer](https://getcomposer.org):

```
$ composer require --dev stevegrunwell/smee
```

To ensure Smee is automatically run for other users, add Smee to the "post-install-cmd" [Composer event](https://getcomposer.org/doc/articles/scripts.md):

```
{
    "scripts": {
        "post-install-cmd": [
            "smee install"
        ]
    }
}
```

Finally, create a `.githooks` directory in the root of your project, and add the hooks you'd like to use in your project. These files should be committed to the git repository, and will automatically be copied into other developers' local repositories the next time they run `composer install`.

Available Git hooks
-------------------

[](#available-git-hooks)

Git supports a number of hooks, which each fire at different points throughout the lifecycle. Each Git hook exists in a separate file, named after the hook it corresponds to (e.g. `.git/hooks/pre-commit` will be executed on the "pre-commit" hook).

### Commit workflow

[](#commit-workflow)

These are some of the most common Git hooks, firing at different points as a developer attempts to commit code:

 pre-commit Runs before a commit message is created. prepare-commit-msg Run before the commit message editor is opened but after the default message is created. commit-msg Runs before saving the commit message, often used for verifying commit message format. post-commit Runs after a commit has been made. This hook is typically used for notifications.### Email workflow

[](#email-workflow)

[Git also supports an email-based workflow via `git am`](https://git-scm.com/docs/git-am), which applies patches in sequence from a mailbox. If you're using this workflow, [a few additional hooks are available](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks#applypatch-msg).

### Other useful client-side Git hooks

[](#other-useful-client-side-git-hooks)

 pre-rebase Runs before allowing any code to be rebased. post-rewrite Runs after rewriting a commit, e.g. `git commit --amend`. post-checkout Runs after a successful `git checkout` command. post-merge Runs after a successful `git merge` command. pre-push Runs before a `git push` command. pre-auto-gc Runs before Git's periodic garbage collection processes.

###  Health Score

16

—

LowBetter than 4% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/233836?v=4)[Steve Grunwell](/maintainers/stevegrunwell)[@stevegrunwell](https://github.com/stevegrunwell)

---

Top Contributors

[![stevegrunwell](https://avatars.githubusercontent.com/u/233836?v=4)](https://github.com/stevegrunwell "stevegrunwell (62 commits)")

---

Tags

composer-packagegit-hooks

### Embed Badge

![Health badge](/badges/stevegrunwell-smee/health.svg)

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

###  Alternatives

[unifik/database-config-bundle

Allows management of Symfony's container configuration from the database

3012.7k1](/packages/unifik-database-config-bundle)

PHPackages © 2026

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