From 73dc933edb3ec872be9c6fc0911632712c4df262 Mon Sep 17 00:00:00 2001 From: Thomas Wunderlich Date: Thu, 7 Feb 2013 17:58:35 -0500 Subject: [PATCH] Moved Installation to near the top of readme Moved Installation to after Why in the readme so that using composer is obvious and nobody tries to run it without running composer (like I did) --- README.md | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 74a2a46..1c81c0d 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,24 @@ Commando is a PHP command line interface library that beautifies and simplifies PHP's `$argv` magic variable and global `$_SERVER['argv']` make me cringe, [`getopt`](http://php.net/manual/en/function.getopt.php) isn't all that much better, and most other PHP CLI libraries are far too OOP bloated. Commando gets down to business without a ton of overhead, removes the common boilerplate stuff when it comes to handling cli input, all while providing a clean and readable interface. +## Installation + +*Commando requires that you are running PHP 5.3 or higher.* + +Commando is [PSR-0](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md) compliant and can be installed using [Composer](http://getcomposer.org/). Add `nategood/commando` to your `composer.json` + + "require": { + "nategood/commando": "*" + } + +If you're new to Composer... + + - [Download and build Composer](http://getcomposer.org/download/) + - Make it [globally accessible](http://getcomposer.org/doc/00-intro.md#globally) + - `cd` to your the directory where you'll be writing your Commando script and run `composer install` + +*Currently installing via Composer is the only supported option.* + ## Example Here is an example of a PHP Commando script that gives a decent tour of Commando's features. Let's say it is in a file called `hello.php`. @@ -68,24 +86,6 @@ Things to note: - We can access option values in an array via a flags name OR it's alias - We can use closures to perform validation and map operations right as part of our option definition -## Installation - -*Commando requires that you are running PHP 5.3 or higher.* - -Commando is [PSR-0](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md) compliant and can be installed using [Composer](http://getcomposer.org/). Add `nategood/commando` to your `composer.json` - - "require": { - "nategood/commando": "*" - } - -If you're new to Composer... - - - [Download and build Composer](http://getcomposer.org/download/) - - Make it [globally accessible](http://getcomposer.org/doc/00-intro.md#globally) - - `cd` to your the directory where you'll be writing your Commando script and run `composer install` - -*Currently installing via Composer is the only supported option.* - ## Baked in Help Commando has automatic `--help` support built in. Calling your script with this flag will print out a pretty help page based on your option definitions and Commando settings. If you define an option with the alias of 'help', it will override this built in support.