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

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

celemas/cli
===========

Celemas cli tools runner

0.2.0(1mo ago)062↓25%2MITPHPPHP ^8.5CI passing

Since Jan 28Pushed 3w ago1 watchersCompare

[ Source](https://github.com/celemas/cli)[ Packagist](https://packagist.org/packages/celemas/cli)[ Docs](https://celemas.dev/cli)[ RSS](/packages/celemas-cli/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (1)Versions (5)Used By (2)

Celemas Cli
===========

[](#celemas-cli)

[![ci](https://github.com/celemas/cli/actions/workflows/ci.yml/badge.svg)](https://github.com/celemas/cli/actions)[![codecov](https://camo.githubusercontent.com/674d6c87c0764c93534e14bfb59eacbb447c1e3472ec7d296f5edecd84317345/68747470733a2f2f636f6465636f762e696f2f67682f63656c656d61732f636c692f67726170682f62616467652e7376673f746f6b656e3d46344f5a364556584b49)](https://codecov.io/gh/celemas/cli)[![psalm coverage](https://camo.githubusercontent.com/9ba7a508f1b91e810e84fbe23f1216f254a71a4bae8ac653449700e92d98d897/68747470733a2f2f73686570686572642e6465762f6769746875622f63656c656d61732f636c692f636f7665726167652e7376673f)](https://shepherd.dev/github/celemas/cli)[![psalm level](https://camo.githubusercontent.com/6ece54c7673baaf377ac65751cde7aa6974162fecffea78ff6aeccfabd02fd81/68747470733a2f2f73686570686572642e6465762f6769746875622f63656c656d61732f636c692f6c6576656c2e7376673f)](https://celemas.dev/cli)[![Software License](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](LICENSE.md)

A command line interface helper.

Features
--------

[](#features)

- Simple command creation with automatic help generation
- Built-in color support for terminal output
- Command-specific help with `php run help `
- Built-in `commands` command for shell autocomplete
- Support for `--key=value` and `--key value` option syntax
- Output helpers: `info()`, `success()`, `warn()`, `error()`, `echoln()`
- Text indentation and wrapping with `indent()`
- Debug mode for detailed error traces
- 100% test coverage

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

[](#installation)

```
composer require celemas/cli
```

Quick Start
-----------

[](#quick-start)

Create a command by extending `Celemas\Cli\Command`:

```
use Celemas\Cli\Command;

class MyCommand extends Command {
    protected string $name = 'mycommand';
    protected string $group = 'MyGroup';
    protected string $description = 'This is my command';

    public function run(): int
    {
        $this->info("Running my command");
        $this->success("Command completed!");
        return 0;
    }
}
```

Create a runner script:

```
