PHPackages                             1338/smart-cli-select - 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. 1338/smart-cli-select

AbandonedLibrary

1338/smart-cli-select
=====================

cli tool

v1.2.1(4y ago)012BeerwarePHPPHP &gt;=7.4

Since Oct 29Pushed 4y ago1 watchersCompare

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

READMEChangelog (4)Dependencies (1)Versions (5)Used By (0)

smart-cli-select
================

[](#smart-cli-select)

Symfony selection helper

Select array/objects while being able to add new options

How to call:

```
    $smartCliSelect = new SmartCliSelect($inputInterface, $outputInterface, $questionHelper);

    $result = $smartSelector->smartSelect(
        "Question",
        ["preselected choices indexes"],
        ["choices"],
        false, // force preselection choices
        ["structure to create new options"]
    );
```

examples
--------

[](#examples)

Object

```
    $result = $smartSelector->smartSelect(
        "Select products",
        [$allProductsIndexedBySkus[0]],
        $allProductsIndexedBySkus,
        false, // force preselection choices
        ['type' => 'object']
    );

    $selectedProductIndices = $result['selected'];

    foreach ($result['new'] => $newProduct) {
        // do something to new objects, like for example:
        $this->entityManager->persist($newProduct);
        //
    }

    $allProductsIndexedBySkus += $result['new']; // add new products

    $selectedProducts = [];
    foreach ($selectedProductIndices as $index) {
        $selectedProducts[$index] = $allProductsIndexedBySkus[$index];
    }

```

Object with a subset of options to be filled

```
    $result = $smartSelector->smartSelect(
        "Select products",
        [$allProductsIndexedBySkus[0]],
        $allProductsIndexedBySkus,
        false, // force preselection choices
        [
            'type' => 'object',
            'options' => [
                'name', 'sku'
            ]
        ]
    );

    $selectedProductIndices = $result['selected'];

    foreach ($result['new'] => $newProduct) {
        // do something to new objects, like for example:
        $this->entityManager->persist($newProduct);
        //
    }

    $allProductsIndexedBySkus += $result['new']; // add new products

    $selectedProducts = [];
    foreach ($selectedProductIndices as $index) {
        $selectedProducts[$index] = $allProductsIndexedBySkus[$index];
    }
```

Array

```
            $hostResults = $smartSelector->smartSelect(
            'Select hosts',
            array_keys($this->instances),
            $this->input->getOption('host'),
            false, // force preselection choices
            [
                'options' => ['host', 'username', 'pass', 'port']
            ]
        );
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

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

Total

4

Last Release

1649d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8bda33d6cd3572015f89da20e18c7d20ce71a8c981c3a0ea38bc070953dca5e4?d=identicon)[1338](/maintainers/1338)

---

Top Contributors

[![1338](https://avatars.githubusercontent.com/u/3015701?v=4)](https://github.com/1338 "1338 (1 commits)")

### Embed Badge

![Health badge](/badges/1338-smart-cli-select/health.svg)

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

###  Alternatives

[phan/phan

A static analyzer for PHP

5.6k11.2M1.1k](/packages/phan-phan)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[php-soap/wsdl

Deals with WSDLs

173.5M12](/packages/php-soap-wsdl)[php-soap/wsdl-reader

A WSDL reader in PHP

212.3M9](/packages/php-soap-wsdl-reader)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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