grnsv / l-codegen
Laravel package for installing and running grnsv/lcodegen code generator
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/grnsv/l-codegen
Requires
- php: ^8.2
- illuminate/console: ^11.0|^12.0
- illuminate/http: ^11.0|^12.0
- illuminate/process: ^11.0|^12.0
- illuminate/support: ^11.0|^12.0
Requires (Dev)
- driftingly/rector-laravel: ^2.1
- laravel/pint: ^1.13
- orchestra/testbench: ^9.0
- phpunit/phpunit: ^11.0
- rector/rector: ^2.3
This package is auto-updated.
Last update: 2026-02-16 16:32:17 UTC
README
Laravel package that downloads and installs the lcodegen Go binary from GitHub Releases into your Laravel project's vendor/bin directory.
Features
- 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
Installation
- Install the package:
composer require grnsv/l-codegen
- Install the binary:
php artisan l-codegen:install
Usage
Generate Laravel code from an OpenAPI specification:
php artisan l-codegen:generate openapi.yml
Or call the binary directly:
vendor/bin/lcodegen openapi.yml
How It Works
- 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)
Supported Platforms
- Linux: x86_64, arm64, i386
- macOS: x86_64 (Intel), arm64 (Apple Silicon)
- Windows: x86_64, arm64, i386
Version Management
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.
Requirements
- PHP >= 8.2
- Composer >= 2.0
- Laravel >= 11.0 || >= 12.0
Development
Running Tests
composer test
Running Tests with Coverage
composer test-coverage
Test Coverage
The 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
Troubleshooting
Binary not found after installation
Run the install command manually:
php artisan l-codegen:install
Checksum verification failed
This might indicate a corrupted download or a network issue. Try:
rm -rf vendor/grnsv/l-codegen composer install
Permission denied
On Unix systems, ensure the binary is executable:
chmod +x vendor/bin/lcodegen
License
MIT