Laravel bridge and TUI API
Illuminate commands
The Laravel bridge is opt-in. Pass an already bootstrapped application container and register the commands that the CLI should expose:
$console->useIlluminate($laravelApplication);
$console->addIlluminateCommand(new App\Console\Commands\ExampleCommand());
Registered commands use Illuminate's container, prompts, and command lifecycle. Localzet Console does not boot a Laravel application or replace its bootstrap process.
UTF-8 and ANSI helpers
localzet\Console\Tui\Utf8 provides width(), clipAnsi(), pad(), and clean(). width() measures terminal cells rather than bytes, including Cyrillic and wide Unicode glyphs. clipAnsi() preserves valid styling while clipping visible content. clean() strips ANSI and control sequences from untrusted text before display.
Interactive terminal output
localzet\Console\Tui\Terminal controls the alternate screen and temporary /dev/tty settings on Unix. Always restore the terminal in a finally block:
$terminal = new localzet\Console\Tui\Terminal();
$terminal->open();
try {
$terminal->draw(['Application status']);
} finally {
$terminal->close();
}
Use this API only for interactive terminal sessions. CI, redirected output, and Windows should use standard Symfony Console output.

