PHPackages                             hokny/console-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. [CLI &amp; Console](/categories/cli)
4. /
5. hokny/console-select

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

hokny/console-select
====================

A fancy selection interface for symfony's console component.

3.0.1(5y ago)066MITPHPPHP &gt;=7.2.5

Since May 21Pushed 5y agoCompare

[ Source](https://github.com/hokny/console-select)[ Packagist](https://packagist.org/packages/hokny/console-select)[ RSS](/packages/hokny-console-select/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependencies (4)Versions (8)Used By (0)

Console-Selection
=================

[](#console-selection)

A fancy selection interface for symfony's console component.

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/ad5839dc99ec86477a72e8b2ee437cdd244f6409fff13f58ff10f607fec37d80/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f656464697269617274652f636f6e736f6c652d73656c6563742f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/eddiriarte/console-select/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/7a855576880e42cc8646941f8ec14aac66432553bda09857abf0588fef6baa6b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f656464697269617274652f636f6e736f6c652d73656c6563742f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/eddiriarte/console-select/?branch=master)[![Build Status](https://camo.githubusercontent.com/76f585a58dbb8b93cbf3f1a90946a9c2ee9c866f88492dd1731343ed63d63d9c/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f656464697269617274652f636f6e736f6c652d73656c6563742f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/eddiriarte/console-select/build-status/master)

[![gluten-free](https://camo.githubusercontent.com/ffa03a466c2be613abb2ff8a35ded2295354f490bc4681ab86b59edb2d74d2d7/687474703a2f2f666f7274686562616467652e636f6d2f696d616765732f6261646765732f676c7574656e2d667265652e737667)](https://camo.githubusercontent.com/ffa03a466c2be613abb2ff8a35ded2295354f490bc4681ab86b59edb2d74d2d7/687474703a2f2f666f7274686562616467652e636f6d2f696d616765732f6261646765732f676c7574656e2d667265652e737667)[![built-by-developers](https://camo.githubusercontent.com/0500e27fcd4b4f7e01d2adc0aa3f86ccf34c369c2297ec3acd9fe06320a47d52/687474703a2f2f666f7274686562616467652e636f6d2f696d616765732f6261646765732f6275696c742d62792d646576656c6f706572732e737667)](https://camo.githubusercontent.com/0500e27fcd4b4f7e01d2adc0aa3f86ccf34c369c2297ec3acd9fe06320a47d52/687474703a2f2f666f7274686562616467652e636f6d2f696d616765732f6261646765732f6275696c742d62792d646576656c6f706572732e737667)[![check-it-out](https://camo.githubusercontent.com/a3a77ec618420f73848397d7479768d10c83ab93ef32b0473901feabf03261aa/687474703a2f2f666f7274686562616467652e636f6d2f696d616765732f6261646765732f636865636b2d69742d6f75742e737667)](https://camo.githubusercontent.com/a3a77ec618420f73848397d7479768d10c83ab93ef32b0473901feabf03261aa/687474703a2f2f666f7274686562616467652e636f6d2f696d616765732f6261646765732f636865636b2d69742d6f75742e737667)

[![Sample](docs/sample.gif)](docs/sample.gif)

Requirements
------------

[](#requirements)

This project is inteded to be runned with one of this frameworks:

- laravel 5.6+
- symfony 5.0+
- laravel-zero 5.6+

Install
-------

[](#install)

```
composer require eddiriarte/console-select
```

### On Laravel/Laravel-Zero

[](#on-laravellaravel-zero)

Add the `SelectServiceProvider` to your provider list

```
// app.php
'providers' => [
    EddIriarte\Console\Providers\SelectServiceProvider::class,
],
```

### On Symfony

[](#on-symfony)

Add the `EddIriarte\Console\Traits\SelectableInputs` trait to your command class

```
# importing : \EddIriarte\Console\Helpers\SelectionHelper
# pasing the input and output interfaces
$this->getHelperSet()->set(
  new SelectionHelper($this->input, $this->output)
);
```

Checkboxes
----------

[](#checkboxes)

Useful when you need several answers from the user.

```
$selected = $this->select(
  'Select characters that appeared in "Star Wars,  Episode I - The phantom menace"',
  [
    'Ahsoka Tano',
    'Anakin Skywalker',
    'Boba Fett',
    'Chewbacca',
    'Count Dooku',
    'Darth Maul',
    'Darth Vader',
    'Finn',
    'Han Solo',
    'Jabba the Hutt',
    'Jar Jar Binks',
    'Kylo Ren',
    'Lando Calrissian',
    'Luke Skywalker',
    'Mace Windu',
    'Obi-Wan Kenobi',
    'Padmé Amidala',
    'Sheev Palpatine',
    'Poe Dameron',
    'Princess Leia Organa',
    'Qui-Gon Jinn',
    'Rey',
    'Watto',
    'Yoda',
  ]
);
```

Radio
-----

[](#radio)

Useful when you need the user to pick only one anwer from the list.

```
$selected = $this->select(
  'What is the name of the ancient Jedi master that lives at the swamps of Dagobah',
  [
    'Ahsoka Tano',
    'Anakin Skywalker',
    'Boba Fett',
    'Chewbacca',
    'Count Dooku',
    'Darth Maul',
    'Darth Vader',
    'Finn',
    'Han Solo',
    'Jabba the Hutt',
    'Jar Jar Binks',
    'Kylo Ren',
    'Lando Calrissian',
    'Luke Skywalker',
    'Mace Windu',
    'Obi-Wan Kenobi',
    'Padmé Amidala',
    'Sheev Palpatine',
    'Poe Dameron',
    'Princess Leia Organa',
    'Qui-Gon Jinn',
    'Rey',
    'Watto',
    'Yoda',
  ],
  false // third argument(bool) that allows multiple selections (default: true)
);
```

Still to do
-----------

[](#still-to-do)

- Handle user-interruptions, such as `Ctrl+C`

MIT License
-----------

[](#mit-license)

Copyright (c) 2018 Eduardo Iriarte

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 63% 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 ~183 days

Recently: every ~229 days

Total

6

Last Release

1999d ago

Major Versions

1.0.0 → 2.0.02018-07-17

2.0.2 → 3.0.12020-11-24

PHP version history (2 changes)1.0.0-rc1PHP &gt;=7.1

3.0.1PHP &gt;=7.2.5

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/68657229?v=4)[hokny](/maintainers/hokny)[@hokny](https://github.com/hokny)

---

Top Contributors

[![eddiriarte](https://avatars.githubusercontent.com/u/6428870?v=4)](https://github.com/eddiriarte "eddiriarte (17 commits)")[![tomsihap](https://avatars.githubusercontent.com/u/6191094?v=4)](https://github.com/tomsihap "tomsihap (8 commits)")[![askajkeee](https://avatars.githubusercontent.com/u/22589069?v=4)](https://github.com/askajkeee "askajkeee (2 commits)")

---

Tags

cliconsolesymfonylibraryselectcheckboxradio

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/hokny-console-select/health.svg)

```
[![Health](https://phpackages.com/badges/hokny-console-select/health.svg)](https://phpackages.com/packages/hokny-console-select)
```

###  Alternatives

[nunomaduro/collision

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

4.6k331.8M8.5k](/packages/nunomaduro-collision)[eddiriarte/console-select

A fancy selection interface for symfony's console component.

117.2k2](/packages/eddiriarte-console-select)[nunomaduro/laravel-console-menu

Laravel Console Menu is an output method for your Laravel/Laravel Zero commands.

815412.0k48](/packages/nunomaduro-laravel-console-menu)[nunomaduro/laravel-console-task

Laravel Console Task is a output method for your Laravel/Laravel Zero commands.

2582.1M11](/packages/nunomaduro-laravel-console-task)[nunomaduro/laravel-console-summary

A Beautiful Laravel Console Summary for your Laravel/Laravel Zero commands.

662.0M3](/packages/nunomaduro-laravel-console-summary)[nunomaduro/laravel-console-dusk

Laravel Console Dusk allows the usage of Laravel Dusk in Laravel/Laravel Zero artisan commands.

16255.4k7](/packages/nunomaduro-laravel-console-dusk)

PHPackages © 2026

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