PHPackages                             petecoop/pest-plugin-watch - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. petecoop/pest-plugin-watch

ActiveLibrary[Testing &amp; Quality](/categories/testing)

petecoop/pest-plugin-watch
==========================

A Pest plugin to watch your files and re-run tests on changes.

5.0.0(2w ago)02.5k↑88.9%1MITPHPPHP ^8.3

Since Nov 10Pushed 2w agoCompare

[ Source](https://github.com/petecoop/pest-plugin-watch)[ Packagist](https://packagist.org/packages/petecoop/pest-plugin-watch)[ Docs](https://github.com/petecoop/pest-plugin-watch)[ RSS](/packages/petecoop-pest-plugin-watch/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (6)Versions (3)Used By (1)

Pest Plugin Watch
=================

[](#pest-plugin-watch)

A Pest plugin to watch files and restart Pest when they change.

This is a Pest Watch plugin that works with Pest v4 &amp; v5 and differs from the official Pest Watch plugin which became unsupported. It's now built on the `spatie/file-system-watcher` package which uses the node package `chokidar` under the hood for efficient file watching.

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

[](#installation)

You can install the package via composer:

```
composer require petecoop/pest-plugin-watch --dev
```

In your project, you should have the JavaScript package [`chokidar`](https://github.com/paulmillr/chokidar) installed. You can install it via npm

```
npm install chokidar --save-dev
```

If you are using [Bun](https://bun.sh/), you can install it via:

```
bun a -d chokidar
```

The watcher will automatically use `Bun` if there is a `bun.lock` file in your project.

Usage
-----

[](#usage)

To start Pest in watch mode, run the following command:

```
pest --watch
```

This will restart Pest whenever a file in `src`, `app`, `tests` or `resources/views` changes.

You can override the default paths by providing your own paths, for example inside your `Pest.php` file:

```
Petecoop\PestWatch\Plugin::directories(['src', 'tests', 'custom-dir']);
```

### Code coverage with Laravel Herd

[](#code-coverage-with-laravel-herd)

The watcher preserves the PHP binary and configuration that started it. This allows coverage to be collected on every rerun when using Laravel Herd:

```
herd coverage vendor/bin/pest --coverage --watch
```

and allows `--tia` to work with the watcher:

```
herd coverage vendor/bin/pest --tia --watch
```

###  Health Score

48

—

FairBetter than 94% of packages

Maintenance96

Actively maintained with recent releases

Popularity23

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity52

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.

###  Release Activity

Cadence

Every ~260 days

Total

2

Last Release

19d ago

Major Versions

0.1.0 → 5.0.02026-07-29

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1655361?v=4)[Pete Cooper](/maintainers/petecoop)[@petecoop](https://github.com/petecoop)

---

Top Contributors

[![petecoop](https://avatars.githubusercontent.com/u/1655361?v=4)](https://github.com/petecoop "petecoop (6 commits)")

---

Tags

pluginpestwatchtest watcher

### Embed Badge

![Health badge](/badges/petecoop-pest-plugin-watch/health.svg)

```
[![Health](https://phpackages.com/badges/petecoop-pest-plugin-watch/health.svg)](https://phpackages.com/packages/petecoop-pest-plugin-watch)
```

###  Alternatives

[pestphp/pest

The elegant PHP Testing Framework.

11.6k77.3M24.5k](/packages/pestphp-pest)[spatie/pest-plugin-snapshots

A package for snapshot testing in Pest

401.9M243](/packages/spatie-pest-plugin-snapshots)[pestphp/pest-plugin-browser

Pest plugin to test browser interactions

1344.6M278](/packages/pestphp-pest-plugin-browser)[pestphp/pest-plugin-arch

The Arch plugin for Pest PHP.

4463.1M6.3k](/packages/pestphp-pest-plugin-arch)[defstudio/pest-plugin-laravel-expectations

A plugin to add laravel tailored expectations to Pest

99617.0k9](/packages/defstudio-pest-plugin-laravel-expectations)[pestphp/pest-plugin-stressless

Stressless plugin for Pest

681.1M18](/packages/pestphp-pest-plugin-stressless)

PHPackages © 2026

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