Download the PHP package caufab/omniterm without Composer
On this page you can find all versions of the php package caufab/omniterm. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download caufab/omniterm
More information about caufab/omniterm
Files in caufab/omniterm
Package omniterm
Short Description This is my package OmniTerm
License MIT
Homepage https://github.com/pdphilip/omniterm
Informations about the package omniterm
[](https://packagist.org/packages/pdphilip/omniterm)
[](https://github.com/pdphilip/omniterm/actions?query=workflow%3Arun-tests+branch%3Amain)
[](https://packagist.org/packages/pdphilip/omniterm)
**Terminal UI toolkit for Laravel**
Rich CLI output using HTML and Tailwind CSS classes, rendered as ANSI in your terminal.

About
OmniTerm is a terminal rendering engine for Laravel. Write your CLI output as HTML with Tailwind CSS classes and OmniTerm compiles it to ANSI escape sequences.
The Tailwind-for-terminal concept was pioneered by Termwind. OmniTerm builds on that idea with its own rendering engine that adds:
- 16 million color support - full RGB truecolor, with automatic 256-color fallback for older terminals
- Gradients -
bg-gradient-to-r,from-{color},via-{color},to-{color}for smooth per-character color transitions - Arbitrary RGB classes -
text-[R,G,B]andbg-[R,G,B]for computed/dynamic colors - Content repeat -
content-repeat-[char]to fill widths with box-drawing characters
On top of the rendering engine, OmniTerm ships with a set of pre-built components for common CLI patterns: status messages, data tables, progress bars, spinners, live tasks, and an interactive split-pane browser.
Requirements
- PHP 8.2+
- Laravel 10, 11, or 12
Installation
Built-in Components
Add the HasOmniTerm trait to any Artisan command:
Status Messages
One-line status badges:
Detailed status blocks with title, message, and help lines:
Data Tables
Key-value rows with status indicators:
Visual Elements
Title bars, boxes, and horizontal rules:
Progress Bars
Fluent builder API with three styles: simple, framed, and gradient. Color steps transition from rose through amber to emerald as progress increases.
Other variants:
Live Tasks
Run a callback in a background process with an animated spinner:
One-liner with task():
For fine-grained control with live-updating counters:
The Spinner enum provides 10 animation types: Dots, Dots2, Dots3, DotsCircle, Sand, Clock, Material, Pong, Progress, ProgressLoader.
Interactive Browser
Split-pane TUI: scrollable list on the left, detail view on the right. Items can be closures (rendered with full omni output), associative arrays (auto-formatted), or plain arrays.
Interactive Prompts
DIY - The Rendering Engine
The built-in components are just Blade templates compiled through OmniTerm's rendering engine. You can use the same engine directly to build anything.
render()
Write HTML with Tailwind classes, get ANSI output:
liveView()
Redraws in place, for live-updating displays:
parse()
Convert HTML to an ANSI string without printing:
terminal()
Terminal dimensions:
Supported Classes
Layout
| Class | Effect |
|---|---|
flex |
Horizontal layout |
flex-1 |
Fill remaining space |
w-{n} |
Fixed width in characters |
space-x-{n} |
Gap between children |
Spacing
| Class | Effect |
|---|---|
px-{n}, pl-{n}, pr-{n} |
Horizontal padding |
mx-{n}, ml-{n}, mr-{n} |
Horizontal margin |
mt-{n}, mb-{n} |
Vertical margin (blank lines) |
Typography
| Class | Effect |
|---|---|
font-bold |
Bold |
text-center |
Center-align |
text-right |
Right-align |
Colors
All Tailwind colors with shades 50-950: slate, gray, zinc, neutral, stone, red, orange, amber, yellow, lime, green, emerald, teal, cyan, sky, blue, indigo, violet, purple, fuchsia, pink, rose.
| Class | Effect |
|---|---|
text-{color}-{shade} |
Text color, e.g. text-sky-500 |
bg-{color}-{shade} |
Background color, e.g. bg-red-600 |
text-[R,G,B] |
Arbitrary RGB text, e.g. text-[255,100,50] |
bg-[R,G,B] |
Arbitrary RGB background |
Gradients
Per-character color interpolation across an element's width.
| Class | Effect |
|---|---|
bg-gradient-to-r |
Left-to-right gradient |
bg-gradient-to-l |
Right-to-left gradient |
from-{color}-{shade} |
Start color |
via-{color}-{shade} |
Midpoint color |
to-{color}-{shade} |
End color |
Content
| Class | Effect |
|---|---|
content-repeat-[char] |
Repeat character to fill width |
Color Mode Detection
OmniTerm auto-detects your terminal's color capability:
- Truecolor (16M) - full RGB. iTerm2, Kitty, WezTerm, most modern terminals.
- 256-color - automatic fallback for older terminals (e.g. Apple Terminal). Colors mapped to nearest match.
No configuration needed.
Using Blade Templates
Since OmniTerm is a Laravel package, you can write your CLI output as Blade views and render them through the engine. This is how all the built-in components work:
Samples
OmniTerm includes sample commands for every feature. Copy them into your app:
Update the namespace in each file to App\Console\Commands\OmniTermSamples, then:
Testing
License
MIT. See License File.
All versions of omniterm with dependencies
ext-dom Version *
ext-libxml Version *
illuminate/contracts Version ^10.0||^11.0||^12.0
laravel/prompts Version ^0.1.18||^0.2||^0.3
spatie/laravel-package-tools Version ^1.16
symfony/console Version ^6.0||^7.0