pdphilip/omniterm
Laravel terminal UI toolkit: write Artisan/CLI output as HTML with Tailwind-style classes and OmniTerm renders it to ANSI. Includes truecolor with fallback, gradients, arbitrary RGB, and content repeat, plus ready-made components like status messages, tables, progress bars, spinners, and live tasks.
OmniTerm is a terminal UI toolkit designed for Laravel CLI applications, leveraging HTML/Tailwind CSS for ANSI rendering. Its architecture aligns well with Laravel’s command-line ecosystem, particularly for:
HasOmniTerm trait).Key Fit Areas:
resources/views/cli/*.blade.php), mirroring Laravel’s web templating.Misalignment Risks:
illuminate/contracts dependency), limiting adoption outside Laravel ecosystems.High for Laravel-based CLI tools, with minimal friction for:
pdphilip/omniterm) and extend HasOmniTerm in commands.echo with $this->omni->render()).Challenges:
| Risk Area | Severity | Mitigation |
|---|---|---|
| Laravel Version Mismatch | High | Pin to ^3.0 for Laravel 11/12/13 compatibility; test early. |
| Terminal Rendering Issues | Medium | Test on target terminals (e.g., iTerm2, Windows Terminal, Git Bash). |
| Performance Overhead | Low | Benchmark rendering of large outputs (e.g., data tables with 1000+ rows). |
| Dependency Bloat | Low | Minimal core dependencies; no major conflicts expected. |
| Blade Template Complexity | Medium | Document when to use Blade vs. direct HTML for CLI tools. |
| Async Task Stability | Medium | Test runTask/liveTask under high concurrency (e.g., parallel Artisan jobs). |
Critical Questions for TPM:
pdphilip/omniterm the best choice, or should we evaluate alternatives (e.g., Termwind, Symfony Style)?OmniTerm is optimized for Laravel 11/12/13 and integrates seamlessly with:
HasOmniTerm trait (e.g., php artisan my:command).Illuminate\Console\Scheduling for scheduled CLI jobs.Artisan::call() for CLI output assertions).Non-Laravel Compatibility:
illuminate/contracts).Recommended Stack Pairings:
| Use Case | Recommended Stack | OmniTerm Role |
|---|---|---|
| DevOps Tools | Laravel 12 + OmniTerm + GitHub Actions | Progress bars, live task feedback. |
| User-Facing CLI Apps | Laravel 13 + OmniTerm + Blade Templates | Interactive prompts, data tables. |
| Internal Scripts | Laravel 11 + OmniTerm (lightweight) | Status messages, visual separators. |
| Cross-Platform Tools | Symfony 8 + OmniTerm + Terminal Detection | Fallback to 256-color for Windows CMD. |
pdphilip/omniterm in a dev branch.php artisan omniterm:full-demo) to verify rendering.Symfony/Style).nunomaduro/termwind).echo/$this->info() with $this->omni->render() in 1–2 commands.$this->omni->progressBar().$this->omni->liveTask()) for a background job.$this->omni->ask()) in user flows.resources/views/cli/ directory for reusable components.HasOmniTerm to all Artisan commands.OmniTerm\Components\DeploymentStatus).// tests/Feature/CLI/DeploymentCommandTest.php
public function test_deployment_status()
{
$output = Artisan::call('deploy:status');
$this->assertStringContainsString('<span class="bg-emerald-600">', $output);
}
OmniTerm\Terminal to handle edge cases (e.g., Windows CMD).| Compatibility Factor | Status | Notes |
|---|---|---|
| Laravel 11/12/13 | ✅ Fully Supported | Tested via `composer test: |
How can I help you explore Laravel packages today?