PHPackages                             iwnnay/scriptopts - 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. iwnnay/scriptopts

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

iwnnay/scriptopts
=================

This is a library to help quickly add options and help menus to PHP written command line scripts.

1.0.3(3y ago)063Apache 2.0PHP

Since Apr 24Pushed 3y agoCompare

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

READMEChangelogDependenciesVersions (5)Used By (0)

ScriptOpts
==========

[](#scriptopts)

PHP library to help pass options and make a quick help screen for command line scripts

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

[](#installation)

ScriptOpts is designed to be a portable library with one main class and a series of exceptions. It can of course be cloned directly from GitHub, but I'd highly recommend downloading it using [Composer](https://getcomposer.org/). With composer the installation is fairly regular.

If you do not have a `composer.json` already in project root then you can run

```
composer init

```

You can either add it during the interactive part of the `composer init` or enter it after in the `composer.json` like so:

```
"require": {
    "iwnnay/scriptopts": "~1.0.0"
}

```

and then run

```
composer install

```

#### OR

[](#or)

If you're not keen on manually installing it you can always just do this instead:

```
composer require iwnnay/scriptopts:1.*

```

Usage
-----

[](#usage)

As always, when using Composer to install your applications you'll have access to the handy `vendor/autoload.php`. You should either be requiring that in your app or right away in the script in which you intend to use ScriptOpts.

```
