PHPackages                             codecounter/php-argv - 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. codecounter/php-argv

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

codecounter/php-argv
====================

A library for process php argv in command line.

429PHP

Since Jan 29Pushed 11y ago1 watchersCompare

[ Source](https://github.com/codecounter/php-argv)[ Packagist](https://packagist.org/packages/codecounter/php-argv)[ RSS](/packages/codecounter-php-argv/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

php-argv
========

[](#php-argv)

A library for process php argv in command line.

Installation
============

[](#installation)

With composer

```
{
    ...
    "require": {
        "codecounter/php-argv": "0.1.0"
    }
}

```

Without composer

```
require '/path/to/php-argv/autoload.php';
```

Usage
=====

[](#usage)

```
// first, create a php-argv instance
$phpArgv = new \CodeCounter\PHPArgv\Argv();

// set version, desc
$phpArgv->version('1.0.0')
    ->desc('Some description for this command');

// create default module(sub command)
$phpArgv->module()
    // set description for this module
    ->desc()
    // set allowed options
    ->options(array(
        array(
            'key' => 'num',
            'type' => 'int'
        ),
        array(
            'key' => 'path',
            'type '=> 'path'
        )
    ))
    ->onProcess(function ($module, $options) {
        if (empty($options) || isset($options['help'])) {
            $module->defaultHelp();
        }

        // other logic
    });

// create another module
$phpArgv->module('another-module')
    ...

// parse argv, default is global argv
$phpArgv->parse();
```

Documentation
=============

[](#documentation)

\[complete later\]

Test
====

[](#test)

```
cd /path/to/php-argv/tests
php index.php --help

```

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10571656?v=4)[codecounter](/maintainers/codecounter)[@codecounter](https://github.com/codecounter)

---

Top Contributors

[![codecounter](https://avatars.githubusercontent.com/u/10571656?v=4)](https://github.com/codecounter "codecounter (5 commits)")

### Embed Badge

![Health badge](/badges/codecounter-php-argv/health.svg)

```
[![Health](https://phpackages.com/badges/codecounter-php-argv/health.svg)](https://phpackages.com/packages/codecounter-php-argv)
```

###  Alternatives

[illuminate/console

The Illuminate Console package.

13046.0M6.5k](/packages/illuminate-console)[styleci/cli

The CLI tool for StyleCI

71470.5k9](/packages/styleci-cli)[winbox/args

Windows command-line formatter

20720.9k21](/packages/winbox-args)[tomatophp/filament-artisan

Simple but yet powerful library for running some artisan commands for FilamentPHP

3275.4k1](/packages/tomatophp-filament-artisan)

PHPackages © 2026

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