Laravel package that downloads and installs the lcodegen Go binary from GitHub Releases into your Laravel project's vendor/bin directory.
- Artisan commands for binary installation and code generation
- Multi-platform support (Linux, macOS, Windows)
- Multi-architecture support (x86_64, arm64, i386)
- Checksum verification for security
- Lightweight package (binary is downloaded, not included in package)
- Version synchronization with
composer.json
- Install the package:
composer require grnsv/l-codegen- Install the binary:
php artisan l-codegen:installGenerate Laravel code from an OpenAPI specification:
php artisan l-codegen:generate openapi.ymlOr call the binary directly:
vendor/bin/lcodegen openapi.yml- Run the
php artisan l-codegen:installcommand - It detects your operating system and CPU architecture
- Downloads the appropriate binary from GitHub Releases based on the version in
composer.json - Verifies the downloaded binary using SHA256 checksums
- Extracts and installs the binary to
vendor/bin/lcodegen - Makes the binary executable (on Unix systems)
- Linux: x86_64, arm64, i386
- macOS: x86_64 (Intel), arm64 (Apple Silicon)
- Windows: x86_64, arm64, i386
The version of the binary is determined by the version field in this package's composer.json. To update to a new version of lcodegen, update this package to the corresponding version.
- PHP >= 8.2
- Composer >= 2.0
- Laravel >= 11.0 || >= 12.0
composer testcomposer test-coverageThe package includes integration tests that verify:
- Command registration in Laravel
- Platform detection (OS and architecture)
- Binary installation process
- Code generation via Artisan command
- Service provider auto-discovery
Run the install command manually:
php artisan l-codegen:installThis might indicate a corrupted download or a network issue. Try:
rm -rf vendor/grnsv/l-codegen
composer installOn Unix systems, ensure the binary is executable:
chmod +x vendor/bin/lcodegenMIT