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

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

inanepain/cli
=============

Utilities to simplify working with the console.

0.17.0(9mo ago)1221UnlicensePHPPHP &gt;=8.1

Since May 12Pushed 1w ago1 watchersCompare

[ Source](https://github.com/inanepain/cli)[ Packagist](https://packagist.org/packages/inanepain/cli)[ Docs](https://github.com/inanepain/cli)[ RSS](/packages/inanepain-cli/feed)WikiDiscussions develop Synced today

READMEChangelogDependencies (1)Versions (15)Used By (1)

inanepain/cli [![icon](./icon.png "inanepain/cli")](./icon.png)
===============================================================

[](#inanepaincli-)

Table of Contents

- [![icon](./icon.png "inanepain/cli") inanepain/cli](#inanepaincli)
- [1. Install](#install)
- [2. Function List](#function-list)
- [3. Progress Indicators](#progress-indicators)
- [4. Tabular Display](#tabular-display)
- [5. TextTable Display](#texttable-display)
- [6. Tree Display](#tree-display)
- [7. Argument Parser](#argument-parser)
- [8. Usage](#usage)
- [9. Todo](#todo)

[![icon](./icon.png "inanepain/cli")](./icon.png) inanepain/cli
---------------------------------------------------------------

[](#-inanepaincli)

Utilities to simplify working with the console.

Requirements

- PHP &gt;= 8.4

Suggested PHP extensions

- mbstring - Used for calculating string widths.

1. Install
----------

[](#1-install)

composer

```
composer require inanepain/cli
```

2. Function List
----------------

[](#2-function-list)

- `Inane\Cli\out($msg, …​)`
- `Inane\Cli\out_padded($msg, …​)`
- `Inane\Cli\err($msg, …​)`
- `Inane\Cli\line($msg = '', …​)`
- `Inane\Cli\input()`
- `Inane\Cli\prompt($question, $default = false, $marker = ':')`
- `Inane\Cli\choose($question, $choices = 'yn', $default = 'n')`
- `Inane\Cli\menu($items, $default = false, $title = 'Choose an Item')`

3. Progress Indicators
----------------------

[](#3-progress-indicators)

- `Inane\Cli\notify\Dots($msg, $dots = 3, $interval = 100)`
- `Inane\Cli\notify\Spinner($msg, $interval = 100)`
- `Inane\Cli\progress\Bar($msg, $total, $interval = 100)`

4. Tabular Display
------------------

[](#4-tabular-display)

- `Inane\Cli\Table::__construct(array $headers = null, array $rows = null)`
- `Inane\Cli\Table::setHeaders(array $headers)`
- `Inane\Cli\Table::setRows(array $rows)`
- `Inane\Cli\Table::setRenderer(cli\table\Renderer $renderer)`
- `Inane\Cli\Table::addRow(array $row)`
- `Inane\Cli\Table::sort($column)`
- `Inane\Cli\Table::display()`

The display function will detect if output is piped and, if it is, render a tab delimited table instead of the ASCII table rendered for visual display.

You can also explicitly set the renderer used by calling `Inane\Cli\Table::setRenderer()` and giving it an instance of one of the concrete `Inane\Cli\table\Renderer` classes.

5. TextTable Display
--------------------

[](#5-texttable-display)

Alternative table display.

```
$tt = new \Inane\Cli\TextTable();
$tt->addHeader(['Name', 'Description']);
$tt->addRow(['TextTable', 'Alternative table display.']);
echo $tt->render();
```

6. Tree Display
---------------

[](#6-tree-display)

- `Inane\Cli\Tree::__construct()`
- `Inane\Cli\Tree::setData(array $data)`
- `Inane\Cli\Tree::setRenderer(cli\tree\Renderer $renderer)`
- `Inane\Cli\Tree::render()`
- `Inane\Cli\Tree::display()`

7. Argument Parser
------------------

[](#7-argument-parser)

Argument parsing uses a simple framework for taking a list of command line arguments, usually straight from `$_SERVER['argv']`, and parses the input against a set of defined rules.

Check `examples/arguments.php` for an example.

8. Usage
--------

[](#8-usage)

See `examples/` directory for examples.

9. Todo
-------

[](#9-todo)

- Expand this README
- Add doc blocks to rest of code

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance79

Regular maintenance activity

Popularity8

Limited adoption so far

Community24

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~249 days

Total

13

Last Release

292d ago

PHP version history (4 changes)0.10.0PHP &gt;= 5.3.0

0.10.2PHP &gt;= 7.1.0

0.12.0PHP &gt;= 8.1.0

0.12.1PHP &gt;=8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1823594?v=4)[Philip Michael Raab](/maintainers/inanepain)[@inanepain](https://github.com/inanepain)

---

Top Contributors

[![inanepain](https://avatars.githubusercontent.com/u/1823594?v=4)](https://github.com/inanepain "inanepain (139 commits)")[![danielbachhuber](https://avatars.githubusercontent.com/u/36432?v=4)](https://github.com/danielbachhuber "danielbachhuber (72 commits)")[![jlogsdon](https://avatars.githubusercontent.com/u/88460?v=4)](https://github.com/jlogsdon "jlogsdon (57 commits)")[![gitlost](https://avatars.githubusercontent.com/u/481982?v=4)](https://github.com/gitlost "gitlost (36 commits)")[![schlessera](https://avatars.githubusercontent.com/u/83631?v=4)](https://github.com/schlessera "schlessera (10 commits)")[![tollmanz](https://avatars.githubusercontent.com/u/921795?v=4)](https://github.com/tollmanz "tollmanz (8 commits)")[![igorsantos07](https://avatars.githubusercontent.com/u/532299?v=4)](https://github.com/igorsantos07 "igorsantos07 (7 commits)")[![miya0001](https://avatars.githubusercontent.com/u/309946?v=4)](https://github.com/miya0001 "miya0001 (7 commits)")[![scribu](https://avatars.githubusercontent.com/u/225715?v=4)](https://github.com/scribu "scribu (6 commits)")[![jesseoverright](https://avatars.githubusercontent.com/u/2953809?v=4)](https://github.com/jesseoverright "jesseoverright (5 commits)")[![urlund](https://avatars.githubusercontent.com/u/376721?v=4)](https://github.com/urlund "urlund (4 commits)")[![lf-jeremy](https://avatars.githubusercontent.com/u/9966465?v=4)](https://github.com/lf-jeremy "lf-jeremy (4 commits)")[![dllh](https://avatars.githubusercontent.com/u/2738252?v=4)](https://github.com/dllh "dllh (2 commits)")[![nochso](https://avatars.githubusercontent.com/u/6887618?v=4)](https://github.com/nochso "nochso (2 commits)")[![thanj](https://avatars.githubusercontent.com/u/1890887?v=4)](https://github.com/thanj "thanj (2 commits)")[![tiagohillebrandt](https://avatars.githubusercontent.com/u/1733911?v=4)](https://github.com/tiagohillebrandt "tiagohillebrandt (2 commits)")[![Luxian](https://avatars.githubusercontent.com/u/639419?v=4)](https://github.com/Luxian "Luxian (2 commits)")[![leewillis77](https://avatars.githubusercontent.com/u/1097338?v=4)](https://github.com/leewillis77 "leewillis77 (2 commits)")[![dpiquet](https://avatars.githubusercontent.com/u/4688628?v=4)](https://github.com/dpiquet "dpiquet (1 commits)")[![Nyholm](https://avatars.githubusercontent.com/u/1275206?v=4)](https://github.com/Nyholm "Nyholm (1 commits)")

---

Tags

clicomposerconsoleinanepainlibraryphputilitycliconsoleutilityinane

### Embed Badge

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

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

###  Alternatives

[symfony/console

Eases the creation of beautiful and testable command line interfaces

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

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

4.7k357.7M11.1k](/packages/nunomaduro-collision)[nunomaduro/termwind

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

2.5k271.5M386](/packages/nunomaduro-termwind)[wp-cli/php-cli-tools

Console utilities for PHP

68227.8M374](/packages/wp-cli-php-cli-tools)[php-school/cli-menu

A command line menu helper in PHP

1.9k1.2M30](/packages/php-school-cli-menu)[seld/cli-prompt

Allows you to prompt for user input on the command line, and optionally hide the characters they type

24826.6M24](/packages/seld-cli-prompt)

PHPackages © 2026

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