PHPackages                             robert-grubb/php-hotreload - 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. [CLI &amp; Console](/categories/cli)
4. /
5. robert-grubb/php-hotreload

ActiveLibrary[CLI &amp; Console](/categories/cli)

robert-grubb/php-hotreload
==========================

Hot reload for scripts that stay alive via CLI.

v1.0.4(2y ago)136MITPHPPHP &gt;=8.0.0

Since Jan 10Pushed 2y ago1 watchersCompare

[ Source](https://github.com/RobertGrubb/php-hotreload)[ Packagist](https://packagist.org/packages/robert-grubb/php-hotreload)[ Docs](https://github.com/RobertGrubb/php-hotreload)[ RSS](/packages/robert-grubb-php-hotreload/feed)WikiDiscussions main Synced 1mo ago

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

Hot Reloading for PHP
=====================

[](#hot-reloading-for-php)

This is a simple package that will allow you to live reload a script that would stay alive via a cli command (daemon). For example, if you have a infinite while loop running in a script and do not want to stop and restart every time you make a change, this package will work well for you.

Credit
======

[](#credit)

Thanks to the package `felippe-regazio/php-hot-reloader` for a great way to check for changes with a directory and files.

Installing
==========

[](#installing)

```
composer require robert-grubb/php-hotreload

```

Usage
=====

[](#usage)

```
require_once __DIR__ . '/vendor/autoload.php';

/**
 * Instantiates new HotReloader and listens for changes the directory
 * specified except for the ignored directory.
 */
$hotReloader = new HotReload\Instance([
    'entryFile' => __DIR__ . '/test.php', // Entry file to run command
    'entryArguments' => false, // String of arguments for entry (ex. --foo=bar)
    'rootDirectory' => __DIR__, // The root directory
    'watch' => [ '.' ], // List of files/directories to watch (Relative path to root)
    'ignore' => [ 'ignored' ] // List of files/directories to ignore (Relative path to root)
]);

/**
 * Start the reload watcher
 */
$hotReloader->startWatcher();

```

Preview
=======

[](#preview)

[![](preview.png?raw=true)](preview.png?raw=true)

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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

5

Last Release

857d ago

### Community

Maintainers

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

---

Top Contributors

[![RobertGrubb](https://avatars.githubusercontent.com/u/13295554?v=4)](https://github.com/RobertGrubb "RobertGrubb (9 commits)")

---

Tags

reloadhot

### Embed Badge

![Health badge](/badges/robert-grubb-php-hotreload/health.svg)

```
[![Health](https://phpackages.com/badges/robert-grubb-php-hotreload/health.svg)](https://phpackages.com/packages/robert-grubb-php-hotreload)
```

###  Alternatives

[wp-cli/wp-cli

WP-CLI framework

5.0k17.2M320](/packages/wp-cli-wp-cli)[consolidation/annotated-command

Initialize Symfony Console commands from annotated command class methods.

22569.8M19](/packages/consolidation-annotated-command)[chi-teck/drupal-code-generator

Drupal code generator

26947.8M5](/packages/chi-teck-drupal-code-generator)[seld/cli-prompt

Allows you to prompt for user input on the command line, and optionally hide the characters they type

24725.8M17](/packages/seld-cli-prompt)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[php-tui/php-tui

Comprehensive TUI library heavily influenced by Ratatui

589747.0k6](/packages/php-tui-php-tui)

PHPackages © 2026

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