PHPackages                             rhdevelopment/arg-parser - 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. rhdevelopment/arg-parser

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

rhdevelopment/arg-parser
========================

Small, easy-to-use CLI argument parsing helpers for PHP scripts and cron tools.

v0.1.0(6mo ago)00MITPHPPHP ^7.4 || ^8.0

Since Oct 23Pushed 6mo agoCompare

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

READMEChangelogDependencies (2)Versions (2)Used By (0)

RHDevelopment Arg Parser
========================

[](#rhdevelopment-arg-parser)

Small, easy-to-use CLI argument parsing helpers for PHP scripts and cron tools.

Usage sketch:

```
use RHDevelopment\ArgParser\ArgParser;

ArgParser::option('name')->required()->asInt();
ArgParser::option('verbose');

$values = ArgParser::parse();
// $values is an associative array of parsed options
```

Interactive prompting helper

This package provides a small `prompt()` helper for interactive scripts. It reads from STDIN and returns the trimmed input. If you provide a default value and the user submits an empty line the default will be returned.

Example (see `bin/example.php`):

```
use RHDevelopment\ArgParser\ArgParser;

ArgParser::option('name')->asString();
ArgParser::option('count')->asInt()->default(1);
ArgParser::option('verbose');

$values = ArgParser::parse();
if (empty($values['name'])) {
    $values['name'] = ArgParser::prompt('Enter your name', 'guest');
}
```

Run the provided example script (make it executable first):

```
chmod +x bin/example.php
./bin/example.php --verbose --count=3
```

Run tests:

```
composer install
composer test
```

License: MIT (see `LICENSE`)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance66

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity30

Early-stage or recently created project

 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

207d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/107e50b019533e6744b9b69f44411392f3ffddb358537f4fe3fc24677774291a?d=identicon)[hadley8899](/maintainers/hadley8899)

---

Top Contributors

[![hadley8899](https://avatars.githubusercontent.com/u/30215267?v=4)](https://github.com/hadley8899 "hadley8899 (1 commits)")

---

Tags

phpcliargumentsargsrhDevelopment

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rhdevelopment-arg-parser/health.svg)

```
[![Health](https://phpackages.com/badges/rhdevelopment-arg-parser/health.svg)](https://phpackages.com/packages/rhdevelopment-arg-parser)
```

###  Alternatives

[nunomaduro/termwind

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

2.5k239.8M286](/packages/nunomaduro-termwind)[nunomaduro/laravel-console-task

Laravel Console Task is a output method for your Laravel/Laravel Zero commands.

2582.1M11](/packages/nunomaduro-laravel-console-task)[mehrancodes/laravel-harbor

A CLI tool to Quickly create On-Demand preview environment for your apps.

9989.0k](/packages/mehrancodes-laravel-harbor)[alecrabbit/php-cli-snake

Lightweight cli spinner with zero dependencies

29211.3k5](/packages/alecrabbit-php-cli-snake)

PHPackages © 2026

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