PHPackages                             objective-php/cli - 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. objective-php/cli

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

objective-php/cli
=================

Cli commands handling library

v3.1.0(6y ago)197.8k↓31.8%1[2 issues](https://github.com/objective-php/cli/issues)5GPL-3.0PHPCI failing

Since Mar 17Pushed 6y ago4 watchersCompare

[ Source](https://github.com/objective-php/cli)[ Packagist](https://packagist.org/packages/objective-php/cli)[ RSS](/packages/objective-php-cli/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (21)Used By (5)

Objective PHP / Command Line Interface [![Build Status](https://camo.githubusercontent.com/ce4e81bf676355fe391ea12ad15457d6030844de4099a59e801fc509c33fe5d3/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f6f626a6563746976652d7068702f636c692e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/objective-php/services-factory)
===================================================================================================================================================================================================================================================================================================================================================

[](#objective-php--command-line-interface-)

Description
-----------

[](#description)

CLI components allow to create command that are routable on CLI only.

The main main focus of this component is put on:

- implements maintenance scripts within the application
- reuse most of what is done for the main application in a CLI context

The CLI package provides Objective PHP applications with several components:

- CliRequest
    - this one will be used by the RequestWrapper from `objective-php/application` to expose CLI arguments to the routed action
- CliRouter
    - this component works together with the `MetaRouter` class from the `objective-php/router` package
    - it is needed to register then route the command line actions
    - the `CliRouter` is also responsible for triggering actions's parameter hydration
- CliParameterContainer
    - this is where the CLI parameters are stored
- AbstractCliAction
    - base class to extend for writing CLI actions

What's next
-----------

[](#whats-next)

Next release with provide the developer with some more base action classes, especially targeted at creating workers.

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

[](#installation)

### Manual

[](#manual)

You can clone our Github repository by running:

```
git clone http://github.com/objective-php/

```

This is the way you should get the code only if you intend to work on it.

### Composer

[](#composer)

Most typical use case is to require `objective-php/cli` from an existing Objective PHP application:

```
composer require objective-php/cli

```

How to test the work in progress?
---------------------------------

[](#how-to-test-the-work-in-progress)

### Run unit tests

[](#run-unit-tests)

First of all, before playing around with our services factory, please always run the unit tests suite. Our tests are written using PHPUnit, and can be run as follow:

```
cd [clone directory]
vendor/bin/phpunit tests

```

### Write your first CLI command

[](#write-your-first-cli-command)

To be continued...

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 95.7% 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 ~54 days

Recently: every ~110 days

Total

19

Last Release

2365d ago

Major Versions

v1.2.0 → V2.0.0-BETA12018-05-24

v1.2.1 → v3.0.02019-06-01

### Community

Maintainers

![](https://www.gravatar.com/avatar/35ff61d55f3f648d8c1046aac3892fba4781067c98c5cf7e364767f8ca033166?d=identicon)[gauthier](/maintainers/gauthier)

---

Top Contributors

[![gauthier](https://avatars.githubusercontent.com/u/32955?v=4)](https://github.com/gauthier "gauthier (22 commits)")[![fanshan](https://avatars.githubusercontent.com/u/1986015?v=4)](https://github.com/fanshan "fanshan (1 commits)")

---

Tags

cliobjective php

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/objective-php-cli/health.svg)

```
[![Health](https://phpackages.com/badges/objective-php-cli/health.svg)](https://phpackages.com/packages/objective-php-cli)
```

###  Alternatives

[symfony/console

Eases the creation of beautiful and testable command line interfaces

9.8k1.1B11.3k](/packages/symfony-console)[nunomaduro/collision

Cli error handling for console/command-line PHP applications.

4.6k331.8M8.5k](/packages/nunomaduro-collision)[nunomaduro/termwind

It's like Tailwind CSS, but for the console.

2.5k239.8M286](/packages/nunomaduro-termwind)[wp-cli/wp-cli

WP-CLI framework

5.1k17.2M320](/packages/wp-cli-wp-cli)[wp-cli/php-cli-tools

Console utilities for PHP

68325.0M367](/packages/wp-cli-php-cli-tools)[getkirby/cli

Kirby command line interface

6268.7k27](/packages/getkirby-cli)

PHPackages © 2026

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