saboohy/argv

A lightweight and developer-friendly PHP library for parsing command-line arguments.

Maintainers

Package info

github.com/saboohy/argv

pkg:composer/saboohy/argv

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.0 2026-06-06 01:30 UTC

This package is auto-updated.

Last update: 2026-06-06 01:53:46 UTC


README

Argv is a lightweight PHP library for parsing command-line arguments ($argv). It provides a simple API for extracting commands, options, flags, and arguments from CLI input.

Features

  • Parse commands from CLI input
  • Extract options and flags
  • Access positional arguments easily
  • Simple and intuitive API
  • Zero dependencies
  • PHP 8.2+ compatible

Requirements

  • PHP 8.2+
  • Composer

Installation

Install the package via Composer:

composer require saboohy/argv

Quick Start

<?php

use Saboohy\Argv\Input;

$input = new Input($argv);

print_r($input->getOptions());
print_r($input->getCommand());
print_r($input->getFlags());
print_r($input->getArguments());

License

This project is licensed under the MIT License.

Support

If you have any questions, issues, or feature requests, please open an issue on GitHub.