PHPackages                             mortenscheel/php-inquirer - 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. mortenscheel/php-inquirer

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

mortenscheel/php-inquirer
=========================

Beautiful command-line prompts for PHP

v0.2(1y ago)116PHPPHP ^8.2

Since Jul 7Pushed 1y ago1 watchersCompare

[ Source](https://github.com/mortenscheel/php-inquirer)[ Packagist](https://packagist.org/packages/mortenscheel/php-inquirer)[ RSS](/packages/mortenscheel-php-inquirer/feed)WikiDiscussions master Synced 1mo ago

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

[![Latest Version on Packagist](https://camo.githubusercontent.com/7f9c9a1b2bd06991d6e9afcfba2578bf503394ffa98909c4de11b0f4137affc3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6f7274656e73636865656c2f7068702d696e7175697265722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mortenscheel/php-inquirer)[![Total Downloads](https://camo.githubusercontent.com/fe6f6999a6b91a334715c4057f395bf10c341f514e6d5a76319ee3bdc5be979d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6f7274656e73636865656c2f7068702d696e7175697265722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mortenscheel/php-inquirer)

PHP Inquirer
============

[](#php-inquirer)

Beautiful interactive CLI prompts for PHP, based on the Rust [inquire](https://github.com/mikaelmello/inquire) crate.

Demo
----

[](#demo)

```
$name = Text::make()->prompt('Name')->placeholder('John Doe')->run();
$password = Password::make()->prompt('Password')->confirm()->run();
$birthday = Date::make()->prompt('Birthday')->maxDate(date('Y-m-d'))->run();
$whitespace = Select::make()->prompt('Indentation')->options(['Tabs', 'Spaces'])->run();
$hobbies = MultiSelect::make()->options(['Programming', 'Music', 'Cooking'])->initial(['Programming'])->run();
$bio = Editor::make()->prompt('Your Bio')->hint('Close editor when finished')->run();
$confirm = Confirm::make()->prompt('Proceed')->default(true)->run();

echo json_encode(compact('name', 'password', 'birthday', 'whitespace', 'hobbies', 'bio', 'confirm'), JSON_PRETTY_PRINT);
```

[![](./demo.gif)](./demo.gif)

About
-----

[](#about)

This is a simple proof of concept. I like the interactive prompts provided by the inquire crate, and I wanted to see what it took to use them in PHP CLI scripts.

This package includes a simple Rust cli app, pre-compiled for Linux, Mac and Windows. The PHP library is a simple wrapper that calls the rust app using `exec()`. I wanted to use `symfony/process`, but I couldn't find a way to make it fully interactive, while also being able to capture the output and exit code.

Caveat about the `Editor` prompt: By default it uses the editor defined in `EDITOR` or `VISUAL` (falls back to `nano`). Unfortunately this wrapper doesn't support terminal editors, but using a GUI editor like vscode does work. To use VS Code as the editor, either `export VISUAL=code` or run the editor with `->program('code')`.

If you have suggestions, please open an issue or submit a PR.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

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

Total

2

Last Release

674d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6514342?v=4)[Morten Scheel](/maintainers/mortenscheel)[@mortenscheel](https://github.com/mortenscheel)

---

Top Contributors

[![mortenscheel](https://avatars.githubusercontent.com/u/6514342?v=4)](https://github.com/mortenscheel "mortenscheel (5 commits)")

###  Code Quality

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/mortenscheel-php-inquirer/health.svg)

```
[![Health](https://phpackages.com/badges/mortenscheel-php-inquirer/health.svg)](https://phpackages.com/packages/mortenscheel-php-inquirer)
```

###  Alternatives

[wp-cli/wp-cli

WP-CLI framework

5.0k17.2M320](/packages/wp-cli-wp-cli)[consolidation/annotated-command

Initialize Symfony Console commands from annotated command class methods.

22569.8M19](/packages/consolidation-annotated-command)[chi-teck/drupal-code-generator

Drupal code generator

26947.8M5](/packages/chi-teck-drupal-code-generator)[seld/cli-prompt

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

24725.8M17](/packages/seld-cli-prompt)[illuminate/console

The Illuminate Console package.

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

Comprehensive TUI library heavily influenced by Ratatui

589747.0k6](/packages/php-tui-php-tui)

PHPackages © 2026

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