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

Abandoned → [symfony/console](/?search=symfony%2Fconsole)Library[CLI &amp; Console](/categories/cli)

gitory/pimple-cli
=================

CLI commands for Pimple applications

v1.0.0(11y ago)1221.6k1MITPHP

Since Sep 2Pushed 10y ago2 watchersCompare

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

READMEChangelogDependencies (2)Versions (2)Used By (0)

PimpleCli
=========

[](#pimplecli)

[![Build Status](https://camo.githubusercontent.com/8a6e9d75fe14a0bedc52c26b5fb23d0a47534f98d6d3111770e67aeb548321e8/68747470733a2f2f7472617669732d63692e6f72672f4769746f72792f70696d706c652d636c692e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Gitory/pimple-cli)[![Latest Stable Version](https://camo.githubusercontent.com/1147e72e9a31ea155629058e318281feb1c46314fdc181bd5e68c32d303861c1/68747470733a2f2f706f7365722e707567782e6f72672f6769746f72792f70696d706c652d636c692f762f737461626c652e737667)](https://packagist.org/packages/gitory/pimple-cli)[![License](https://camo.githubusercontent.com/3d555d386f6b086c8f347bd7ba43a21d7c03de6c010e2539cca80ea0fe2eb5da/68747470733a2f2f706f7365722e707567782e6f72672f6769746f72792f70696d706c652d636c692f6c6963656e73652e737667)](https://packagist.org/packages/gitory/pimple-cli)[![Total Downloads](https://camo.githubusercontent.com/605c6c292ea5230a316bfb45c939f167c0ead177458375c2a6dbfde89ff50607/68747470733a2f2f706f7365722e707567782e6f72672f6769746f72792f70696d706c652d636c692f646f776e6c6f6164732e737667)](https://packagist.org/packages/gitory/pimple-cli)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/6ddba1f5b04cfed4e2cfcd985741babd6c8b0d0b7ddb40ece0b75dd24484e8b0/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4769746f72792f70696d706c652d636c692f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Gitory/pimple-cli/?branch=master)

[PimpleCli on Packagist](https://packagist.org/packages/gitory/pimple-cli)

PimpleCli is a tool that makes it easy creating command line application.

PimpleCli works with a [Pimple](http://pimple.sensiolabs.org/) container (eg: a [Silex](http://silex.sensiolabs.org) application) and a Console Application (eg: using ). PimpleCli's role is to discover commands in the Pimple container to make them availlable the the Console Application.

Commands needs to be registered as a service with a name ending in '.command'. The command can be anything (class, callable, etc.) that the console application understand. When using the `Symfony\Component\Console\Application` command should extends `Symfony\Component\Console\Command\Command`. You can take a look at the [Console Components documentation](http://symfony.com/doc/current/components/console/introduction.html) to get started.

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

[](#installation)

Through Composer :

```
{
    "require": {
        "gitory/pimple-cli": "~1.0"
    }
}
```

Examples
--------

[](#examples)

### Silex 2

[](#silex-2)

**composer.json**

```
{
    "require": {
        "silex/silex": "~2.0@dev",
        "gitory/pimple-cli": "~1.0",
        "symfony/console": "~2.0"
    }
}
```

**GreetCommand.php**

```
namespace Acme\DemoBundle\Command;

use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;

class GreetCommand extends Command
{
    protected function configure()
    {
        $this
            ->setName('demo:greet')
            ->setDescription('Greet someone')
            ->addArgument('name', InputArgument::REQUIRED, 'Who do you want to greet?')
        ;
    }

    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $name = $input->getArgument('name');
        $text = 'Hello '.$name;
        $output->writeln($text);
    }
}
```

**index.php**

```
require_once __DIR__.'/vendor/autoload.php';
require_once 'GreetCommand.php';

$silexApp = new Silex\Application();
$silexApp->register(new Gitory\PimpleCli\ServiceCommandServiceProvider());

// add your command as services ending in '.command' in your DI
$silexApp['user.new.command'] = function () {
    return new Acme\DemoBundle\Command\GreetCommand();
};

$consoleApp = new Symfony\Component\Console\Application();
$consoleApp->addCommands($silexApp['command.resolver']->commands());
$consoleApp->run();
```

Launch in Cli : `php index.php demo:greet John`

[![command](/doc/screenshots/command.png?raw=true)](/doc/screenshots/command.png?raw=true)[![command](/doc/screenshots/help.png?raw=true)](/doc/screenshots/help.png?raw=true)

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 80% 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

Unknown

Total

1

Last Release

4276d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3943b5c35797d1ede53aaed3d6812e4cf5b2dba7619a00dc7a381480a7b3d330?d=identicon)[mathroc](/maintainers/mathroc)

![](https://avatars.githubusercontent.com/u/3630208?v=4)[Julien Richarte](/maintainers/MrJuliuss)[@MrJuliuss](https://github.com/MrJuliuss)

---

Top Contributors

[![mathroc](https://avatars.githubusercontent.com/u/291531?v=4)](https://github.com/mathroc "mathroc (4 commits)")[![bjornpost](https://avatars.githubusercontent.com/u/48628?v=4)](https://github.com/bjornpost "bjornpost (1 commits)")

### Embed Badge

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

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

###  Alternatives

[cilex/cilex

The PHP micro-framework for Command line tools based on the Symfony2 Components

6183.2M15](/packages/cilex-cilex)[cilex/console-service-provider

Console Service Provider

273.1M3](/packages/cilex-console-service-provider)[niktux/karma

CLI tool to manage environment dependent configuration

1816.0k](/packages/niktux-karma)

PHPackages © 2026

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