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

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

gspataro/cli
============

Create terminal applications with ease

2.0.1(3y ago)0241MITPHPPHP &gt;=8.1

Since Jul 4Pushed 9mo ago1 watchersCompare

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

READMEChangelogDependencies (1)Versions (10)Used By (1)

GSpataro\\CLI
=============

[](#gspatarocli)

A component to create easily extendible and executable CLI scripts. Includes a class to format text as terminal output in a simplified way.

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

[](#installation)

> requires **PHP ^8.2**

Require GSpataro/CLI via composer:

```
composer require gspataro/cli

```

Quick Start
-----------

[](#quick-start)

```
use GSpataro\CLI;

// Initialize the commands collection
$commands = new CLI\CommandsCollection();

// Create a command called 'hi' that will print 'hello world' to the console
$commands->create('hi')
    ->setCallback(fn(CLI\Input $input, CLI\Output $output) => $output->print('Hello world!'));

// Initialize the component by providing a collection of commands
$handler = new CLI\Handler($commands);
$handler->deploy();
```

If you want to learn more about this component's features please read the [WIKI](https://github.com/gspataro/CLI/wiki).

Contribute
----------

[](#contribute)

If you want to contribute to this repository please follow the guidelines here: [CONTRIBUTING.md](CONTRIBUTING.md)

Consider also following me on twitter: [@gspataro96](https://twitter.com/gspataro96)

Changelog
---------

[](#changelog)

To see all the latest changes see the [CHANGELOG](CHANGELOG.md).

License
-------

[](#license)

The GSpataro/CLI component is licensed under the [MIT License](LICENSE).

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance41

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

Established project with proven stability

 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

Every ~44 days

Recently: every ~16 days

Total

8

Last Release

1104d ago

Major Versions

0.1.1 → 1.0.02023-03-07

1.3.0 → 2.0.02023-05-08

### Community

Maintainers

![](https://www.gravatar.com/avatar/9aefcaa413291ada48e15bd53d34c80be02750ae39e91c9d56e6a695dc84a04f?d=identicon)[gspataro](/maintainers/gspataro)

---

Top Contributors

[![gspataro](https://avatars.githubusercontent.com/u/4274226?v=4)](https://github.com/gspataro "gspataro (193 commits)")

---

Tags

cli

###  Code Quality

TestsPest

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/gspataro-cli/health.svg)](https://phpackages.com/packages/gspataro-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)[nunomaduro/termwind

It's like Tailwind CSS, but for the console.

2.5k239.8M286](/packages/nunomaduro-termwind)[wp-cli/wp-cli

WP-CLI framework

5.0k17.2M320](/packages/wp-cli-wp-cli)[wp-cli/php-cli-tools

Console utilities for PHP

68325.0M367](/packages/wp-cli-php-cli-tools)[socialengine/sniffer-rules

A Lumen 5 and Laravel 5 SquizLabs Code Sniffer 2.0 artisan command. Detect violations of a defined coding standard. It helps your code remains clean and consistent.

1248.2k1](/packages/socialengine-sniffer-rules)

PHPackages © 2026

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