Input Helper
Convenience methods for basic terminal input.
use Ajaxray\AnsiKit\Support\Input;
$name = Input::line('Your name? [Anonymous] ', 'Anonymous');
$ok = Input::confirm('Are you sure to proceed?', true);
$bio = Input::multiline("Enter your bio. End with '---'", '---');
echo "Hi $name\n";
Notes
- Uses
readlinewhen available; falls back toSTDIN. confirm()default controls the Enter key behavior.