CLI Reference

Version 1.0.0

Command-line interface for the Laravel Extensions package

Global Options

All commands support these global options:

Option Description
-h, --help Display help for the command
-q, --quiet Do not output any message
-V, --version Display application version
--ansi Force ANSI output
-n, --no-interaction Do not ask any interactive question
-v, -vv, -vvv Increase verbosity level

Understanding Output

Extension List Output

The extension:list command shows a table with:

Column Description
Extension Point The fully qualified class name
Handler Handler class or “Closure”
Priority Execution order (higher = first)
Tags Handler tags for filtering

Stats Output

The extension:stats command displays:

  • Summary: Total extension points, handlers, groups, and tags
  • Circuit Breaker Status: Shows handlers with failures
  • Handler Groups: Group status (enabled/disabled)
  • Handler Tags: Tag counts and status

Inspect Output

The extension:inspect command shows:

  • Contracts: What interfaces the extension point implements
  • Properties: Constructor parameters
  • Handlers: All registered handlers with their priority, tags, type (async), and circuit breaker status

Circuit Breaker States

State Color Description
Closed Green Normal operation
Open Red Handler disabled due to failures
Half-Open Yellow Testing if handler recovered

Quick Start

# List all extension points
php artisan extension:list

# Check system health
php artisan extension:stats

# Inspect specific extension
php artisan extension:inspect UserCreated

# Cache for production
php artisan extension:cache

Commands

extension:list

$ extension:list

List all registered extension points and handlers

Options

Flag Type Default Description
boolean - Filter by extension point class name
boolean - Filter by handler class name
boolean - Show only extension points with no handlers
boolean - Filter by handler tag
boolean - Filter by handler group

Examples

extension:inspect

$ extension:inspect

Inspect a specific extension point in detail

Arguments

extension required
The extension point class name (full or partial)

Examples

extension:stats

$ extension:stats

Show extension execution statistics

Options

Flag Type Default Description
boolean - Filter by extension point

Examples

extension:test

$ extension:test

Test an extension point by dispatching a mock event

Arguments

extension required
The extension point to test

Examples

extension:cache

$ extension:cache

Cache extension point discovery

Examples

extension:clear

$ extension:clear

Clear extension cache

Examples

extension:ide-helper

$ extension:ide-helper

Generate IDE helper files for extensions

Options

Flag Type Default Description
boolean - Output file path

Examples