Skip to content

aaronfc/inquirer-php

Repository files navigation

inquirer-php (immature)

Code Coverage Badge

This aims to be something equivalent-ish to Inquirer.js or python-inquirer.

Status

This is in a very immature status — please do not use in anything serious (yet).

Usage

<?php

namespace Aaron\InquirerPhp;

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

$cli = new Cli();

$questions = [
    new Question\Text('name', 'What\'s your name?'),
    new Question\Confirm('continue', 'Should we continue?'),
    new Question\Select('tshirt_size', 'What\'s your t-shirt size?', ['s', 'm', 'l', 'xl']),
];

$answers = $cli->prompt($questions);

var_dump($answers);

About

Inquirer.js clone but for PHP.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages