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

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

innmind/cli
===========

Library to build CLI tools

5.0.0(3mo ago)172.9k↓27.3%[1 issues](https://github.com/Innmind/CLI/issues)13MITPHPPHP ~8.4CI passing

Since Feb 22Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/Innmind/CLI)[ Packagist](https://packagist.org/packages/innmind/cli)[ Docs](http://github.com/Innmind/CLI)[ RSS](/packages/innmind-cli/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (9)Dependencies (9)Versions (37)Used By (13)

CLI
===

[](#cli)

[![CI](https://github.com/Innmind/CLI/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/Innmind/CLI/actions/workflows/ci.yml)[![codecov](https://camo.githubusercontent.com/2ad2cce211d56d716c00179fa303f232013be5035487099b4d141d44be184c53/68747470733a2f2f636f6465636f762e696f2f67682f496e6e6d696e642f434c492f6272616e63682f646576656c6f702f67726170682f62616467652e737667)](https://codecov.io/gh/Innmind/CLI)[![Type Coverage](https://camo.githubusercontent.com/22af2282e721148f1ab1a3fd6b42ab1ae385498d471d337dc4f514a6efa0ce2e/68747470733a2f2f73686570686572642e6465762f6769746875622f496e6e6d696e642f434c492f636f7665726167652e737667)](https://shepherd.dev/github/Innmind/CLI)

CLI is a small library to wrap all the needed informations to build a command line tool. The idea to build this came while reading the [ponylang](https://www.ponylang.org/) [documentation](https://tutorial.ponylang.org/getting-started/how-it-works.html) realising that other languages use a similar approach for the entry point of the app, so I decided to have something similar for PHP.

The said approach is to have a `main` function as the starting point of execution of your code. This function has a the environment it runs in passed as argument so there's no need for global variables. However since not everything can be passed down as argument (it would complicate the interface), [ambient authority](https://en.wikipedia.org/wiki/Ambient_authority) can be exercised (as in regular PHP script).

Important

To correctly use this library you must validate your code with [`vimeo/psalm`](https://packagist.org/packages/vimeo/psalm)

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

[](#installation)

```
composer require innmind/cli
```

Documentation
-------------

[](#documentation)

Documentation can be found at .

###  Health Score

55

—

FairBetter than 98% of packages

Maintenance61

Regular maintenance activity

Popularity32

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity92

Battle-tested with a long release history

 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 ~93 days

Recently: every ~207 days

Total

32

Last Release

99d ago

Major Versions

1.8.1 → 2.0.02020-02-10

2.3.0 → 3.0.02022-06-24

3.6.0 → 4.0.02025-07-13

4.0.0 → 5.0.02026-02-08

PHP version history (6 changes)1.0.0PHP ~7.2

2.0.0PHP ~7.4

2.3.0PHP ~7.4|~8.0

3.0.0PHP ~8.1

3.4.0PHP ~8.2

5.0.0PHP ~8.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/851425?v=4)[Baptiste Langlade](/maintainers/Baptouuuu)[@Baptouuuu](https://github.com/Baptouuuu)

---

Top Contributors

[![Baptouuuu](https://avatars.githubusercontent.com/u/851425?v=4)](https://github.com/Baptouuuu "Baptouuuu (273 commits)")

---

Tags

cli

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/innmind-cli/health.svg)](https://phpackages.com/packages/innmind-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)[socialengine/sniffer-rules

A Lumen 5 and Laravel 5 SquizLabs Code Sniffer 2.0 artisan command. Detect violations of a defined coding standard. It helps your code remains clean and consistent.

1248.2k1](/packages/socialengine-sniffer-rules)

PHPackages © 2026

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