PHPackages                             diversen/parse-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. diversen/parse-argv

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

diversen/parse-argv
===================

Parse argv and get options and arguments

v4.1.0(3y ago)33.5k↓100%1[1 PRs](https://github.com/diversen/parse-argv/pulls)1MITPHPCI passing

Since Jun 16Pushed 3mo ago1 watchersCompare

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

READMEChangelogDependencies (1)Versions (18)Used By (1)

Simple argv parser
==================

[](#simple-argv-parser)

Any options are denoted by '-' or '--' and any option value must be specified by '='

You may cast options to int, float or booleans

Install:
--------

[](#install)

```
composer require diversen/parse-argv

```

Example
-------

[](#example)

Run the following test script:

```
php example.php  -h --help --message=hello --to-int=100 --to-float=100.5 --to-bool=false argument1 argument2

```

See: [example.php](example.php)

Test
----

[](#test)

```
git clone git@github.com:diversen/parse-argv.git
cd parse-argv
composer install
./test.sh

```

License MIT

###  Health Score

45

—

FairBetter than 92% of packages

Maintenance57

Moderate activity, may be stable

Popularity24

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 96.9% 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 ~164 days

Recently: every ~65 days

Total

16

Last Release

1144d ago

Major Versions

v1.2.1 → v2.0.12019-11-09

v2.0.1 → v3.0.02022-06-26

v3.0.4 → v4.0.02023-03-01

### Community

Maintainers

![](https://www.gravatar.com/avatar/23ed91d104f16d10414811ecdafbd5c80a660e658d80ccaadf84f512cfb50629?d=identicon)[diversen](/maintainers/diversen)

---

Top Contributors

[![diversen](https://avatars.githubusercontent.com/u/142675?v=4)](https://github.com/diversen "diversen (31 commits)")[![samwilson](https://avatars.githubusercontent.com/u/213655?v=4)](https://github.com/samwilson "samwilson (1 commits)")

---

Tags

argvphpphp-argvphp-argv-parsercliconsoleargv

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/diversen-parse-argv/health.svg)

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

###  Alternatives

[symfony/console

Eases the creation of beautiful and testable command line interfaces

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

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

4.6k331.8M8.4k](/packages/nunomaduro-collision)[nunomaduro/termwind

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

2.5k239.8M280](/packages/nunomaduro-termwind)[wp-cli/php-cli-tools

Console utilities for PHP

68325.0M364](/packages/wp-cli-php-cli-tools)[php-school/cli-menu

A command line menu helper in PHP

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

Allows you to prompt for user input on the command line, and optionally hide the characters they type

24725.8M17](/packages/seld-cli-prompt)

PHPackages © 2026

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