PHPackages                             phix/commandlinelib - 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. phix/commandlinelib

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

phix/commandlinelib
===================

CommandLineLib provides a high-quality command line parser via a fluent interface

4.2.0(11y ago)233.6k↓50%1BSD-3-ClausePHP

Since Jun 8Pushed 11y ago1 watchersCompare

[ Source](https://github.com/stuartherbert/CommandLineLib)[ Packagist](https://packagist.org/packages/phix/commandlinelib)[ Docs](https://github.com/stuartherbert/CommandLineLib/)[ RSS](/packages/phix-commandlinelib/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelogDependencies (3)Versions (8)Used By (1)

CommandLineLib3
===============

[](#commandlinelib3)

**CommandLineLib3** is a simple-to-use PHP component that provides a high-quality command line parser via a fluid interface.

System-Wide Installation
------------------------

[](#system-wide-installation)

CommandLineLib3 should be installed using the [PEAR Installer](http://pear.php.net). This installer is the PHP community's de-facto standard for installing PHP components.

```
sudo pear channel-discover pear.phix-project.org
sudo pear install --alldeps phix/CommandLineLib3

```

As A Dependency On Your Component
---------------------------------

[](#as-a-dependency-on-your-component)

If you are creating a component that relies on CommandLineLib3, please make sure that you add CommandLineLib to your component's package.xml file:

```

      CommandLineLib3
      pear.phix-project.org
      3.0.0
      3.999.9999

```

Usage
-----

[](#usage)

The best documentation for CommandLineLib3 are the unit tests, which are shipped in the package. You will find them installed into your PEAR repository, which on Linux systems is normally /usr/share/php/test.

Development Environment
-----------------------

[](#development-environment)

If you want to patch or enhance this component, you will need to create a suitable development environment. The easiest way to do that is to install phix4componentdev:

```
# phix4componentdev
sudo apt-get install php5-xdebug
sudo apt-get install php5-imagick
sudo pear channel-discover pear.phix-project.org
sudo pear -D auto_discover=1 install -Ba phix/phix4componentdev

```

You can then clone the git repository:

```
# CommandLineLib3
git clone git://github.com/stuartherbert/CommandLineLib.git

```

Then, install a local copy of this component's dependencies to complete the development environment:

```
# build vendor/ folder
phing build-vendor

```

To make life easier for you, common tasks (such as running unit tests, generating code review analytics, and creating the PEAR package) have been automated using [phing](http://phing.info). You'll find the automated steps inside the build.xml file that ships with the component.

Run the command 'phing' in the component's top-level folder to see the full list of available automated tasks.

License
-------

[](#license)

See LICENSE.txt for full license details.

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity68

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 ~83 days

Recently: every ~97 days

Total

6

Last Release

4307d ago

Major Versions

3.0.2 → 4.0.02013-07-09

### Community

Maintainers

![](https://www.gravatar.com/avatar/2dc3934d5c3ce55e18dca95d52b564fb2a34986770af3c532dba6c248ef58f3a?d=identicon)[stuartherbert](/maintainers/stuartherbert)

---

Top Contributors

[![stuartherbert](https://avatars.githubusercontent.com/u/7926?v=4)](https://github.com/stuartherbert "stuartherbert (95 commits)")

---

Tags

getoptargs parser

### Embed Badge

![Health badge](/badges/phix-commandlinelib/health.svg)

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

###  Alternatives

[consolidation/annotated-command

Initialize Symfony Console commands from annotated command class methods.

22569.8M19](/packages/consolidation-annotated-command)[splitbrain/php-cli

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

177817.2k28](/packages/splitbrain-php-cli)[aura/cli

Provides the equivalent of request (Context) and response (Stdio) classes for a command line environment, including Getopt support.

1051.6M29](/packages/aura-cli)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[php-tui/php-tui

Comprehensive TUI library heavily influenced by Ratatui

589747.0k6](/packages/php-tui-php-tui)[clue/commander

Finally a sane way to register available commands and arguments and match your command line in PHP.

16724.0k9](/packages/clue-commander)

PHPackages © 2026

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