Text-based User Interfaces (TUIs) are gaining popularity in the Laravel ecosystem, thanks to the powerful capabilities of Laravel Prompts. Developers are leveraging this technology to create innovative TUIs for a variety of tasks. One such tool is Solo for Laravel, a versatile TUI developed by Aaron Francis.
Solo is a package that allows you to run multiple commands at once, to aid in local development. With Solo you can have all the commands needed to run and monitor aspects of your application behind a single command:
php artisan solo
Once started each command will run in its own tab in your terminal allowing easy acces to start and view things like your application logs, HTTP requests, Vite, Queues, Reverb, Pint CS fixes, and much more.
To install Solo, you can run:
composer require aaronfrancis/solo --dev
Then install the Solo Service Provider:
php artisan solo:install
and finally run:
php artisan solo
Solo allows you to execute any command defined within your SoloServiceProvider
. This gives you the flexibility to customize the tool to your exact needs. Add or remove commands, and even choose between Light and Dark themes (or create your own) to create a personalized command-line experience.
Solo::useTheme('dark')
// Commands that auto start.
->addCommands([
EnhancedTailCommand::make('Logs', 'tail -f -n 100 ' . storage_path('logs/laravel.log')),
'Vite' => 'npm run dev',
// 'HTTP' => 'php artisan serve',
'About' => 'php artisan solo:about'
])
Note: As of the writing of this article the package is still in active development, however, it can be used right now and you can follow along as Aaron has been doing some live streams throughout his development process.
Learn more about this package and view the source code on Github.
The post Run multiple CLI commands locally at once with Solo for Laravel appeared first on Laravel News.
Join the Laravel Newsletter to get Laravel articles like this directly in your inbox.