aaronfrancis/solo
最新稳定版本:v0.5.0
Composer 安装命令:
composer require --dev aaronfrancis/solo
包简介
A Laravel package to run multiple commands at once, to aid in local development.
README 文档
README
Your all-in-one Laravel command to tame local development
Solo for Laravel
Important
This package requires ext-pcntl, so it will not work on Windows. Sorry about that. If you know how to fix that, let me know!
About
Solo for Laravel is a package to run multiple commands at once, to aid in local development. All the commands needed to run your application live behind a single artisan command:
php artisan solo
Each command runs in its own tab in Solo. Use the left/right arrow keys to navigate between tabs and enjoy a powerful, unified development environment.
Installation
- Require the package:
composer require soloterm/solo --dev
- Install the package:
php artisan solo:install
This will publish the configuration file to config/solo.php.
Configuration
Solo is entirely config-driven through config/solo.php. Here's a quick overview of what you can configure:
Commands
Define your commands in the commands array:
'commands' => [ 'About' => 'php artisan solo:about', 'Logs' => EnhancedTailCommand::file(storage_path('logs/laravel.log')), 'Vite' => 'npm run dev', 'Make' => new MakeCommand, // Lazy commands don't start automatically 'Dumps' => Command::from('php artisan solo:dumps')->lazy(), 'Queue' => Command::from('php artisan queue:work')->lazy(), 'Tests' => Command::from('php artisan test --colors=always')->lazy(), ],
You can define commands in several ways:
'commands' => [ // A simple string 'About' => 'php artisan solo:about', // A custom Command class 'Logs' => EnhancedTailCommand::file(storage_path('logs/laravel.log')), 'Make' => new MakeCommand, // Using the Command::from() static constructor 'Dumps' => Command::from('php artisan solo:dumps')->lazy(), ],
A simple string command is the easiest way, but if you need more control you're free to create your own custom class. The EnhancedTailCommand is a good example of what you can do in a custom command.
Lazy Commands
If you want to define a command that does not start automatically, you can append lazy() to a Command instance:
// You might need Reverb, but maybe not always, so don't autostart it. 'Reverb' => Command::from('php artisan reverb')->lazy()
Themes
Solo ships with both light and dark themes. Configure your preference in config/solo.php:
'theme' => env('SOLO_THEME', 'dark'), 'themes' => [ 'light' => Themes\LightTheme::class, 'dark' => Themes\DarkTheme::class, ],
You can define your own theme if you'd like. It's probably easiest to subclass one of the existing themes.
Keybindings
Choose between default and vim-style keybindings:
'keybinding' => env('SOLO_KEYBINDING', 'default'), 'keybindings' => [ 'default' => Hotkeys\DefaultHotkeys::class, 'vim' => Hotkeys\VimHotkeys::class, ],
Again, you're welcome to define and register your own keybidings.
Usage
Start Solo with:
php artisan solo
Key Controls
Note these are the default bindings. They will be slightly different if you use the Vim bindings.
-
Navigation:
- Left/Right arrows to switch between tabs
- Up/Down arrows to scroll output
- Shift + Up/Down to page scroll
- g to quickly jump to any tab
-
Command Controls:
- s to start/stop the current command
- r to restart
- c to clear output
- p to pause output
- f to resume (follow) output
-
Interactive Mode:
- i to enter interactive mode
- Ctrl+X to exit interactive mode
-
Global:
- q or Ctrl+C to quit Solo
Special Commands
EnhancedTailCommand
The EnhancedTailCommand provides improved log viewing with features like:
- Vendor frame collapsing
- Stack trace formatting
- Toggle vendor frames with v
- File truncating
'Logs' => EnhancedTailCommand::file(storage_path('logs/laravel.log')),
MakeCommand
Solo ships with a special php artisan solo:make command that proxies to all of the underlying php artisan make:* commands. It serves as a universal entry point to Laravel's make commands.
It lives in a custom MakeCommand class.
'Make' => new MakeCommand,
solo:dumps
Solo also ships with a custom "Dump Server" that will intercept dump commands from your code and show them in Solo instead of inline. You can run this as a normal artisan command via php artisan solo:dumps.
FAQ
My command isn't working
Try these steps:
- Test if it works outside of Solo
- Check if it has an
--ansior--colors=alwaysoption - Verify it's writing to STDOUT
- Look for options to force STDOUT output
Can I run Sail commands?
Yes! Use this format: vendor/bin/sail artisan schedule:work --ansi
Does Solo support Windows?
No, Solo requires ext-pcntl and other Unix-specific features. If you know how to fix that, please open a PR.
Can I use this in production?
I wouldn't! Use supervisor or similar tools for production environments.
Support
This is free! If you want to support me:
- Check out my courses:
- Help spread the word about things I make
Credits
Solo was developed by Aaron Francis. If you like it, please let me know!
- Twitter: https://twitter.com/aarondfrancis
- Website: https://aaronfrancis.com
- YouTube: https://youtube.com/@aarondfrancis
- GitHub: https://github.com/aarondfrancis/solo
Special thanks to:
- Joe Tannenbaum for his Laracasts course
- Joe's Chewie package
- Laravel Prompts
- Will King for the Solo logo
aaronfrancis/solo 适用场景与选型建议
aaronfrancis/solo 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 82.57k 次下载、GitHub Stars 达 1.2k, 最近一次更新时间为 2026 年 01 月 04 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 aaronfrancis/solo 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 aaronfrancis/solo 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 82.57k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1200
- 点击次数: 26
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-01-04
