PHPackages                             cocur/watchman - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. cocur/watchman

ActiveLibrary[File &amp; Storage](/categories/file-storage)

cocur/watchman
==============

PHP wrapper for facebook/watchman

v0.1(12y ago)81.0kMITPHPPHP &gt;=5.4

Since Apr 27Pushed 12y ago1 watchersCompare

[ Source](https://github.com/cocur/watchman)[ Packagist](https://packagist.org/packages/cocur/watchman)[ RSS](/packages/cocur-watchman/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (1)Dependencies (5)Versions (2)Used By (0)

cocur/watchman
==============

[](#cocurwatchman)

> PHP wrapper for [`facebook/watchman`](https://github.com/facebook/watchman).

[![Latest Stable Version](https://camo.githubusercontent.com/527efc7bea21f5c50d6373006cf8f3dfef05143596679d2c33229832f0f9e44c/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636f6375722f77617463686d616e2e737667)](https://packagist.org/packages/cocur/watchman)[![Build Status](https://camo.githubusercontent.com/0373dde102e1e755939875f42cce5d2f5a91c9dda4b319eec535de8b6f166ee4/687474703a2f2f696d672e736869656c64732e696f2f7472617669732f636f6375722f77617463686d616e2e737667)](https://travis-ci.org/cocur/watchman)[![Code Coverage](https://camo.githubusercontent.com/0f9dc72b631db2294113c3f7f8cdb79d3200c192e09fb82eb4ca77964db84a59/687474703a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f636f6375722f77617463686d616e2e737667)](https://coveralls.io/r/cocur/watchman)

Features
--------

[](#features)

- Simple PHP wrapper for [`facebook/watchman`](https://github.com/facebook/watchman)
- Add, list and delete watched directories
- Add, list and delete triggers
- Compatible with PHP &gt;= 5.4 and [HHVM](http://hhvm.com/)

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

[](#installation)

You can install `cocur/watchman` through [Composer](https://getcomposer.org):

```
$ composer require cocur/watchman:@stable
```

*In a production environment you should replace `@stable` with the [version](https://github.com/cocur/watchman/releases) you want to use.*

Usage
-----

[](#usage)

```
use Cocur\Watchman\Watchman;

$watchman = new Watchman();
$watch = $watchman->addWatch('/var/www/foobar');
$trigger = $watch->addTrigger('foo', '*.js', 'ls -al');

// Retrieve all watched directories
$watched = $watchman->listWatches();

// Retrieve all triggers from a watch
$triggers = $watch->listTriggers();

// Later...
$trigger->delete();
$watch->delete();
```

Supported Watchman commands
---------------------------

[](#supported-watchman-commands)

- watch ✓
- watch-list ✓
- watch-del ✓
- clock ✓
- trigger ✓
- trigger-list ✓
- trigger-del ✓
- find ✓
- query ✓
- since ✓
- log-level ✓
- log ✓
- shutdown-server ✓
- subscribe
- unsubscribe
- get-sockname ✓

Changelog
---------

[](#changelog)

### Version 0.1 (27 April 2014)

[](#version-01-27-april-2014)

- Initial release
- Add, delete and list watched directories
- Add, delete and list triggers

Author
------

[](#author)

[**Florian Eckerstorfer**](http://florian.ec)

- [Twitter](http://twitter.com/Florian_)

License
-------

[](#license)

The MIT license applies to **cocur/watchman**. For the full copyright and license information, please view the LICENSE file distributed with this source code.

###  Health Score

26

—

LowBetter than 40% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4495d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a80f9fc61cd3a7d7779e8f120b458ca4d18fdd885d719bb77d3379b96bf714d9?d=identicon)[florianeckerstorfer](/maintainers/florianeckerstorfer)

---

Tags

filesystemwatchwatchman

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/cocur-watchman/health.svg)

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

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k39.6k](/packages/matomo-matomo)[tempest/framework

The PHP framework that gets out of your way.

2.3k37.6k21](/packages/tempest-framework)[illuminate/console

The Illuminate Console package.

13046.6M7.3k](/packages/illuminate-console)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.8M672](/packages/shopware-core)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45844.8k1](/packages/pressbooks-pressbooks)[illuminate/process

The Illuminate Process package.

44926.6k129](/packages/illuminate-process)

PHPackages © 2026

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