PHPackages                             andreypostal/cli - 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. andreypostal/cli

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

andreypostal/cli
================

A simple and easy to use library with no dependencies for creating pretty and organized CLI apps in PHP. Even has some fun progress bars.

v1.0.0(2y ago)19221Apache-2.0PHPPHP &gt;=8.1

Since May 2Pushed 1y ago2 watchersCompare

[ Source](https://github.com/andreypostal/cli)[ Packagist](https://packagist.org/packages/andreypostal/cli)[ Docs](https://github.com/andreypostal/cli)[ RSS](/packages/andreypostal-cli/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

[![Maintainability](https://camo.githubusercontent.com/7aedb959f77cce9547421b9ef729930ffc4bb3206aa54fa8e3ebe219a26eb827/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f31306361373537306266643763623034613764312f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/andreypostal/cli/maintainability)

[![Progress Bar Gif](./assets/initial.gif)](./assets/initial.gif)

🧙‍♂️ Easy CLI for PHP
=====================

[](#‍️-easy-cli-for-php)

A simple and easy to use library with no dependencies for creating pretty and organized CLI apps in PHP.

No dependencies, simple and easy to understand. You can create simple CLI tools or complex one and things wont get messy!! 😄

Installation
------------

[](#installation)

```
composer require andreypostal/cli

```

Basic Usage
-----------

[](#basic-usage)

```
$app = new App(
    appName: 'MyApp',
    description: 'My app has a cool description',
    cmd: 'php cmd',
    params: [],
    commands: [
        new Command(
            key: 'run',
            description: 'This action will run soon',
            service: [
                'handler' => static function(Context $context): void {
                    App::console('It is so easy!!!');
                },
            ],
        ),
    ],
);
$app->run($argv);
```

Docs
----

[](#docs)

- [01 - Usage / Getting started](./doc/01-usage.md)
- [02 - Utilities](./doc/02-utilities.md)
- [03 - Components](./doc/03-components.md)

Examples
--------

[](#examples)

- [Basic Handler](examples/BasicHandler)
- [Basic Service](examples/BasicService)
- [Required Params Validation](examples/ParamsValidation)
- [Boolean Flag](examples/BooleanFlag)
- [Progress Bar](examples/ProgressBar)
- [Infinite Progress Bar](examples/InfiniteProgressBar)
- [Complete](examples/Complete)

About
-----

[](#about)

### Author

[](#author)

Andrey Postal -

### License

[](#license)

CLI is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details

### Acknowledgements

[](#acknowledgements)

Highly inspired by the Go library [urfave/cli](https://github.com/urfave/cli)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance28

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

745d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/88c0d53295da06d774258e1ad68f6e90be3f443d4c62bfedf595411dc51e1b8d?d=identicon)[andreypostal](/maintainers/andreypostal)

---

Top Contributors

[![andreypostal](https://avatars.githubusercontent.com/u/15055086?v=4)](https://github.com/andreypostal "andreypostal (6 commits)")

---

Tags

clicommand-linephpphpclicliconsolecommand-lineterminal

### Embed Badge

![Health badge](/badges/andreypostal-cli/health.svg)

```
[![Health](https://phpackages.com/badges/andreypostal-cli/health.svg)](https://phpackages.com/packages/andreypostal-cli)
```

###  Alternatives

[symfony/console

Eases the creation of beautiful and testable command line interfaces

9.8k1.1B11.3k](/packages/symfony-console)[nunomaduro/collision

Cli error handling for console/command-line PHP applications.

4.6k331.8M8.5k](/packages/nunomaduro-collision)[php-school/cli-menu

A command line menu helper in PHP

2.0k1.1M27](/packages/php-school-cli-menu)[splitbrain/php-cli

Easy command line scripts for PHP with opt parsing and color output. No dependencies

177817.2k28](/packages/splitbrain-php-cli)[nunomaduro/laravel-console-menu

Laravel Console Menu is an output method for your Laravel/Laravel Zero commands.

815412.0k48](/packages/nunomaduro-laravel-console-menu)[php-tui/php-tui

Comprehensive TUI library heavily influenced by Ratatui

589747.0k6](/packages/php-tui-php-tui)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
