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

Abandoned → [grizz-it/command](/?search=grizz-it%2Fcommand)ArchivedLibrary[CLI &amp; Console](/categories/cli)

ulrack/command
==============

Command routing for PHP applications.

2.0.3(5y ago)1141MITPHPPHP ^7.3

Since Feb 27Pushed 5y ago1 watchersCompare

[ Source](https://github.com/ulrack/command)[ Packagist](https://packagist.org/packages/ulrack/command)[ RSS](/packages/ulrack-command/feed)WikiDiscussions master Synced 1w ago

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

DEPRECATION NOTICE: this package has been moved and improved at [grizz-it/command](https://github.com/grizz-it/command) and [ulrack/cli-application](https://github.com/ulrack/cli-application)
===============================================================================================================================================================================================

[](#deprecation-notice-this-package-has-been-moved-and-improved-at-grizz-itcommand-and-ulrackcli-application)

[![Build Status](https://camo.githubusercontent.com/93b58ce9a1ef4b0e6b9a86df8a3e5b047c1f5f259f7d5cfe183668d21622b6e3/68747470733a2f2f7472617669732d63692e636f6d2f756c7261636b2f636f6d6d616e642e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/ulrack/command)

Ulrack Command
==============

[](#ulrack-command)

This package supplies command routing for PHP applications.

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

[](#installation)

To install the package run the following command:

```
composer require ulrack/command

```

Usage
-----

[](#usage)

### [Command configuration](src/Dao/CommandConfiguration.php)

[](#command-configuration)

Command configuration is done through an object. The main command configuration should be an empty instance of this class. This main object can then be supplied to the [router](src/Common/Router/RouterInterface.php).

All sub-commands can be added to their respective command configuration instance. This can be infinitely deep. All command configuration instances have the following flags configured by default:

- `no-interaction`, disables the interactive reader.
- `help`, displays help text for the execution of the command.
- `verbose`, displays additional information about the execution of the command.
- `quiet`, suppresses the output of the command. Sub-commands of a parent command can be executed by separating them by a space.

### [Router](src/Component/Router/CommandRouter.php)

[](#router)

The command router performs the routing of commands. It creates an instance of the `service` and executes it. This service object must implement the [CommandInterface](src/Common/Command/CommandInterface.php).

To find out more about how services work, see the `ulrack/services` package.

### Input and Output

[](#input-and-output)

The [input](src/Component/Command/Input.php) is an object which provides the input to the implementation of the command. The [output](src/Component/Command/Output.php) provides a standard set of methods for displaying output to the user of the application. The input instance can be created by providing the `$argv` to the `create` method of the [InputFactory](src/Factory/InputFactory.php).

### Standard commands

[](#standard-commands)

The package contains two standard commands for displaying a command [list](src/Command/ListCommandsCommand.php)and showing a command [explanation](src/Command/HelpCommand.php).

Examples
--------

[](#examples)

An example can be found in the [examples](examples) directory.

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CODE\_OF\_CONDUCT](CODE_OF_CONDUCT.md) for details.

MIT License
-----------

[](#mit-license)

Copyright (c) GrizzIT

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~21 days

Total

10

Last Release

2081d ago

Major Versions

1.0.5 → 2.0.02020-08-16

PHP version history (2 changes)1.0.0PHP ^7.2

2.0.0PHP ^7.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8682881?v=4)[GrizzIT](/maintainers/GrizzIT)[@grizzit](https://github.com/grizzit)

---

Top Contributors

[![mfrankruijter](https://avatars.githubusercontent.com/u/8653925?v=4)](https://github.com/mfrankruijter "mfrankruijter (11 commits)")

---

Tags

clicommandcommand-linephpulrackclicommand

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/ulrack-command/health.svg)

```
[![Health](https://phpackages.com/badges/ulrack-command/health.svg)](https://phpackages.com/packages/ulrack-command)
```

###  Alternatives

[league/climate

PHP's best friend for the terminal. CLImate allows you to easily output colored text, special formats, and more.

1.9k14.0M273](/packages/league-climate)[nategood/commando

PHP CLI Commando Style

8123.3M38](/packages/nategood-commando)[helhum/typo3-console

A reliable and powerful command line interface for TYPO3 CMS

2939.0M192](/packages/helhum-typo3-console)[adhocore/cli

Command line interface library for PHP

3501.2M50](/packages/adhocore-cli)[aplus/cli

Aplus Framework CLI Library

2301.7M6](/packages/aplus-cli)[aura/cli

Provides the equivalent of request (Context) and response (Stdio) classes for a command line environment, including Getopt support.

1051.6M29](/packages/aura-cli)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
