Exploring the Symfony Tui component
I had seen the Symfony Tui component announcement, but I just got the time to start to explore it. Setup To explore the component fast I checked out the PR. Added "App\\" : "src/App" to composer.js...

Source: DEV Community
I had seen the Symfony Tui component announcement, but I just got the time to start to explore it. Setup To explore the component fast I checked out the PR. Added "App\\" : "src/App" to composer.json. Created a command, TuiTestCommand, in the App directory, and a bin/console file with a console application and the command. In the following sections I'm going to take baby steps to understand how the component works. Returning a text The standard way to return a text is $output->writeln('Hello world!'); To do this with the Tui component this is: use Symfony\Component\Tui\Tui; use Symfony\Component\Tui\Widget\TextWidget; // in the command $tui = new Tui(); $tui->add(new TextWidget('Hello World!')); $tui->onTick(fn() => $tui->stop()); $tui->run(); Because the component is meant to create rich interactive experiences it uses a bit more code to make it run. You can look at the Tui class as an agent. You can give it rules and when called it runs those rules. Do I have AI bra