laravel/prompts
Laravel Prompts adds beautiful, user-friendly interactive forms to PHP CLIs, with browser-like UX such as placeholders and validation. Ideal for Laravel Artisan commands, but works in any command-line PHP project.
readline()/fgets() prompts with polished, browser-like forms. Reduces friction for non-technical users (e.g., ops teams, marketers) interacting with CLI tools.php artisan deploy) to standardize user input flows.php artisan setup:env).php artisan migrate --confirm).Adopt if:
y/n (e.g., forms, multi-step workflows).Look elsewhere if:
readline() inputs).bubbletea or cobra).For Executives: "Laravel Prompts lets us turn clunky CLI tools into polished, user-friendly experiences—like a browser form in the terminal. For example, instead of asking ops teams to manually edit YAML files or guess flags for deployments, we can build a guided workflow. This reduces errors, speeds up onboarding, and cuts support costs. It’s a low-code way to add professional-grade UX to internal tools without building a full web app. Think of it as ‘Figma for the command line’—but for our own scripts."
Key Metrics to Highlight:
For Engineers:
*"Prompts gives us a battle-tested, feature-rich way to handle interactive CLI input—no more hacking together readline() calls or parsing fgets(). Key features:
PHP_EOL, terminal resizing).DataTable, Task, Stream) and conditional logic.
Example use case: Replace our ad-hoc while loops for user confirmation with a confirm() prompt that includes dynamic context (e.g., ‘Deploy to staging? [y/N] (Affects 3 services)’).*Migration Path:
php artisan deploy) with Prompts.FormStep for multi-page workflows or DataTable for interactive data review.Risk Mitigation:
How can I help you explore Laravel packages today?