Fabien Potencier announces the Symfony Tui component, a new PHP library for building rich interactive terminal user interfaces. It splits responsibilities previously mixed in the Console component: Console handles commands and arguments, while Tui handles widgets, layouts, styling, input, mouse support, and real-time rendering. The component ships with a full widget toolkit (text, input, editor, select lists, markdown, images, progress bars, overlays), a CSS-like styling system with Tailwind utility classes and stylesheet rules, Twig-based declarative templates, and a smart rendering pipeline with dirty tracking, render caching, and screen diffing. It runs on PHP Fibers and the Revolt event loop for concurrency without extensions, requiring PHP 8.4+. The component is already used in production powering an AI coding agent.

6m read timeFrom symfony.com
Post cover image
Table of contents
A Full Widget Toolkit for the TerminalCSS-like StylingDeclarative Templates with Twig (follow-up PR)Powered by PHP FibersSmart RenderingMouse, Focus, Keybindings, EventsFIGlet FontsReal-World: Already in ProductionWhat's Next
2 Comments

Sort: