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...
composer test:l11, composer test:l12, composer test:l13, composer test:allilluminate/contracts constraint: ^11.0||^12.0||^13.0symfony/console constraint: ^7.0||^8.0laravel/prompts constraint: ^0.2||^0.3Full Changelog: https://github.com/pdphilip/omniterm/compare/v2.1.1...v3.0.0
ask() now accepts a $default parameter — when provided, pressing Enter returns the default value instead of an empty string(default: X) hint in muted text when a default is setAskTest with 7 tests covering question view rendering (options, defaults, prompt character)TestCase for view-dependent testsask() signature: ask(string $question, array $options = [], mixed $default = null): mixedFull Changelog: https://github.com/pdphilip/omniterm/compare/v2.1.0...v2.1.1
The rendering engine now handles semantic HTML tags with correct terminal output. Tags apply sensible defaults (block/inline, bold, italic, etc.) that CSS classes can override.
Block tags: <p>, <ul>, <ol>, <li>, <dl>, <dt>, <dd>, <pre>, <code>, <table>, <section>, <article>, <header>, <footer>, <nav>, <aside>, <main>
Inline tags: <b>/<strong> (bold), <i>/<em> (italic), <s> (strikethrough), <a> (underline + hyperlink), <th> (bold)
Self-closing: <br> (line break), <hr> (horizontal rule with color support)
<table> elements render with rounded box-drawing borders. Auto-sized columns with proportional shrinking when content exceeds terminal width. Header rows get a mid-border separator.
<table>
<thead><tr><th>Name</th><th>Status</th></tr></thead>
<tr><td>Build</td><td>Done</td></tr>
</table>
<code> preserves whitespace and supports line numbers via line and start-line attributes.
<code line="1" start-line="10">
$foo = 'bar';
echo $foo;
</code>
<a href="..."> wraps content with OSC 8 terminal hyperlink sequences. Terminals that support it show clickable links; others show the text as-is with underline.
<pre> and <code> preserve whitespace and newlines. The preserveWhitespace property inherits through nested elements.
dataList($data, $title, $borderColor) renders any data structure as a tree with box-drawing connectorsdebug($var, $label) dumps data as a tree and exits (the terminal dd())newLine($count) method for outputting blank linestableRow() and tableRowAsStatus() now accept mixed values (auto-cast to string)Ansi::dim() methodAnsi::hyperlink(), Ansi::stripAnsi() methodsisBlockTag() now recognizes class="block" on inline tags, not just block tag nameslistStyle or spaceY is active (fixes list/space-y rendering with inline children)AsciiHelper as single source of truth (roundedTable() method)SplitBrowserRenderer uses AsciiHelper and Ansi methods instead of raw escape sequencesAnsi::visibleLength() and Ansi::truncate() handle OSC 8 hyperlink sequenceslist-disc, list-decimal, list-square) now render markers correctly when children are inline elementsspace-y now adds spacing between inline children in block containers<span class="block"> correctly treated as block element in parent layout decisionsFull Changelog: https://github.com/pdphilip/omniterm/compare/v2.0.1...v2.1.0
feedback() public method for custom-colored feedback messages with any title and color$title parameter on success(), error(), warning(), info(), disabled() methodsconfirm() method with Y/N prompt and callback executionConfirmTask class for interactive confirmation dialogsitalic, underline, line-through, font-normal, invisible, block, list-disc, list-decimal, list-square, list-none, text-left, text-right, text-center, justify-between, justify-around, justify-center, justify-evenly, uppercase, lowercase, capitalize, snakecase, truncate, min-w-{n}, max-w-{n}, w-auto, w-fullFeedbackTest with 5 tests covering feedback view renderingomniterm:confirm, omniterm:tailwind-classessuccess, error, warning, info, disabled) now delegate to a single feedback() method using one shared blade viewsuccess.blade.php, error.blade.php, warning.blade.php, info.blade.php, disabled.blade.php) in favor of unified feedback.blade.phpFull Changelog: https://github.com/pdphilip/omniterm/compare/v2.0.0...v2.0.1
Trait renamed: OmniTerm\OmniTerm → OmniTerm\HasOmniTerm
// Before
use OmniTerm\OmniTerm;
class MyCommand extends Command {
use OmniTerm;
}
// After
use OmniTerm\HasOmniTerm;
class MyCommand extends Command {
use HasOmniTerm;
}
Core class renamed: OmniTerm\Helpers\OmniHelpers → OmniTerm\OmniTerm — the flagship class name now belongs to the core component, accessed via $this->omni
Spinner enum replaces strings: Loader/spinner types are now a backed enum instead of magic strings
// Before
$this->omni->newLoader('sand');
$this->omni->liveTask('Title', 'dots');
// After
use OmniTerm\Async\Spinner;
$this->omni->newLoader(Spinner::Sand);
$this->omni->liveTask('Title', Spinner::Dots);
Progress bar fluent builder: Old convenience methods replaced with a chainable builder API
// Before
$this->omni->createProgressBar(100, withColors: true);
$this->omni->showProgress();
$this->omni->progressAdvance();
$this->omni->progressFinish();
// After
$bar = $this->omni->progressBar(100)->framed()->steps();
$bar->start();
$bar->advance();
$bar->finish();
SplitBrowser API redesigned: Items are now an associative array (keys = labels, values = closures, arrays, or scalars) instead of a flat list with a separate detail callback
// Before
$this->omni->browse('Label', ['a', 'b'], fn ($item) => ["Detail for $item"]);
// After
$this->omni->browse('Label', [
'a' => function (OmniTerm $omni) {
$omni->statusSuccess('Healthy', 'All checks passing');
},
'b' => ['status' => 'running', 'cpu' => '45%'],
]);
Global functions removed: render(), liveRender(), parse(), terminal(), asyncFunction() — use $this->omni-> methods instead
Spinner backed enum (OmniTerm\Async\Spinner) with 10 animation types — resolves view names, animation frames, and labels via view(), frames(), label() methodsTaskResult value object for structured spinner/live task resultsSpinnerTask class encapsulating spinner + async task executionLiveTask::runTask() — one-shot method combining run + finishOmniTerm::task() — one-liner for spinner task executionframed(), steps(), gradient(), color() chainable methodsRenderer::renderUsing() with COLUMNS width constraintomniterm:browser-demo, omniterm:live-task-demo, omniterm:title-barsOmniTerm\Helpers\OmniHelpers class (renamed to OmniTerm\OmniTerm)OmniTerm\OmniTerm trait (renamed to OmniTerm\HasOmniTerm)use function OmniTerm\render, etc.)AsciiHelper calls from blade views (frames now passed as data)Full Changelog: https://github.com/pdphilip/omniterm/compare/v1.0.6...v2.0.0
How can I help you explore Laravel packages today?