pack-php / pack
A Laravel Artisan command to search, preview, and install PHP packages from Packagist.
1.0.0
2025-02-03 19:58 UTC
README
A Laravel Artisan command to search, preview, and install PHP packages from Packagist.
๐ Features
- Search for PHP packages directly from your terminal.
- Preview package details before installing.
- Open the package page in your browser.
- Install selected packages with Composer.
๐ฆ Installation
You can install the package via Composer:
composer require pack-php/pack
โก Usage
Search and Install a Package
Run the following command:
php artisan pack:install
- Enter a package name: The command will ask you to enter a package name.
- Browse results: A list of matching packages from Packagist will be displayed.
- Select a package: Use arrow keys or enter the number to choose a package.
- Open the package page (Optional): You can open the package's Packagist URL in your browser.
- Confirm installation: The command will ask if you want to install the package.
- Installation starts: If confirmed, Composer will install the package.
Example Usage:
php artisan pack:install
What is your package name? laravel-uuid
1. ramsey/uuid
A PHP library for generating and working with universally unique identifiers (UUIDs).
2. spatie/laravel-uuid
A simple Laravel package for handling UUIDs.
Show more results? (yes/no) no
Select a package: spatie/laravel-uuid - A simple Laravel package for handling UUIDs.
You selected: spatie/laravel-uuid
Do you want to open https://packagist.org/packages/spatie/laravel-uuid? (yes/no) yes
Opening URL...
Do you want to install spatie/laravel-uuid? (yes/no) yes
Installing spatie/laravel-uuid...
Package spatie/laravel-uuid installed successfully.
๐งช Testing
You can run tests using PHPUnit:
vendor/bin/phpunit
๐ License
This package is open-source and available under the MIT License.