PHPackages                             arefshojaei/php-x - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. arefshojaei/php-x

ActiveLibrary[CLI &amp; Console](/categories/cli)

arefshojaei/php-x
=================

PHP CLI library

1.6.4(2w ago)025MITPHPPHP ^8.0

Since Apr 2Pushed 2w ago1 watchersCompare

[ Source](https://github.com/ArefShojaei/PhpX)[ Packagist](https://packagist.org/packages/arefshojaei/php-x)[ RSS](/packages/arefshojaei-php-x/feed)WikiDiscussions main Synced yesterday

READMEChangelog (4)Dependencies (3)Versions (5)Used By (0)

PhpX - PHP CLI Library
======================

[](#phpx---php-cli-library)

**PhpX** is a lightweight, modern, and flexible PHP library for building Command-Line Interface (CLI) applications with ease. Focus on your logic while PhpX handles routing, parameter parsing, and colorful console output.

---

✨ Features
----------

[](#-features)

- 🚀 **Lightweight &amp; Fast** - Minimal dependencies, quick to load
- 🎯 **Simple Routing** - Intuitive command and parameter handling
- 🎨 **Colored Output** - Built-in console utilities with colors and formatting
- 📊 **Table Builder** - Create formatted tables for CLI output
- 🔌 **Middleware System** - Providers for pre-command logic
- 📦 **PSR-4 Compliant** - Standard PHP autoloading
- ✅ **PHP 8.0+** - Modern PHP syntax and features

---

📦 Installation
--------------

[](#-installation)

### Using Composer (Recommended)

[](#using-composer-recommended)

```
composer require arefshojaei/php-x
```

### Using Git

[](#using-git)

```
git clone https://github.com/ArefShojaei/PhpX.git
cd PhpX
composer install
```

---

🚀 Quick Start
-------------

[](#-quick-start)

### Basic Usage

[](#basic-usage)

Create an `app.php` file:

```
