spatie/laravel-openapi-cli
Generate Laravel Artisan commands from an OpenAPI spec. Each API endpoint becomes its own command with typed options for params and request bodies, plus auth, base URL, caching, redirects, and output formatting—ideal for building API CLIs with Laravel Zero.
php artisan myapp:process-invoices) by registering APIs without requiring a full Laravel namespace, expanding use cases for Laravel Zero.list command serves as lightweight, interactive documentation for power users.tenant1:list, tenant2:list).Adopt if:
Look elsewhere if:
*"This package transforms our API specifications into reusable, self-service CLI tools—like php artisan api:process-orders --status=pending—without requiring custom development. It’s a game-changer for internal efficiency, cutting the time to build API-driven tools by up to 80%. For example:
api:fetch-customer instead of manual API calls.api:deploy --env=staging in CI pipelines.api:generate-report --format=csv.It’s like giving our APIs a command-line interface, but auto-generated from the specs we already maintain. This reduces dependency on engineering teams, speeds up tooling development, and ensures consistency across all API interactions."*
Why it matters:
*"This package auto-generates Laravel Artisan commands from OpenAPI specs, so you can expose API endpoints as CLI tools with zero manual work. For example:
POST /users endpoint becomes php artisan api:post-users --input '{"name":"Alice"}'./books/{id} are converted to --id=123 flags.?status=active become --status=active.Key features:
onError and retryOn.php artisan myapp:fetch-data).Use cases:
Trade-offs:
Key Selling Points:
api:list command serves as interactive documentation for power users.How can I help you explore Laravel packages today?