Termwind screenshot

Termwind

Author Avatar Theme by Nunomaduro
Updated: 19 Jan 2026
2474 Stars

In short, it's like Tailwind CSS, but for the PHP command-line applications.

Overview

Termwind introduces a modern way to craft visually appealing PHP command-line applications by leveraging the powerful Tailwind CSS API. This package transforms the traditional command-line interface with a structured styling approach, offering developers a more intuitive and pleasant development experience. Installation is straightforward, making it accessible for projects that rely on PHP 8.0 or later.

Using Termwind can significantly simplify the way command-line applications are styled, making them not only functional but also attractive. Whether you’re creating a robust CLI tool or an intuitive command-based workflow, Termwind ensures your application looks as good as it functions.

Features

  • Custom Styling with style(): Easily add custom styles or update colors in your application, providing a personalized touch.

  • User Interaction with ask(): Prompt users with questions and capture their input effortlessly.

  • Terminal Management: With the terminal() function, retrieve terminal dimensions and clear the screen, ensuring efficient navigation and interaction.

  • Comprehensive Styling Options: Utilize classes for background color, text color, font weight, and margin and padding settings, mirroring the familiar Tailwind CSS syntax.

  • Responsive Design Support: Create responsive applications with support for media queries, ensuring compatibility across different terminal sizes.

  • HTML Element Support: Use standard HTML elements like <div>, <p>, <span>, and more to structure output, all with default and customizable styles.

  • Flexibility with Classes: Employ a vast range of utility classes for display, visibility, and content alignment, granting designers complete control.

  • Line Breaks and Lists: Simple integration of line breaks and the capability to create unordered lists, enhancing the readability of terminal outputs.