wpdiggerstudio/wpzylos-cli-devtool

Development CLI tool for scaffolding WPZylos plugins with generators for controllers, requests, migrations, and more

Maintainers

Package info

github.com/WPDiggerStudio/wpzylos-cli-devtool

Documentation

pkg:composer/wpdiggerstudio/wpzylos-cli-devtool

Fund package maintenance!

Paypal

Statistics

Installs: 5

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.1 2026-02-04 19:22 UTC

This package is auto-updated.

Last update: 2026-06-14 11:47:58 UTC


README

PHP Version License GitHub

Development CLI tool for scaffolding WPZylos plugins and generating boilerplate code.

๐Ÿ“– Full Documentation | ๐Ÿ› Report Issues

โœจ Features

  • 42 Generator Commands โ€” Controllers, models, migrations, events, and 38 more
  • Smart Package Detection โ€” Warns if required packages are missing
  • Auto Context Resolution โ€” Reads namespace/slug from .plugin-config.json
  • Dry Run Mode โ€” Preview generated code before writing

๐Ÿ“‹ 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 (45+)

Core Generators

Command Description Output Path
make:plugin Scaffold a complete new plugin Project root
make:controller REST/HTTP controller app/Http/Controllers/
make:request FormRequest validation class app/Http/Requests/
make:migration Database migration database/migrations/
make:model Eloquent-style model app/Models/
make:provider Service provider app/Providers/
make:middleware HTTP middleware app/Http/Middleware/
make:service Service class app/Services/
make:config Configuration file config/
make:rest REST API controller app/Http/Controllers/
make:resource API resource transformer app/Http/Resources/

WordPress-Specific

Command Description Output Path
make:posttype Custom post type app/PostTypes/
make:taxonomy Custom taxonomy app/Taxonomies/
make:shortcode Shortcode handler app/Shortcodes/
make:menu Admin menu page app/Admin/
make:settings Settings page app/Admin/
make:metabox Meta box app/Admin/
make:columns Admin list table columns app/Admin/
make:widget WordPress widget app/Widgets/
make:block Gutenberg block app/Blocks/

Events & Lifecycle

Command Description Output Path
make:event Event class app/Events/
make:listener Event listener app/Listeners/
make:subscriber Event subscriber app/Listeners/
make:observer Model observer app/Observers/
make:action Action class app/Actions/
make:filter Filter class app/Filters/

Jobs & Scheduling

Command Description Output Path
make:job Queue job app/Jobs/
make:cron Cron/scheduled task app/Schedule/
make:schedule Schedule definition app/Schedule/

Code Structure

Command Description Output Path
make:ajax AJAX handler app/Http/Ajax/
make:asset Asset registration app/Assets/
make:cast Attribute cast app/Casts/
make:command CLI command app/Commands/
make:enum Enum class app/Enums/
make:exception Exception class app/Exceptions/
make:factory Model factory database/factories/
make:interface Interface/Contract app/Contracts/
make:mail Mailable class app/Mail/
make:notification Notification class app/Notifications/
make:policy Authorization policy app/Policies/
make:rule Validation rule app/Rules/
make:scope Query scope app/Scopes/
make:seeder Database seeder database/seeders/
make:test PHPUnit test tests/Unit/
make:trait Trait app/Traits/

๐Ÿ”ง Configuration

The CLI tool automatically detects your plugin's configuration from .plugin-config.json:

{
  "plugin": {
    "namespace": "MyPlugin",
    "slug": "my-plugin",
    "prefix": "mp_",
    "textDomain": "my-plugin",
    "version": "1.0.0"
  }
}

๐Ÿงช 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

๐Ÿ“„ License

MIT License. See LICENSE for details.

๐Ÿค Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

Made with โค๏ธ by WPDiggerStudio