PHPackages                             thesis/hot-reload - 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. thesis/hot-reload

ActiveLibrary

thesis/hot-reload
=================

Thesis Hot Reload

0.2.0(1mo ago)05↑2900%[1 PRs](https://github.com/thesis-php/hot-reload/pulls)MITPHPPHP ^8.4CI passing

Since Mar 27Pushed 1mo agoCompare

[ Source](https://github.com/thesis-php/hot-reload)[ Packagist](https://packagist.org/packages/thesis/hot-reload)[ Fund](https://www.tinkoff.ru/cf/5MqZQas2dk7)[ RSS](/packages/thesis-hot-reload/feed)WikiDiscussions 0.2.x Synced 1mo ago

READMEChangelog (4)Dependencies (9)Versions (6)Used By (0)

Thesis Hot Reload
=================

[](#thesis-hot-reload)

Watches files for changes and automatically restarts a command.

Useful for development servers, workers, or any long-running PHP process.

Supports debouncing to avoid redundant restarts when multiple files change at once.

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

[](#installation)

```
composer require thesis/hot-reload --dev
```

Requires PHP 8.4+.

Usage
-----

[](#usage)

```
vendor/bin/hot-reload [options] [--]
```

### Options

[](#options)

OptionDescriptionDefault`--path`Paths to watch (repeatable)`[src]``--ext`File extensions to watch (repeatable; if none, all are watched)`[]``--exclude`Patterns to exclude (repeatable, e.g. `*.generated.php`)`[]``--debounce`Delay in seconds before restarting after a change`0.1`### Examples

[](#examples)

```
# Watch src/, restart on any file change
vendor/bin/hot-reload -- php server.php

# Watch multiple paths, only .php files
vendor/bin/hot-reload --path=src --path=config --ext=php -- php server.php

# Exclude generated files
vendor/bin/hot-reload --path=src --ext=php --exclude='*.generated.php' -- php server.php

# Increase debounce delay (useful when many files change at once)
vendor/bin/hot-reload --debounce=0.5 -- php server.php
```

PHP API
-------

[](#php-api)

You can use the watcher directly in PHP instead of the CLI binary:

```
use Thesis\HotReload\Process\Tty;
use Thesis\HotReload\Target;
use Thesis\HotReload\Watcher;

$exitCode = new Watcher()->watch(
    target: new Target(
        paths: ['src'],
        extensions: ['php'],
        excludes: ['*.generated.php'],
    ),
    start: static fn() => Tty::start(['php', 'server.php']),
    debounce: 0.1,
);

exit($exitCode);
```

`Tty::start()` accepts either a string command or an array of arguments (which will be shell-escaped).

To use a custom process, implement the `Thesis\HotReload\Process` interface.

Roadmap
-------

[](#roadmap)

- `inotify`-based change detector for Linux (event-driven, no polling)

License
-------

[](#license)

MIT

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance90

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity45

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 ~0 days

Total

6

Last Release

46d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2552865?v=4)[Valentin Udaltsov](/maintainers/vudaltsov)[@vudaltsov](https://github.com/vudaltsov)

---

Top Contributors

[![vudaltsov](https://avatars.githubusercontent.com/u/2552865?v=4)](https://github.com/vudaltsov "vudaltsov (12 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/thesis-hot-reload/health.svg)

```
[![Health](https://phpackages.com/badges/thesis-hot-reload/health.svg)](https://phpackages.com/packages/thesis-hot-reload)
```

###  Alternatives

[vimeo/psalm

A static analysis tool for finding errors in PHP applications

5.8k77.5M6.7k](/packages/vimeo-psalm)[danog/madelineproto

Async PHP client API for the telegram MTProto protocol.

3.4k855.0k18](/packages/danog-madelineproto)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19462.3M1.3k](/packages/drupal-core)[amphp/redis

Efficient asynchronous communication with Redis servers, enabling scalable and responsive data storage and retrieval.

165634.7k44](/packages/amphp-redis)[amphp/process

A fiber-aware process manager based on Amp and Revolt.

25552.6M52](/packages/amphp-process)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6939.5M343](/packages/drupal-core-recommended)

PHPackages © 2026

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