Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Omniterm Laravel Package

pdphilip/omniterm

OmniTerm is a Laravel terminal UI toolkit that renders HTML + Tailwind-style classes into ANSI output. Includes truecolor with fallback, gradients, arbitrary RGB classes, and content-repeat fills, plus ready-made components like status messages, tables, progress bars, spinners, tasks, and a split-pa...

View on GitHub
Deep Wiki
Context7

OmniTerm is a terminal UI toolkit for Laravel that lets you write rich CLI output as HTML with Tailwind CSS classes, then compiles it into ANSI escape sequences for beautiful terminal rendering. It builds on the Tailwind-for-terminal idea (popularized by Termwind) with a custom engine and a set of ready-to-use components for common Artisan workflows.

Use it in any command via the HasOmniTerm trait to quickly render status messages, tables, progress indicators, spinners, and more—without hand-crafting ANSI codes.

  • Truecolor (16M) support with automatic 256-color fallback
  • Gradient utilities (bg-gradient-to-*, from/via/to-*) for per-character transitions
  • Arbitrary RGB classes: text-[R,G,B], bg-[R,G,B]
  • Content repeat helpers (content-repeat-[char]) for box-drawing fills
  • Built-in CLI components: status badges, tables, progress bars, spinners, live tasks
Frequently asked questions about Omniterm
How do I use OmniTerm in a Laravel Artisan command?
Add the `HasOmniTerm` trait to your command class. Then use methods like `$this->omni->success('Message')` or `$this->omni->table(['data'])` to render styled output. The trait injects the OmniTerm instance automatically.
Does OmniTerm support Laravel 13?
Yes, OmniTerm explicitly supports Laravel 11, 12, and 13. Check the [GitLab repo](https://gitlab.com/pdphilip/omniterm) for the latest version compatibility. PHP 8.2+ is required.
Can I use custom colors like RGB or gradients?
Absolutely. OmniTerm supports arbitrary RGB classes like `text-[255,0,0]` and gradients via `bg-gradient-to-r from-red-500 via-yellow-300 to-green-400`. It also auto-falls back to 256-color mode if truecolor isn’t supported.
How do I test OmniTerm in PHPUnit/Pest?
Use Pest’s `expectOutput()` or PHPUnit’s `expectOutputString()` with terminal emulation. For complex layouts, mock the ANSI output or verify rendered strings. Example: `expectOutput()->toContain('✅ Ready');`
Will OmniTerm work in production terminals like iTerm2 or Windows Terminal?
Yes, OmniTerm auto-detects terminal capabilities. Truecolor (16M colors) works in modern terminals, while older ones fall back to 256-color mode. Test your target environments to ensure compatibility.
Can I integrate OmniTerm with Blade templates?
Yes, OmniTerm supports Blade templates for reusable CLI views. Use `@omni('view.name', ['data'])` in your command’s `render()` method to render dynamic content with Tailwind-like syntax.
What’s the performance impact of using OmniTerm?
Minimal. ANSI generation is lightweight, but complex layouts (e.g., large tables) may introduce slight overhead. Benchmark in your specific use case—OmniTerm is optimized for readability over raw speed.
Are there alternatives to OmniTerm for Laravel CLI styling?
Yes, alternatives include Termwind (simpler, no gradients/RGB), Symfony Console (native but verbose), or custom ANSI scripts. OmniTerm stands out with Tailwind-like syntax, truecolor, and built-in components for Laravel.
How do I create custom components or extend OmniTerm?
Extend the `OmniTerm` class or create Blade views. Override the `render()` method to parse custom HTML/Tailwind classes. For reusable components, publish Blade templates via `omni:publish` (if supported).
Does OmniTerm support live updates (e.g., progress bars) without full terminal redraws?
Yes, use `$this->omni->liveView()` or `$this->omni->progressBar()` methods. These update only the necessary parts of the terminal, preserving state. Works well for real-time tasks like file processing or API calls.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport