PHPackages                             tomatophp/console-helpers - 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. tomatophp/console-helpers

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

tomatophp/console-helpers
=========================

tons of helper you need for you artisan command line application

v1.1.0(3y ago)5387.2k↓12.9%320MITPHP

Since Jan 31Pushed 1y ago1 watchersCompare

[ Source](https://github.com/tomatophp/console-helpers)[ Packagist](https://packagist.org/packages/tomatophp/console-helpers)[ GitHub Sponsors](https://github.com/3x1io)[ RSS](/packages/tomatophp-console-helpers/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (20)

[![Screenshot](https://raw.githubusercontent.com/tomatophp/console-helpers/blob/master/art/screenshot.png)](https://raw.githubusercontent.com/tomatophp/console-helpers/blob/master/art/screenshot.png)

Laravel Console Helpers
=======================

[](#laravel-console-helpers)

[![Latest Stable Version](https://camo.githubusercontent.com/1be2a4a9d21a534fd278ce6844c008e8f5a836a9578e73e3a55d5979536553a1/68747470733a2f2f706f7365722e707567782e6f72672f746f6d61746f7068702f636f6e736f6c652d68656c706572732f76657273696f6e2e737667)](https://packagist.org/packages/tomatophp/console-helpers)[![License](https://camo.githubusercontent.com/4a4ece35dfb761eeeb885989c83e0c8f86ed7a34ffedde03ec20c93a0f9fe29a/68747470733a2f2f706f7365722e707567782e6f72672f746f6d61746f7068702f636f6e736f6c652d68656c706572732f6c6963656e73652e737667)](https://packagist.org/packages/tomatophp/console-helpers)[![Downloads](https://camo.githubusercontent.com/f2aee3f9d7f79eba0b63f728eb526c55d5675222cc0ed38f02350abaa5fb52da/68747470733a2f2f706f7365722e707567782e6f72672f746f6d61746f7068702f636f6e736f6c652d68656c706572732f642f746f74616c2e737667)](https://packagist.org/packages/tomatophp/console-helpers)

tons of helper you need for you artisan command line application

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

[](#installation)

```
composer require tomatophp/console-helpers
```

Usage
-----

[](#usage)

we have Traits that you can use in your artisan command class

### Run PHP Command

[](#run-php-command)

you can run direct php command like this

```
use TomatoPHP\ConsoleHelpers\Traits\RunCommand;

class MyCommand extends Command{
    use RunCommand;

    public function handle(){
       $this->phpCommand('echo "welcome";');
    }
}
```

Run Yarn Command
----------------

[](#run-yarn-command)

you can run direct yarn commands like this

```
use TomatoPHP\ConsoleHelpers\Traits\RunCommand;

class MyCommand extends Command{
    use RunCommand;

    public function handle(){
       $this->yarnCommand('echo "welcome";');
    }
}
```

**NOTE:** you can update the yarn path from the config file.

Run Artisan Command
-------------------

[](#run-artisan-command)

you can direct run the artisan command by using this method

```
use TomatoPHP\ConsoleHelpers\Traits\RunCommand;

class MyCommand extends Command{
    use RunCommand;

    public function handle(){
       $this->artisanCommand('migrate');
    }
}
```

Handle Stubs File Template
--------------------------

[](#handle-stubs-file-template)

you can handle stubs file templates and copy change or add new data by using this method

```
use TomatoPHP\ConsoleHelpers\Traits\HandleStub;

class MyCommand extends Command{
    use HandleStub;

    public function handle(){
        $this->generateStubs(
            from: __DIR__ . "/stubs/SettingsClass.stub",
            to: "Modules/Base/Settings/MainSettings.php",
            replacements: [
                "settingName" => "site_url",
                "moduleName" => "Base",
                "settingField" => Str::lower("site_url")
            ],
            directory: [
                "Modules/Base/Settings/"
            ],
            append: false
        );
    }
}
```

Handel Modules Actions
----------------------

[](#handel-modules-actions)

this command is working with laravel-modules you can activate all modules or stop all modules or actively selected modules by this method

```
use TomatoPHP\ConsoleHelpers\Traits\HandleModules;

class MyCommand extends Command{
    use HandleModules;

    public function handle(){
        $this->activeAllModules();
        $this->stopAllModules();
    }
}
```

this method takes 2 parameters first is the module name and the second is the active/stop bool by default is true

```
$this->activeModule("Base");
```

Other Filament Packages
-----------------------

[](#other-filament-packages)

Checkout our [Awesome TomatoPHP](https://github.com/tomatophp/awesome)

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity42

Moderate usage in the ecosystem

Community28

Small or concentrated contributor base

Maturity46

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

Total

2

Last Release

1191d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2147eb2fca7ab5f0124d0fafd88ba2d2a5dfa3a0036fb8872d1084b7cba29366?d=identicon)[fadymondy](/maintainers/fadymondy)

![](https://www.gravatar.com/avatar/809bc5f4a4ab60764ebeceed2fd4156b85118e5abe77a66a50977c083f1cc7ca?d=identicon)[queents](/maintainers/queents)

---

Top Contributors

[![fadymondy](https://avatars.githubusercontent.com/u/11937812?v=4)](https://github.com/fadymondy "fadymondy (7 commits)")

---

Tags

artisancommandconsolehelperlaravelconsolehelpersartisancommandapplicationline

### Embed Badge

![Health badge](/badges/tomatophp-console-helpers/health.svg)

```
[![Health](https://phpackages.com/badges/tomatophp-console-helpers/health.svg)](https://phpackages.com/packages/tomatophp-console-helpers)
```

###  Alternatives

[nunomaduro/collision

Cli error handling for console/command-line PHP applications.

4.6k331.8M8.5k](/packages/nunomaduro-collision)[helhum/typo3-console

A reliable and powerful command line interface for TYPO3 CMS

2939.0M192](/packages/helhum-typo3-console)[nunomaduro/laravel-console-menu

Laravel Console Menu is an output method for your Laravel/Laravel Zero commands.

815412.0k48](/packages/nunomaduro-laravel-console-menu)[nunomaduro/laravel-console-task

Laravel Console Task is a output method for your Laravel/Laravel Zero commands.

2582.1M11](/packages/nunomaduro-laravel-console-task)[adhocore/cli

Command line interface library for PHP

3501.2M50](/packages/adhocore-cli)[aplus/cli

Aplus Framework CLI Library

2301.7M6](/packages/aplus-cli)

PHPackages © 2026

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