Download the PHP package igclabs/tart without Composer
On this page you can find all versions of the php package igclabs/tart. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package tart
Short Description TART (Terminal Art for Artisan) - A beautiful, expressive terminal UI toolkit for PHP console applications with automatic logo generation, themes, and rich formatting
License MIT
Homepage https://github.com/igclabs/tart
Informations about the package tart
TART

Terminal Art for Artisan
A beautiful, expressive terminal UI toolkit for PHP console applications
Full Documentation
Why TART?
Transform boring CLI commands into beautiful, professional applications with styled output, themed blocks, automatic logo generation, and more. Make your terminal applications a joy to use and a work of art!
๐ธ Examples in Action
โจ Features
- ๐จ Rich Formatting - Colored text, backgrounds, and styled blocks
- ๐ฆ Block Messages - Beautiful success, warning, error, and info blocks
- ๐ท๏ธ Automatic Logos - Create branded ASCII art logos with one line of code
- ๐ญ Theme System - Built-in themes or create your own with fluent APIs
- ๐ Progress Indicators - Build output line-by-line with columns
- ๐ Progress Bars - Visual progress tracking with percentages (NEW!)
- โณ Spinners - Animated loading indicators with 7 styles (NEW!)
- ๐ Lists - Bullet, numbered, nested, and task lists (NEW!)
- ๐ Tables - Beautiful table rendering with auto-width (NEW!)
- ๐ฌ Interactive Input - Text prompts and password input (NEW!)
- ๐ง Framework Agnostic - Works with Laravel, Symfony, or standalone
- โจ Emoji Support - Full multi-byte UTF-8 character support
- ๐งฉ Modular - Use only what you need with traits
- โก Fluent APIs - Chainable methods for expressive, Laravel-like syntax
- ๐ Backward Compatible - Traditional APIs still supported
Installation
Verify Installation
After requiring the package, you can confirm that Composer resolved the correct package by inspecting it:
Quick Start
Laravel
Example Usage
See the complete example in examples/laravel-example.php
Symfony Console
Need custom defaults outside Laravel? Pass overrides into the constructor:
Theme Configuration
TART ships with a default theme, but you can customize colors, highlight behavior, and layout width. The max_line_width setting is especially useful for matching the width of your terminal and for how blocks, progress bars, and banners wrap long text.
Theme Options
class- The theme class to use (defaults toIGC\Tart\Themes\DefaultTheme)color- Primary color used by blocks and accents (default:blue)text_color- Default text color inside themed blocks (default:white)highlight_color- Accent/highlight color (default:yellow)max_line_width- Maximum line width for formatting (default:72)colors- Palette used for random or multi-color effects (default:['red', 'green', 'yellow', 'cyan', 'white'])
Example: Custom Theme via Config
Example: Fluent Theme Updates
Laravel Auto-Discovery & Demo Commands
Laravel 9+ automatically discovers the IGC\Tart\Laravel\TartServiceProvider, which registers several Artisan demo commands. After installing the package you can immediately preview different aspects of the styling toolkit:
Available Demo Commands
Need manual control? Add TART to Composer's dont-discover list and register the provider in config/app.php:
Publish Configuration
Publish the default configuration to tweak the base theme, logo colors, auto-answer behavior, and demo-command registration:
config/tart.php lets you point to a custom ThemeInterface implementation, adjust palette/width used by the bundled Theme class, and control register_demo_commands (defaults to false).
๐ Core Features
Basic Output
Block Messages
Recommended API Usage
TART supports both fluent APIs and the original, traditional methods. The fluent API is the preferred approach going forward because it is more expressive and easier to read. The traditional methods remain supported for backward compatibility.
Preferred (fluent)
Legacy (still supported)
If you're migrating existing code, you can adopt fluent methods incrementally while keeping the original APIs for older commands.
Logo Creation ๐จ
Line Building & Columns
Layout
๐จ Themes
Built-in Themes:
DefaultTheme- Blue (general use)SuccessTheme- Green (success operations)ErrorTheme- Red (error handling)
๐ Documentation
- Getting Started - Installation and first steps
- Quick Reference - Complete API reference
- Logo Creation - Logo generation guide
- Examples - Working code examples
๐ป Examples
Check out the working examples in the examples/ directory:
Built-in Demo Command
Quick Demo Source
Comprehensive Demo
Laravel Integration
Try it yourself:
- Run
php artisan tart:demoto see the built-in showcase - Copy any example to your Laravel
app/Console/Commands/directory when you're ready to customize your own command
๐ก Use Cases
Application Branding
Progress Tracking
Status Reports
Themed Operations
๐๏ธ Architecture
TART uses a modular trait-based architecture:
- HasColoredOutput - Basic colored text output
- HasBlocks - Block-style formatted messages
- HasLineBuilding - Build lines incrementally
- HasInteractivity - Interactive prompts
Mix and match traits in your own classes for maximum flexibility.
๐งช Testing
Requirements
- PHP 8.0 or higher
- Symfony Console 5.0+ or 6.0+
- Laravel 9.0+ (for Laravel integration)
- mbstring extension (standard in most PHP installations)
๐ฆ What's Included
- โ 15+ output methods
- โ 7 block message types
- โ 3 logo styles (standard, box, banner)
- โ Theme system with 3 built-in themes
- โ Interactive input (text, password, validation)
- โ Progress bars with live updates
- โ Spinners with 7 animation styles
- โ Lists (bullet, ordered, nested, task)
- โ Table rendering with auto-sizing
- โ Multi-byte character support (emojis!)
- โ 50+ unit and integration tests
- โ Complete documentation
- โ Working examples
๐ค Contributing
Contributions are welcome! Please see CONTRIBUTING.md for details.
๐ License
MIT License - see LICENSE for details.
๐ Credits
Developed by the IGC team. Extracted from internal tooling and open-sourced for the community.
๐ Resources
- Getting Started: docs/GETTING-STARTED.md
- Quick Reference: docs/guides/QUICK-REFERENCE.md
- Logo Creation: docs/guides/LOGO-CREATION.md
- Examples: examples/README.md
Make your CLI applications beautiful with Terminal Art! ๐จโจ
Get Started โข API Reference โข Logos โข Examples