PHPackages                             nikolaynesov/laravel-command-streaming - 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. nikolaynesov/laravel-command-streaming

ActiveLibrary

nikolaynesov/laravel-command-streaming
======================================

Stream Laravel command output to any filesystem disk (local, S3, etc.)

v1.0.1(3mo ago)01MITPHPPHP ^8.2

Since Jan 25Pushed 3mo agoCompare

[ Source](https://github.com/nikolaynesov/laravel-command-logs)[ Packagist](https://packagist.org/packages/nikolaynesov/laravel-command-streaming)[ RSS](/packages/nikolaynesov-laravel-command-streaming/feed)WikiDiscussions main Synced 1mo ago

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

Laravel Command Streaming
=========================

[](#laravel-command-streaming)

Stream Laravel Artisan command output to any filesystem disk (local, S3, etc.).

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

[](#installation)

```
composer require nikolaynesov/laravel-command-streaming
```

Publish the configuration file:

```
php artisan vendor:publish --tag=command-streaming-config
```

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

[](#configuration)

```
// config/command-streaming.php
return [
    'enabled' => env('COMMAND_STREAMING_ENABLED', false),
    'disk' => env('COMMAND_STREAMING_DISK', 'local'),
    'path_prefix' => 'command-logs',
];
```

Usage
-----

[](#usage)

Add the trait and call `startStreaming()` / `stopStreaming()`:

```
use Illuminate\Console\Command;
use Nikolaynesov\CommandStreaming\Traits\StreamsCommandOutput;

class MyCommand extends Command
{
    use StreamsCommandOutput;

    protected $signature = 'my:command';

    public function handle(): int
    {
        $this->startStreaming();

        $this->info('This output will be streamed!');
        $this->line('Processing...');
        $this->error('Any errors are captured too');

        $this->stopStreaming();
        return 0;
    }
}
```

When `COMMAND_STREAMING_ENABLED=true`, output between `startStreaming()` and `stopStreaming()` is:

1. Displayed in the terminal (as normal)
2. Written to a log file on the configured disk

Storage
-------

[](#storage)

### Local (default)

[](#local-default)

```
COMMAND_STREAMING_ENABLED=true
COMMAND_STREAMING_DISK=local
```

Logs saved to `storage/app/command-logs/`

### S3

[](#s3)

```
COMMAND_STREAMING_ENABLED=true
COMMAND_STREAMING_DISK=s3
```

### Custom Disk

[](#custom-disk)

```
// config/filesystems.php
'command-logs' => [
    'driver' => 's3',
    'key' => env('AWS_ACCESS_KEY_ID'),
    'secret' => env('AWS_SECRET_ACCESS_KEY'),
    'region' => env('AWS_DEFAULT_REGION'),
    'bucket' => env('AWS_COMMAND_LOGS_BUCKET'),
],
```

```
COMMAND_STREAMING_DISK=command-logs
```

Log Format
----------

[](#log-format)

Logs stored at: `{disk}/{path_prefix}/{command-name}/{timestamp}.log`

```
[2025-01-15_10-30-45] Command: my:command
------------------------------------------------------------

Starting...
Processing item 1
Done!

------------------------------------------------------------
[2025-01-15_10-31-02] Command finished

```

Testing
-------

[](#testing)

```
composer install && ./vendor/bin/pest
```

License
-------

[](#license)

MIT

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance80

Actively maintained with recent releases

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

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

2

Last Release

105d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/683b7d77be6bd1b72df2771b2a5efcda8ce65ea9aba24accc4f1c8772e6992d3?d=identicon)[nikolaynesov](/maintainers/nikolaynesov)

---

Top Contributors

[![nikolaynesov](https://avatars.githubusercontent.com/u/17743574?v=4)](https://github.com/nikolaynesov "nikolaynesov (2 commits)")

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/nikolaynesov-laravel-command-streaming/health.svg)

```
[![Health](https://phpackages.com/badges/nikolaynesov-laravel-command-streaming/health.svg)](https://phpackages.com/packages/nikolaynesov-laravel-command-streaming)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M686](/packages/barryvdh-laravel-ide-helper)[laravel/ui

Laravel UI utilities and presets.

2.7k134.9M600](/packages/laravel-ui)[tucker-eric/eloquentfilter

An Eloquent way to filter Eloquent Models

1.8k4.8M26](/packages/tucker-eric-eloquentfilter)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M158](/packages/orchestra-canvas)[sammyjo20/lasso

Lasso - Asset wrangling for Laravel made simple.

355347.9k](/packages/sammyjo20-lasso)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

226102.4k](/packages/erag-laravel-disposable-email)

PHPackages © 2026

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