nunomaduro/termwind ? reverse-engineered prompt

Reverse engineered prompt

Build me a small PHP package that lets me style command line output with a Tailwind like class syntax.

I want to be able to write simple HTML like divs, spans, paragraphs, lists, links, bold and italic text, then render it in the terminal with colors, spacing, padding, width, alignment, and a few responsive style rules based on terminal size. It should also let me define custom styles and ask the user questions in a nicely styled prompt.

Please make it work well for PHP 8 or newer, with a clean README example, a few basic tests, and a simple playground script so I can try it out quickly. If you need to check current docs or best practices online while building it, go ahead. The goal is a polished little library that makes CLI apps look much nicer without making the API feel complicated.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab