Installation

Requirements

RequirementVersion
PHP^8.0
ComposerAny
Symfony Console^6.0 or ^7.0

Install as Dev Dependency

Install in your WPZylos plugin project:

composer require --dev KYNetCode/wpzylos-cli-devtool

Usage Options

After installation, you have two ways to run CLI commands:

Option 1: Vendor Binary (Default)

Use the CLI directly from the vendor bin directory:

vendor/bin/wpzylos <command>

Examples:

vendor/bin/wpzylos list
vendor/bin/wpzylos make:controller ProductController
vendor/bin/wpzylos make:request StoreProductRequest
vendor/bin/wpzylos make:migration create_products_table

This works immediately after installation with no additional setup.


For a cleaner experience similar to Laravel's php artisan, you can create a root-level executable.

Step 1: Run the installer (one-time setup):

vendor/bin/wpzylos-install

This creates a wpzylos file in your project root directory.

Step 2: Use the shorter command:

php wpzylos <command>

Examples:

php wpzylos list
php wpzylos make:controller ProductController
php wpzylos make:request StoreProductRequest
php wpzylos make:migration create_products_table

Verify Installation

Check that the CLI is installed correctly:

# Using vendor binary
vendor/bin/wpzylos --version
vendor/bin/wpzylos list

# Or using root executable (after wpzylos-install)
php wpzylos --version
php wpzylos list

Expected output:

WPZylos CLI 1.0.0

Comparison: Which Option to Use?

Featurevendor/bin/wpzylosphp wpzylos
Setup RequiredNoneRun wpzylos-install once
Command LengthLongerShorter (like Laravel)
Works ImmediatelyYesAfter installer runs
Recommended ForQuick testingDaily development

Troubleshooting

Command Not Found

If vendor/bin/wpzylos is not found:

  1. Ensure the package is installed:
    composer show KYNetCode/wpzylos-cli-devtool
    
  2. Verify the bin file exists:
    ls vendor/bin/wpzylos
    
  3. Try reinstalling:
    composer remove KYNetCode/wpzylos-cli-devtool
    composer require --dev KYNetCode/wpzylos-cli-devtool
    

Root Executable Not Created

If vendor/bin/wpzylos-install does not create the file:

  1. Check for error messages in the output
  2. Ensure you have write permissions in the project root
  3. If a wpzylos file already exists, delete it first and run again

Next Steps