Download the PHP package beauty-framework/cli without Composer
On this page you can find all versions of the php package beauty-framework/cli. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download beauty-framework/cli
More information about beauty-framework/cli
Files in beauty-framework/cli
Informations about the package cli
Beauty CLI
The beauty-framework/cli package provides a simple, extensible command-line interface (CLI) system for the Beauty Framework. It supports framework-native commands (like code generation, migrations, and cache handling) as well as custom project-defined commands and module-level commands.
Features
- Command registration via configuration or DI
- PSR-compatible structure
- Built-in help/version commands
- Colorized output with support for
info(),warn(),error(),success(),debug()andtable() - Command auto-discovery and dynamic loading (planned)
- Code generators (controller, middleware, request, CLI command)
- Contract for custom registrator class (
\Beauty\Cli\Console\Contracts\CommandsRegistryInterface)
CLI Entry Point
Create a beauty executable file in the root of your project:
Make it executable:
Configuration
Define your commands in config/cli.php:
Alternatively, load them from modules:
Base Command API
Extend Beauty\Cli\AbstractCommand:
Use CliOutput for colorized output:
Flags like --verbose and --debug are supported automatically.
Code Generators
Run generators via:
Supports nested directories:
Creates app/Controllers/Admin/UserController.php
Stubs
All generator templates are located in beauty-framework/cli/stubs/. You can override them per project if needed by checking for project-local stub before falling back.
Stub placeholders:
{{ namespace }}{{ class }}{{ route }}(in controllers){{ command_name }}(in CLI commands)
Planned
- Module auto-discovery for commands
- Interactive prompts (ask, confirm, choice)
- Migrations, seeders, testing commands
- Override stubs
License
MIT