PHPackages                             jjulien/php-cli-helper - 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. jjulien/php-cli-helper

ActiveLibrary

jjulien/php-cli-helper
======================

Helper for creating CLI based PHP programs

1.0.0(8y ago)016[5 issues](https://github.com/jjulien/php-cli-helper/issues)Apache-2.0PHPPHP &gt;=5.3.0

Since Nov 3Pushed 7y ago1 watchersCompare

[ Source](https://github.com/jjulien/php-cli-helper)[ Packagist](https://packagist.org/packages/jjulien/php-cli-helper)[ RSS](/packages/jjulien-php-cli-helper/feed)WikiDiscussions master Synced 2mo ago

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

[![Build Status](https://camo.githubusercontent.com/1813c2bbc5e0bb18e596e0d3a34668aaa288494108c9628dfdccbd775ace8d60/68747470733a2f2f7472617669732d63692e6f72672f6a6a756c69656e2f7068702d636c692d68656c7065722e706e67)](https://travis-ci.org/jjulien/php-cli-helper)

PHP CLI Helper
==============

[](#php-cli-helper)

PHP CLI Helper was created to make developing PHP command line tools easy. It currently supports command line option parsing and validation.

Usage Summary
-------------

[](#usage-summary)

The main class is the `CLIHelper\Helper`. You will tell this class all of the options you want to support and how you want that option to behave. After you tell the helper to parse the options, it will validate that the user has not violated any of the rules you defined for how your options should behave. If violations are found, the user receives a help message showing them how the option are suppose to work and which option rule they violated. If no violations are found, you then user the helper object to retrieve values for options and determine which options the user specified.

Usage Example
-------------

[](#usage-example)

**Code**

```
#!/usr/bin/php
