PHPackages                             jamesjulius/laravel-nexus - 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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. jamesjulius/laravel-nexus

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

jamesjulius/laravel-nexus
=========================

Laravel Nexus - Your central hub for queue worker management with auto-discovery, live logging, and file watching

v1.1.0(9mo ago)04MITPHPPHP ^8.1CI failing

Since Jun 18Pushed 3mo agoCompare

[ Source](https://github.com/james-julius/laravel-nexus)[ Packagist](https://packagist.org/packages/jamesjulius/laravel-nexus)[ Docs](https://github.com/jamesjulius/laravel-nexus)[ RSS](/packages/jamesjulius-laravel-nexus/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (10)Versions (3)Used By (0)

Laravel Nexus
=============

[](#laravel-nexus)

[![Latest Version on Packagist](https://camo.githubusercontent.com/ee696b2665f70c3779c9783e414b8d0eb4e59665c3aba4e0c6432906d1e9dc04/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a616d65736a756c6975732f6c61726176656c2d6e657875732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jamesjulius/laravel-nexus)[![Total Downloads](https://camo.githubusercontent.com/f2004bb93a7f09841a770f116fc71ee4ba05946ad0eaf1a960688594b3b38d5a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a616d65736a756c6975732f6c61726176656c2d6e657875732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jamesjulius/laravel-nexus)[![GitHub Tests Action Status](https://camo.githubusercontent.com/5a0cb465c968e49b26b949056f40b1129c7c26389059cded286e549024325a08/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a616d65736a756c6975732f6c61726176656c2d6e657875732f63692e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/jamesjulius/laravel-nexus/actions?query=workflow%3Aci+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/5859574c4482b4636b8090f24de186b9ac8e1e40336bca59975966e54c7a4cfb/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a616d65736a756c6975732f6c61726176656c2d6e657875732f63692e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/jamesjulius/laravel-nexus/actions?query=workflow%3Aci+branch%3Amain)[![License](https://camo.githubusercontent.com/904bfc6e3249779059c89827d6ba22f8ebf9e33c17f97859264cdc605e919bc7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6a616d65736a756c6975732f6c61726176656c2d6e657875732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jamesjulius/laravel-nexus)

**Laravel Nexus** is your central hub for queue worker management. It automatically discovers your queues, provides interactive configuration, and manages multiple workers with beautiful real-time logging and hot reload capabilities.

🤔 Why Laravel Nexus?
--------------------

[](#-why-laravel-nexus)

**Tired of this?** 😤

```
# The daily struggle with complex Laravel apps...
php artisan queue:work --queue=default &
php artisan queue:work --queue=broadcasting --timeout=30 &
php artisan queue:work --queue=mail --timeout=120 &
php artisan queue:work --queue=notifications --sleep=1 &
php artisan queue:work --queue=edi-processing --timeout=300 --memory=256 &
php artisan queue:work --queue=payments --tries=5 &

# ...and trying to manage/monitor them all locally! 😵‍💫
```

**Laravel Nexus was born from this exact frustration!**

Instead of juggling multiple terminal windows and remembering different queue configurations, Laravel Nexus lets you:

✨ **Run ONE command** to manage ALL your queues 🔍 **Auto-discover** all queues in your app ⚙️ **Configure once**, run everywhere 📺 **Monitor everything** in one beautiful interface

```
# The Laravel Nexus way ✨
php artisan nexus:work --log
```

**That's it!** All your queues running with optimized settings, beautiful logs, and zero mental overhead.

✨ Features
----------

[](#-features)

- 🔍 **Auto-Discovery** - Scans Jobs, Events, Mail, Notifications, and Listeners
- ⚙️ **Interactive Setup** - Beautiful Laravel Prompts for easy configuration
- 📺 **Live Log Streaming** - Real-time, color-coded worker output
- 🎛️ **Process Management** - Start, stop, restart, and monitor workers
- 🔥 **Hot Reload** - Auto-restart workers when files change (perfect for development)
- 🔄 **Auto-restart** - Responds to Laravel's `queue:restart` signals
- 📊 **Smart Defaults** - Optimized settings based on queue type
- 🚀 **Production Ready** - Built for reliability and performance
- ✅ **Thoroughly Tested** - Comprehensive test suite with 31 tests covering all functionality

🧪 Testing &amp; Quality
-----------------------

[](#-testing--quality)

Laravel Nexus is thoroughly tested with a comprehensive test suite:

- **31 Tests** covering all package functionality
- **Unit Tests** for core services and queue discovery
- **Feature Tests** for all commands and workflows
- **Architecture Tests** ensuring code quality and standards
- **CI/CD Pipeline** testing against PHP 8.1, 8.2, 8.3, 8.4 and Laravel 10.x, 11.x, 12.x
- **Code Style** enforcement with Laravel Pint
- **Security Auditing** with automated dependency scanning

```
# Run the test suite
composer test

# Check code formatting
composer format-test

# Auto-fix code style
composer format
```

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

[](#installation)

Install the package via Composer:

```
composer require jamesjulius/laravel-nexus --dev
```

The package will automatically register its service provider.

Optionally, publish the configuration file:

```
# Simple way
php artisan nexus:publish

# Or using vendor:publish directly
php artisan vendor:publish --provider="JamesJulius\LaravelNexus\NexusServiceProvider" --tag="nexus-config"
```

Quick Start
-----------

[](#quick-start)

### 1. Interactive Setup (Recommended)

[](#1-interactive-setup-recommended)

Run the interactive configuration to discover and set up your queues:

```
php artisan nexus:configure
```

This will:

- 🔍 Scan your app for Jobs, Events, Mail, and Notifications
- 📋 Show discovered queues with job counts and statistics
- ⚙️ Let you configure worker settings interactively
- 💾 Save configuration to `config/nexus.php`
- 🚀 Optionally start workers immediately

### 2. Start Workers

[](#2-start-workers)

Start your configured workers:

```
# Basic daemon mode
php artisan nexus:work

# Development with live logs
php artisan nexus:work --log

# Development with hot reload
php artisan nexus:work --watch

# Debug mode with job IDs and timestamps
php artisan nexus:work --detailed
```

### 3. Management Commands

[](#3-management-commands)

```
# Publish configuration (optional)
php artisan nexus:publish

# Check worker status
php artisan nexus:work --status

# Stop all workers
php artisan nexus:work --stop

# Restart all workers
php artisan nexus:work --restart

# Get comprehensive help
php artisan nexus:help
```

Commands Reference
------------------

[](#commands-reference)

### Configuration Management

[](#configuration-management)

```
# Publish configuration file
php artisan nexus:publish
php artisan nexus:publish --force  # Overwrite existing

# Interactive setup flow
php artisan nexus:configure

# Discovery only (no configuration)
php artisan nexus:configure --discover

# List all jobs by queue
php artisan nexus:configure --list-jobs

# List jobs for specific queue
php artisan nexus:configure --list-jobs --queue=broadcasting
```

### Worker Management

[](#worker-management)

```
# Start all workers
php artisan nexus:work

# Start with live log streaming
php artisan nexus:work --log

# Start with detailed logging (job IDs, dates, colors)
php artisan nexus:work --detailed

# Start with file watching + auto-reload
php artisan nexus:work --watch

# Worker lifecycle management
php artisan nexus:work --status    # Check status
php artisan nexus:work --stop      # Stop all workers
php artisan nexus:work --restart   # Restart workers

# Start specific worker only
php artisan nexus:work --worker=broadcasting
```

### Help &amp; Documentation

[](#help--documentation)

```
# Comprehensive help guide
php artisan nexus:help

# Command-specific help
php artisan help nexus:configure
php artisan help nexus:work
```

Configuration
-------------

[](#configuration)

The package automatically generates a `config/nexus.php` file with your queue configurations:

```
