PHPackages                             irfantoor/command - 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. irfantoor/command

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

irfantoor/command
=================

Irfan's Command : Shell commands, using php

0.6(4y ago)0403↓83.3%2MITPHPPHP &gt;= 7.3

Since Jan 5Pushed 4y ago1 watchersCompare

[ Source](https://github.com/irfantoor/command)[ Packagist](https://packagist.org/packages/irfantoor/command)[ RSS](/packages/irfantoor-command/feed)WikiDiscussions main Synced 3d ago

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

Irfan's Command
===============

[](#irfans-command)

Simplest way to make your console commands.

Note: Since the inclusion of Irfan's Terminal ( irfantoor/terminal ), your commands can be run through a browser as well.

Installation
------------

[](#installation)

```
$ composer require irfantoor/command
```

Examples:

A simple command to say "Hello World!"" on command line. The default options of verbosity, version and help are defained by default. So you can do like:

```
$ php hello1.php --help
$ php hello1.php -V
$ php hello1.php -v
```

Note: If version is not provided while intialising, file named 'version' is searched in the parent directory where the /src directory is present, if found then its contents are used as version, or a default value of '0.1' is used. This is helpful if the version file is part of versioning system and is updated to the last version tag (see : examples/hello6.php)

ref: examples/hello1.php

```
