PHPackages                             spatie/laravel-horizon-watcher - 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. [DevOps &amp; Deployment](/categories/devops)
4. /
5. spatie/laravel-horizon-watcher

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

spatie/laravel-horizon-watcher
==============================

Automatically restart Horizon when local PHP files change

1.2.0(2mo ago)2631.9M—2.5%22[1 PRs](https://github.com/spatie/laravel-horizon-watcher/pulls)MITPHPPHP ^8.3CI passing

Since Oct 28Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/spatie/laravel-horizon-watcher)[ Packagist](https://packagist.org/packages/spatie/laravel-horizon-watcher)[ Docs](https://github.com/spatie/laravel-horizon-watcher)[ RSS](/packages/spatie-laravel-horizon-watcher/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (20)Versions (23)Used By (0)

Automatically restart Horizon when local PHP files change
=========================================================

[](#automatically-restart-horizon-when-local-php-files-change)

[![Latest Version on Packagist](https://camo.githubusercontent.com/c90f84201dffefa56ac3dc533b9958f093e2222eba66b71f26d46103ff71d713/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7370617469652f6c61726176656c2d686f72697a6f6e2d776174636865722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/spatie/laravel-horizon-watcher)[![Total Downloads](https://camo.githubusercontent.com/e9b3dff4275c780a3e86dd6a9f41d0bb240a7b5a6570b4b1689aa0df69065786/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7370617469652f6c61726176656c2d686f72697a6f6e2d776174636865722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/spatie/laravel-horizon-watcher)

How many hours have lost debugging local jobs only to find out that you forgot to restart Horizon?

This package contains an Artisan command `horizon:watch` that will start Horizon and automatically restart it when any PHP file is created, updated or deleted.

This command is meant to be used in local environment.

[![screenshot](https://github.com/spatie/laravel-horizon-watcher/raw/main/docs/images/screenshot.jpg)](https://github.com/spatie/laravel-horizon-watcher/blob/main/docs/images/screenshot.jpg)

Support us
----------

[](#support-us)

[![](https://camo.githubusercontent.com/b2e591c12b4ce2e9c835bf9f021db709bf57a0a3b88c5a1da171f52da822f4ba/68747470733a2f2f6769746875622d6164732e73332e65752d63656e7472616c2d312e616d617a6f6e6177732e636f6d2f6c61726176656c2d686f72697a6f6e2d776174636865722e6a70673f743d31)](https://spatie.be/github-ad-click/laravel-horizon-watcher)

We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).

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

[](#installation)

You can install the package via composer:

```
composer require spatie/laravel-horizon-watcher --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
```

or Yarn

```
yarn add chokidar --dev
```

Optionally, you can publish the config file with this command:

```
php artisan vendor:publish --tag="horizon-watcher-config"
```

This is the contents of the published config file:

```
return [
    /*
     * Horizon will be restarted when any PHP file inside these directories
     * get created, updated or deleted. You can also specify other kinds
     * of files here.
     */
    'paths' => [
        app_path(),
        config_path(),
        database_path(),
        resource_path('views'),
        base_path('.env'),
        base_path('composer.lock'),
        base_path('bootstrap/app.php'),
        base_path('bootstrap/providers.php'),
    ],

    /*
     * This command will be executed to start Horizon.
     */
    'command' => 'php artisan horizon',
];
```

Usage
-----

[](#usage)

Run `php artisan horizon:watch` to start Horizon. When a PHP file in your project gets created, updated or deleted, Horizon will automatically restart.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Freek Van der Herten](https://github.com/freekmurze)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

65

—

FairBetter than 99% of packages

Maintenance88

Actively maintained with recent releases

Popularity60

Solid adoption and visibility

Community23

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 62.3% 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 ~64 days

Recently: every ~84 days

Total

20

Last Release

67d ago

Major Versions

0.0.5 → 1.0.02022-10-30

PHP version history (3 changes)0.0.1PHP ^8.1

1.1.5PHP ^8.5

1.2.0PHP ^8.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7535935?v=4)[Spatie](/maintainers/spatie)[@spatie](https://github.com/spatie)

---

Top Contributors

[![freekmurze](https://avatars.githubusercontent.com/u/483853?v=4)](https://github.com/freekmurze "freekmurze (86 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (20 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (13 commits)")[![joelvh](https://avatars.githubusercontent.com/u/129096?v=4)](https://github.com/joelvh "joelvh (4 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (4 commits)")[![AlexVanderbist](https://avatars.githubusercontent.com/u/6287961?v=4)](https://github.com/AlexVanderbist "AlexVanderbist (2 commits)")[![riasvdv](https://avatars.githubusercontent.com/u/3626559?v=4)](https://github.com/riasvdv "riasvdv (1 commits)")[![sdapkus](https://avatars.githubusercontent.com/u/58326108?v=4)](https://github.com/sdapkus "sdapkus (1 commits)")[![trippo](https://avatars.githubusercontent.com/u/497169?v=4)](https://github.com/trippo "trippo (1 commits)")[![ypho](https://avatars.githubusercontent.com/u/7271977?v=4)](https://github.com/ypho "ypho (1 commits)")[![francoism90](https://avatars.githubusercontent.com/u/5028905?v=4)](https://github.com/francoism90 "francoism90 (1 commits)")[![JonathanGawrych](https://avatars.githubusercontent.com/u/5134923?v=4)](https://github.com/JonathanGawrych "JonathanGawrych (1 commits)")[![kamilkozak](https://avatars.githubusercontent.com/u/12345872?v=4)](https://github.com/kamilkozak "kamilkozak (1 commits)")[![Nielsvanpach](https://avatars.githubusercontent.com/u/10651054?v=4)](https://github.com/Nielsvanpach "Nielsvanpach (1 commits)")[![rasmuscnielsen](https://avatars.githubusercontent.com/u/8465957?v=4)](https://github.com/rasmuscnielsen "rasmuscnielsen (1 commits)")

---

Tags

developmenthorizonlaravellocalspatielaravellaravel-horizon-watcher

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/spatie-laravel-horizon-watcher/health.svg)

```
[![Health](https://phpackages.com/badges/spatie-laravel-horizon-watcher/health.svg)](https://phpackages.com/packages/spatie-laravel-horizon-watcher)
```

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k89.8M1.0k](/packages/spatie-laravel-permission)[spatie/laravel-data

Create unified resources and data transfer objects

1.7k28.9M627](/packages/spatie-laravel-data)[spatie/laravel-prometheus

Export Laravel metrics to Prometheus

2651.3M6](/packages/spatie-laravel-prometheus)[spatie/laravel-health

Monitor the health of a Laravel application

85810.0M83](/packages/spatie-laravel-health)[spatie/laravel-pdf

Create PDFs in Laravel apps

9963.4M12](/packages/spatie-laravel-pdf)[spatie/laravel-slack-alerts

Send a message to Slack

3212.6M4](/packages/spatie-laravel-slack-alerts)

PHPackages © 2026

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