laranail/prompter

A Laravel package by `simtabi` that extends and adds new functionality to `laravel/prompts`, providing a fluent API for crafting CLI forms and additional validators.

v1.5.0 2024-06-10 16:51 UTC

This package is auto-updated.

Last update: 2024-12-10 21:17:20 UTC


README

Barua Banner
Prompter

A Laravel package by `simtabi` that extends and adds new functionality to the `laravel/prompts` package,
providing a fluent API for crafting CLI forms and additional validators.

Website · GitHub · Discord

Table of Contents

  1. Introduction
  2. Usage
  3. Validation
  4. Development
  5. Changelog
  6. Contributing
  7. Security
  8. Support
  9. Contributors
  10. Authors
  11. License

Prompter

Prompter is a powerful Laravel package that enhances the functionality, and acts as a fluent wrapper for the laravel/prompts CLI package. It is designed to make developing CLI applications easier, more robust, and more enjoyable. With Prompter, you get:

  • A fluent API for crafting complex CLI forms effortlessly.
  • An opinionated object-oriented chainable interface.
  • Numerous built-in validators to ensure data integrity and security.
  • Flexibility to define and use custom validators for specific business logic.

Key Features

  • Fluent API: Create complex CLI forms with ease using a fluent, readable, and maintainable API.
  • Validators: Use built-in validators like required, min, max, email, url, and regex, or create custom validators to meet your specific needs.
  • Chainable Interface: Enjoy an opinionated object-oriented chainable interface that simplifies CLI development.
  • Extended Functionality: Adds new functionalities and validators to the existing laravel/prompts package.

Prompter is perfect for developers looking to build robust CLI applications in Laravel, ensuring a smooth and efficient development process.

Introduction

This package aims to provide developers with enhanced mechanisms for creating intuitive CLI prompts. Building on the laravel/prompts package, it offers a more robust and feature-rich experience.

By extending laravel/prompts, this package retains all core features of the original while introducing new functionalities and validators to streamline CLI development. For a comprehensive understanding of the core features and functionalities, please refer to the laravel/prompts official documentation. This documentation will focus only on the additional features provided by Prompter.

Getting Started

This section will guide you through the initial setup and basic usage of this package, enabling you to quickly start creating intuitive CLI prompts.

Prerequisites

Before installing this package, make sure that your system meets the following requirements:

  • PHP >= 8.2.
  • Laravel >= 10.x.
  • Composer for managing dependencies.

Installation

Install the Package via Composer by running the following command in your current Laravel project directory:

composer require --dev laranail/prompter

Configuration

This package does not require any additional configuration. You can start using it right away after installation.

Usage

Please see USAGE guide for more information on how build forms, and use this package.

Development

Install dependencies

composer install

Tests

composer ci

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

Please see SECURITY for details.

Support

Please see Support and Community for details.

Contributors

Please see CONTRIBUTORS for details.

Authors

License

Open-sourced software licensed under the MIT license. Please see LICENSE for details.