PHPackages                             bluora/laravel-folder-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. [CLI &amp; Console](/categories/cli)
4. /
5. bluora/laravel-folder-watcher

Abandoned → [hnhdigital-os/laravel-folder-watcher](/?search=hnhdigital-os%2Flaravel-folder-watcher)Library[CLI &amp; Console](/categories/cli)

bluora/laravel-folder-watcher
=============================

Provides a Laravel console command that can watch a given folder, and any changes are passed to the provided command script.

866PHP

Since Feb 5Pushed 7y agoCompare

[ Source](https://github.com/bluora/laravel-folder-watcher)[ Packagist](https://packagist.org/packages/bluora/laravel-folder-watcher)[ RSS](/packages/bluora-laravel-folder-watcher/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Folder Watcher
======================

[](#laravel-folder-watcher)

Provides a Laravel console command that can watch a given folder, and any changes are passed to the provided command script.

Useful for running as a background task that initiates a virus scan on uploaded files.

Checkout our standalone command line tool inspired by the work we did here. [github.com/hnhdigital-os/fs-watcher](https://github.com/hnhdigital-os/fs-watcher).

[![Latest Stable Version](https://camo.githubusercontent.com/b362920d990975cd801e5a269cd5804ccbe377890e095abc9ad798f8bd5dc3b2/68747470733a2f2f706f7365722e707567782e6f72672f686e686469676974616c2d6f732f6c61726176656c2d666f6c6465722d776174636865722f762f737461626c652e737667)](https://packagist.org/packages/hnhdigital-os/laravel-folder-watcher) [![Total Downloads](https://camo.githubusercontent.com/61bc36b519aa89a98337289f52057d093316a17e055f5457b1303f0988f5aa78/68747470733a2f2f706f7365722e707567782e6f72672f686e686469676974616c2d6f732f6c61726176656c2d666f6c6465722d776174636865722f646f776e6c6f6164732e737667)](https://packagist.org/packages/hnhdigital-os/laravel-folder-watcher) [![Latest Unstable Version](https://camo.githubusercontent.com/04456bb764fd024158f9e445e2b3d45adefe07db17768bc7ce974324cee7012d/68747470733a2f2f706f7365722e707567782e6f72672f686e686469676974616c2d6f732f6c61726176656c2d666f6c6465722d776174636865722f762f756e737461626c652e737667)](https://packagist.org/packages/hnhdigital-os/laravel-folder-watcher) [![License](https://camo.githubusercontent.com/4559908f7581914599b5510589e638147606ab95d28f136cb648a7be5f9dbdc7/68747470733a2f2f706f7365722e707567782e6f72672f686e686469676974616c2d6f732f6c61726176656c2d666f6c6465722d776174636865722f6c6963656e73652e737667)](https://packagist.org/packages/hnhdigital-os/laravel-folder-watcher)

[![Build Status](https://camo.githubusercontent.com/40fa4933f8ebb13f0bcd53326d3998be04c3dd30059a5ce04b383bf0cb2052ba/68747470733a2f2f7472617669732d63692e6f72672f686e686469676974616c2d6f732f6c61726176656c2d666f6c6465722d776174636865722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/hnhdigital-os/laravel-folder-watcher) [![StyleCI](https://camo.githubusercontent.com/e65cc01aab6e60fc759888175e0daea11907ebe425a54c6d4a874d78095073f9/68747470733a2f2f7374796c6563692e696f2f7265706f732f37333338323938342f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/73382984) [![Test Coverage](https://camo.githubusercontent.com/9ddc50ac8b415bcf23d06684b550b3b52ce7571d46a1b847764534b56018a4f4/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f686e686469676974616c2d6f732f6c61726176656c2d666f6c6465722d776174636865722f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/hnhdigital-os/laravel-folder-watcher/coverage) [![Issue Count](https://camo.githubusercontent.com/e4fc4ff1d813569560c8c32fb3fb91f9f90fe21ab335735a2fe64603a51f4d26/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f686e686469676974616c2d6f732f6c61726176656c2d666f6c6465722d776174636865722f6261646765732f69737375655f636f756e742e737667)](https://codeclimate.com/github/hnhdigital-os/laravel-folder-watcher) [![Code Climate](https://camo.githubusercontent.com/9efa745c49450ad3fde5bb015af1a37664178ac4f5d68a852fead9f093e2ba52/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f686e686469676974616c2d6f732f6c61726176656c2d666f6c6465722d776174636865722f6261646765732f6770612e737667)](https://codeclimate.com/github/hnhdigital-os/laravel-folder-watcher)

This package has been developed by H&amp;H|Digital, an Australian botique developer. Visit us at [hnh.digital](http://hnh.digital).

Install
-------

[](#install)

Via composer:

`$ composer require-dev hnhdigital-os/laravel-folder-watcher dev-master`

Enable the console command by editing app/Console/Kernel.php:

```
    /**
     * The Artisan commands provided by your application.
     *
     * @var array
     */
    protected $commands = [
      ...
      Bluora\LaravelFolderWatcher\FolderWatcherCommand::class,
      ...
    ];
```

Usage
-----

[](#usage)

Run the console command using the following:

### Load

[](#load)

Load a given configuration file. This will load a background process for each folder/binary combination.

`# php artisan watcher load --config-file=***`

### Background

[](#background)

Loads a given watch path and binary as a background process.

`# php artisan watcher background --watch-path=*** --binary=*** --script-arguments=***`

### Run

[](#run)

Runs a given watch path and binary.

`# php artisan watcher run --watch-path=*** --binary=*** --script-arguments=***`

### List

[](#list)

Lists all the background watch processes currently active.

`# php artisan watcher list`

### Kill

[](#kill)

Provide a process id (from the list action) to stop it running. Using --pid=all will stop all processes.

`# php artisan watcher kill --pid=***`

Configuration file
------------------

[](#configuration-file)

You can provide any yaml based file as input to this command using the load action and the --config-file argument.

The yaml file is in the following format:

```
[folder path]:
    - [binary]: [arguments]
```

- \[folder path\]: The directory that will be watched for changes. The watcher recursively adds all child folders.
- \[binary\]: The binary that we will run. This could be an absolute path or an alias. (eg php)
- \[arguments\]: The arguments that need to be given to the binary. Use the placeholders below to allow the watcher to pass this through.

### Command placeholders

[](#command-placeholders)

- {{file-path}}: The absolute file path to the changed file.
- {{root-path}}: The base directory of the watcher.
- {{file-removed}}: Boolean (1 or 0) to indicate if the file was deleted.

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

[](#contributing)

Please see [CONTRIBUTING](https://github.com/hnhdigital-os/laravel-folder-watcher/blob/master/CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Rocco Howard](https://github.com/therocis)
- [All Contributors](https://github.com/hnhdigital-os/laravel-folder-watcher/contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](https://github.com/hnhdigital-os/laravel-folder-watcher/blob/master/LICENSE) for more information.

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/5270e3a3d1add4e39f12dfde3ce549999a26f759d7128056083ab07f475259f2?d=identicon)[bluora](/maintainers/bluora)

---

Top Contributors

[![RoccoHoward](https://avatars.githubusercontent.com/u/227896?v=4)](https://github.com/RoccoHoward "RoccoHoward (35 commits)")

### Embed Badge

![Health badge](/badges/bluora-laravel-folder-watcher/health.svg)

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

###  Alternatives

[seld/cli-prompt

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

24726.4M22](/packages/seld-cli-prompt)[illuminate/console

The Illuminate Console package.

13045.3M6.2k](/packages/illuminate-console)[styleci/cli

The CLI tool for StyleCI

71464.1k9](/packages/styleci-cli)[winbox/args

Windows command-line formatter

20718.9k21](/packages/winbox-args)

PHPackages © 2026

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