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

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

ordinary/command
================

Library used to normalize the structure of files, functions, and classes intended to be ran from a shell.

2.3.0(3y ago)116MITPHPPHP ^8.2

Since Mar 29Pushed 3y ago1 watchersCompare

[ Source](https://github.com/brandonja991/ordinary-command)[ Packagist](https://packagist.org/packages/ordinary/command)[ RSS](/packages/ordinary-command/feed)WikiDiscussions main Synced today

READMEChangelog (7)Dependencies (10)Versions (8)Used By (0)

Ordinary Command
================

[](#ordinary-command)

Getting Started
---------------

[](#getting-started)

Install using composer.

```
composer require ordinary/command
```

Examples
--------

[](#examples)

### Directly in executable file

[](#directly-in-executable-file)

Create the class.

```
class MyCommand extends \Ordinary\Command\Command
{
    public function run() : int {
        // do something
        return 0; // int 0-255 exit status
    }

    public function showHelp() : void {
        fwrite($this->stdout(),
