wpdiggerstudio / wpzylos-cli-devtool
Development CLI tool for scaffolding WPZylos plugins with generators for controllers, requests, migrations, and more
Fund package maintenance!
Paypal
Installs: 5
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/wpdiggerstudio/wpzylos-cli-devtool
Requires
- php: ^8.0
- symfony/console: ^6.0 || ^7.0
- wpdiggerstudio/wpzylos-cli-core: ^1.0
Requires (Dev)
- phpstan/phpstan: ^1.10
- phpunit/phpunit: ^9.6 || ^10.0
- squizlabs/php_codesniffer: ^3.7
README
Development CLI tool for scaffolding WPZylos plugins and generating boilerplate code.
๐ Full Documentation | ๐ Report Issues
โจ Features
- make:plugin โ Create a new plugin from the WPZylos scaffold
- make:controller โ Generate controller classes with CRUD methods
- make:request โ Generate FormRequest validation classes
- make:migration โ Generate database migration files
๐ Requirements
| Requirement | Version |
|---|---|
| PHP | ^8.0 |
| Symfony Console | ^6.0 || ^7.0 |
๐ Installation
Install as a dev dependency in your plugin:
composer require --dev wpdiggerstudio/wpzylos-cli-devtool
๐ Quick Start
After installing the package, you have two options to run CLI commands:
Option 1: Use Vendor Binary Directly
Run commands directly from vendor/bin:
vendor/bin/wpzylos list vendor/bin/wpzylos make:controller ProductController
Option 2: Create Root Executable (Recommended)
For a cleaner experience like Laravel's php artisan, run the installer once:
vendor/bin/wpzylos-install
This creates a wpzylos file in your project root. Then use:
php wpzylos list php wpzylos make:controller ProductController php wpzylos make:request StoreProductRequest php wpzylos make:migration create_products_table
๐ ๏ธ Available Commands
make:plugin
Create a new WPZylos plugin from the scaffold template.
# Using vendor binary vendor/bin/wpzylos make:plugin my-plugin # Or using root executable (after running wpzylos-install) php wpzylos make:plugin my-plugin php wpzylos make:plugin my-plugin --namespace=MyCompany\\MyPlugin
make:controller
Generate a controller class.
php wpzylos make:controller ProductController php wpzylos make:controller ProductController --resource
Options:
--resourceโ Generate a resource controller with CRUD methods (index, show, store, update, destroy)
make:request
Generate a FormRequest validation class.
php wpzylos make:request StoreProductRequest php wpzylos make:request UpdateUserRequest
make:migration
Generate a database migration file.
php wpzylos make:migration create_products_table php wpzylos make:migration create_orders_table --create=orders php wpzylos make:migration add_status_to_orders --table=orders
Options:
--create=<table>โ Generate migration for creating a new table--table=<table>โ Generate migration for modifying an existing table
๐ Generated File Locations
| Command | Output Path |
|---|---|
make:controller |
app/Http/Controllers/ |
make:request |
app/Http/Requests/ |
make:migration |
database/migrations/ |
๐ง Configuration
The CLI tool automatically detects your plugin's configuration from composer.json:
{
"autoload": {
"psr-4": {
"MyPlugin\\": "app/"
}
}
}
๐งช Testing
# Run all tests composer test # Run with coverage ./vendor/bin/phpunit --coverage-html coverage/
๐ฆ Related Packages
| Package | Description |
|---|---|
| wpzylos-cli-core | Stub compilation utilities |
| wpzylos-wp-cli | WP-CLI integration |
| wpzylos-scaffold | Plugin template |
| wpzylos-core | Application foundation |
๐ Documentation
For comprehensive documentation, tutorials, and API reference, visit wpzylos.com.
โ Support the Project
If you find this tool helpful, consider buying me a coffee! Your support helps maintain and improve the WPZylos ecosystem.
๐ License
MIT License. See LICENSE for details.
๐ค Contributing
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
Made with โค๏ธ by WPDiggerStudio